Component: Touch Pads (Sensors: EBM Modules)

From Flowcode Help
Jump to navigationJump to search


Author Matrix TSL
Version 1.0 (Release)
Category Sensors: EBM Modules


Image Touch Pads component

This board provides two touch areas for use with capacitive sensing. Hence two digital touch switches can be implemented. This component directly interfaces with the EBM013 Sensors board.

Examples

Sample program using the EBM013 - Touch Pads sensor.

Sensors are first calibrated and then can be read as digital switches FC6 Icon.png EBM013 Example

Downloadable macro reference

GetTouchValue

Samples the touch sensor ADC value and returns it

Always samples both channels, but only returns the chosen channel

Parameters

BOOL Switch
Select Switch. Switch 1 = 0, Switch 2 = 1


Return value

UINT


GetTouchPressed

Returns non-zero if touch detected

Parameters

BOOL Switch
Switch 1 = 0, Switch 2 = 1
UINT OffValue
BYTE Threshold
Provide the threshold value for the pad to be considered touched


Return value

BOOL : Returns true if the operation is a success, else false


Simulation macro reference

This component does not contain any simulation macros


Property reference

Channel 1

This property is of type Single analog pin and can be referenced with the variable name CHANNEL1.

ADC Channel number

Channel 2

This property is of type Single analog pin and can be referenced with the variable name CHANNEL2.

No additional information


On Value

This property is of type Unsigned integer and can be referenced with the variable name OnVal1.

No additional information


Off Value

This property is of type Unsigned integer and can be referenced with the variable name OffVal1.

No additional information


On Value

This property is of type Unsigned integer and can be referenced with the variable name OnVal2.

No additional information


Off Value

This property is of type Unsigned integer and can be referenced with the variable name OffVal2.

No additional information