Mindstorms 3rd Party ROBOTC Drivers RobotC
[Home] [Download] [Submit a bug/suggestion] [ROBOTC Forums] [Blog] [Support this project]
Files | Functions

Touch Sensor MUX
[HiTechnic]

Files

file  hitechnic-touchmux.h
 

HiTechnic Touch Sensor Multiplexer Sensor driver.


Functions

int HTTMUXgetActive (tSensors link)
bool HTTMUXisActive (tSensors link, int touch)

Detailed Description

HiTechnic Touch Sensor MUX


Function Documentation

int HTTMUXgetActive ( tSensors  link )

Read the value of all of the currently connected touch sensors. The status is logically OR'd together. Touch 1 = 1, Touch 2 = 2, Touch 3 = 4, Touch 4 = 8. If Touch 1 and 3 are active, the return value will be 1 + 4 == 5.

Parameters:
linkthe HTTMUX port number
Returns:
the value of the switches status
Examples:
hitechnic-touchmux-test1.c.

Definition at line 47 of file hitechnic-touchmux.h.

bool HTTMUXisActive ( tSensors  link,
int  touch 
)

Read the value of specific touch sensor.

Parameters:
linkthe HTTMUX port number
touchthe touch sensor to be checked, numbered 1 to 4.
Returns:
the value of the switches status
Examples:
hitechnic-touchmux-test1.c.

Definition at line 74 of file hitechnic-touchmux.h.