Divide the slider into four areas
Dependents: JeSuisUnGrandHomme
Fork of info1 by
info1.cpp
- Committer:
- Agachon
- Date:
- 2015-01-15
- Revision:
- 2:68deb4a53d73
- Parent:
- 1:6bd5a7965b66
- Child:
- 3:9f876f7e54c3
File content as of revision 2:68deb4a53d73:
#include "mbed.h" #include "TSISensor.h" TSISensor tsi2; void appui_num(int *bp) { if (tsi2.readPercentage()>0) *bp=1; else *bp=0; } void appui_ana (int *bp1,int *bp2,float seuil) { if (tsi2.readPercentage()>0 && tsi2.readPercentage()<seuil) { *bp1=1; *bp2=0; } else if (tsi2.readPercentage()>=seuil && tsi2.readPercentage()<=1) { *bp1=0; *bp2=1; } else { *bp1=0; *bp2=0; } }