Jakub Czyż
/
Touch_Sensor
Touch sensor easy programe
Revision 0:949dbed8f677, committed 2013-12-17
- Comitter:
- kubaczyz
- Date:
- Tue Dec 17 20:25:47 2013 +0000
- Commit message:
- Najprostszy program wykorzystuj?cy `touch sensor`
Changed in this revision
diff -r 000000000000 -r 949dbed8f677 TSI.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/TSI.lib Tue Dec 17 20:25:47 2013 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/vsluiter/code/TSI/#4dc2f5a3a731
diff -r 000000000000 -r 949dbed8f677 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Tue Dec 17 20:25:47 2013 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/a842253909c9 \ No newline at end of file
diff -r 000000000000 -r 949dbed8f677 sensorr.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sensorr.cpp Tue Dec 17 20:25:47 2013 +0000 @@ -0,0 +1,12 @@ +#include "mbed.h" +#include "TSISensor.h" + +int main(void) { + PwmOut led(LED_GREEN); + TSISensor tsi; + + while (true) { + led = 1.0 - tsi.readPercentage(); + wait(0.1); + } +}