-
Notifications
You must be signed in to change notification settings - Fork 3
3D Printed Add Ons
Infineon offers several 3D printed mechanical add-ons to be used in combination with the shield2go form factor products. These allow for quick and easy application evaluation of the different Infineon magnetic sensors.
Find more about them in the boards section of the magnetic sensors product page.
In this section, we present the OpenClose2Go Add-On. Which can be use in combination with the hall switches S2Go product family.
The add-on includes the mechanical 3D printed hardware and a magnet. A little force feedback function is implemented with further magnets, but not mandatory for the function.
This simple Add-On will easily illustrate you the functionality of an open-close functionality. Adressable appliations are:
- Open window detection for safety or security reasons
- Door state of a dishwashers or fridge
- Simple pressed button function detection
- ...
On the Infineon page the 3D print files can be downloaded after registration to your convenience.
First, if you are unfamiliar with XMC Arduino ecosystem and this product, please go through the Arduino Getting Started. The same hardware will be required as well, plus (of course) the OpenClose2Go Add-On. In case of the software, for this example, the hall-switch Arduino library does not need to be installed, you can directly use the code example provided below.
By approaching the sensor with the magnet, the magnetic field increases and exceeds a sensor specific threshold -> the sensor changes the state. The LED on the XMC1100 indicates the state of the sensor in addition after flashing the example code to the uC. This example shall show how easy this detection can be.
Create a new Arduino Sketch and copy the following code:
int state=LOW;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
pinMode(14,OUTPUT);
pinMode(9,INPUT);
Serial.println("Start");
digitalWrite(14,HIGH);
delay(1000);
digitalWrite(14,LOW);
}
void loop() {
// put your main code here, to run repeatedly:
state=digitalRead(9);
Serial.print("State: ");
Serial.println(state);
digitalWrite(14,state);
delay(100);
}
2. Library Details
Library Architecture
Hall Switch API
Hall Speed API
PAL Interface
Source Tree Structure
Preprocessor Configuration
Porting Guide
Doxygen Docs
4. Software Frameworks
Arduino
- Getting Started
- Lib Installation
- Ino Examples
- Arduino API
- PlatformIO
Cypress WICED
- Getting Started
- Lib Installation
- WICED API
- Troubleshooting Guide
Raspberry Pi
- Getting Started
- Lib Installation
- Examples
- API usage