Touch (use with mDesigner)
The Touch sensor (also known as Touch button) is a sensor which is able to detect if it is pressed or not pressed based on capacitance (read more). Although It can serve similar functions to the Crash switch which is a mechanical switch. The Touch sensor can only be triggered by things with capacitance, such as a finger. The state of the Touch sensor can be detected and can be used to trigger events or conditions in scripts. Support for this sensor is found in mDesigner.
The following pins on the Hub or mCenter+'s Hub support this module:
|Pin 0||Yes||Not recommended, Pin 0 & 1 used by mDesigner (serial communication).|
|Pin 1||Yes||Not recommended, Pin 0 & 1 used by mDesigner (serial communication).|
Digital Read Pin
This block reads the state of the pin. In Arduino, this is known as a digital read (digitalRead). A value of either 0 or 1 will be returned.
- When Touch sensor is NOT PRESSED, 1 is returned.
- When Touch sensor is PRESSED, 0 is returned.
This block reads the state of the pin, then compares it to the configured state.
- If the state of the pin DOES MATCH the configured state, then this block returns true
- If the state of the pin DOES NOT MATCH the configured state, then this block returns false