dgfn

Dependencies:   mbed tsi_sensor

Committer:
benbrou06
Date:
Sat Dec 14 09:09:30 2019 +0000
Revision:
0:84a89cfeff98
yuez

Who changed what in which revision?

UserRevisionLine numberNew contents of line
benbrou06 0:84a89cfeff98 1 /* This defines will be replaced by PinNames soon */
benbrou06 0:84a89cfeff98 2 #if defined (TARGET_KL25Z) || defined (TARGET_KL46Z)
benbrou06 0:84a89cfeff98 3 #define ELEC0 9
benbrou06 0:84a89cfeff98 4 #define ELEC1 10
benbrou06 0:84a89cfeff98 5 #elif defined (TARGET_KL05Z)
benbrou06 0:84a89cfeff98 6 #define ELEC0 9
benbrou06 0:84a89cfeff98 7 #define ELEC1 8
benbrou06 0:84a89cfeff98 8 #else
benbrou06 0:84a89cfeff98 9 #error TARGET NOT DEFINED
benbrou06 0:84a89cfeff98 10 #endif
benbrou06 0:84a89cfeff98 11
benbrou06 0:84a89cfeff98 12 TSIAnalogSlider tsi(ELEC0, ELEC1, 40);
benbrou06 0:84a89cfeff98 13 float lire_slider()
benbrou06 0:84a89cfeff98 14 {
benbrou06 0:84a89cfeff98 15 return (1-tsi.readPercentage());
benbrou06 0:84a89cfeff98 16 }