There was a small bug in the spelling of your library's method. I hope you accept this request. Sorry for the inconveniences and thanks for your library -- I'm just starting to use this platform. Greetings.
Fork of TouchButton by
TouchButton.cpp
- Committer:
- virajjayaweera
- Date:
- 2013-07-13
- Revision:
- 0:2afd6e977c5b
- Child:
- 1:5eb472334273
File content as of revision 0:2afd6e977c5b:
#include "mbed.h" #include "TSISensor.h" #include "TouchButton.h" TSISensor tsi; int TouchButton::PresedButton(void) { if(tsi.readPercentage()<0.01) return 0; else if(tsi.readPercentage()>0.75) return 4; else if(tsi.readPercentage()>0.5) return 3; else if(tsi.readPercentage()>0.25) return 2; else return 1; }