Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
TSIAnalogSlider Class Reference
Analog slider which consists of two electrodes. More...
#include <tsi_sensor.h>
Public Member Functions | |
| TSIAnalogSlider (PinName elec0, PinName elec1, uint32_t range) | |
| Initialize the TSI Touch Sensor with the given PinNames. | |
| TSIAnalogSlider (uint32_t elec0, uint32_t elec1, uint32_t range) | |
| Initialize the TSI Touch Sensor. | |
| float | readPercentage () |
| Read Touch Sensor percentage value. | |
| uint32_t | readDistance () |
| Read Touch Sensor distance. | |
| TSIElectrode * | getCurrentElectrode () |
| Get current electrode. | |
| void | setCurrentElectrode (TSIElectrode *elec) |
| Set current electrode which is being measured. | |
| TSIElectrode * | getNextElectrode (TSIElectrode *electrode) |
| Get next electrode. | |
| uint32_t | getAbsoluteDistance () |
| Return absolute distance position. | |
| uint32_t | getAbsolutePosition () |
| Return absolute precentage position. | |
| void | setScan (uint32_t scan) |
| Set value to the scan in progress flag. | |
Static Public Member Functions | |
| static TSIAnalogSlider * | getInstance () |
| Return instance to Analog slider. | |
Detailed Description
Analog slider which consists of two electrodes.
Definition at line 165 of file tsi_sensor.h.
Constructor & Destructor Documentation
| TSIAnalogSlider | ( | PinName | elec0, |
| PinName | elec1, | ||
| uint32_t | range | ||
| ) |
Initialize the TSI Touch Sensor with the given PinNames.
Definition at line 27 of file tsi_sensor.cpp.
| TSIAnalogSlider | ( | uint32_t | elec0, |
| uint32_t | elec1, | ||
| uint32_t | range | ||
| ) |
Initialize the TSI Touch Sensor.
Definition at line 30 of file tsi_sensor.cpp.
Member Function Documentation
| uint32_t getAbsoluteDistance | ( | ) |
Return absolute distance position.
Definition at line 209 of file tsi_sensor.h.
| uint32_t getAbsolutePosition | ( | ) |
Return absolute precentage position.
Definition at line 214 of file tsi_sensor.h.
| TSIElectrode* getCurrentElectrode | ( | ) |
Get current electrode.
Definition at line 190 of file tsi_sensor.h.
| static TSIAnalogSlider* getInstance | ( | ) | [static] |
| TSIElectrode* getNextElectrode | ( | TSIElectrode * | electrode ) |
Get next electrode.
Definition at line 200 of file tsi_sensor.h.
| uint32_t readDistance | ( | ) |
Read Touch Sensor distance.
- Returns:
- distance in mm. The value is between [0 ... _range]
Definition at line 130 of file tsi_sensor.cpp.
| float readPercentage | ( | ) |
Read Touch Sensor percentage value.
- Returns:
- percentage value between [0 ... 1]
Definition at line 125 of file tsi_sensor.cpp.
| void setCurrentElectrode | ( | TSIElectrode * | elec ) |
Set current electrode which is being measured.
Definition at line 195 of file tsi_sensor.h.
| void setScan | ( | uint32_t | scan ) |
Set value to the scan in progress flag.
Definition at line 219 of file tsi_sensor.h.
Generated on Tue Aug 23 2022 23:44:59 by
1.7.2