natsu tsumagari
/
test_cadenceClass
回転数計のクラスです。
main.cpp
- Committer:
- tsumagari
- Date:
- 2016-11-23
- Revision:
- 2:b492f029a2f4
- Parent:
- 1:6bceac3446ff
- Child:
- 3:0986b5d80ded
File content as of revision 2:b492f029a2f4:
#include "mbed.h" #include "Cadence.h" //#include <string> DigitalOut myled(LED1); Ticker cadenceTicker; Serial pc(USBTX,USBRX); //for debug Cadence cadence(p13,p14); int main() { pc.baud(115200); while(1) { myled = 1; wait(0.2); myled = 0; wait(0.2); pc.printf("test\n\r"); pc.printf("cadence: %f\n\r",cadence.cadence); pc.printf("%s\n\r",cadence.strC); pc.printf("voltage: %f\n\r",cadence.cadenceV); cadence.readData(); pc.printf("'%c!\n\r",cadence.strData[0]); } }