Timo de Vries
/
Practical2
heavy load crash arggh
main.cpp
- Committer:
- Frostworks
- Date:
- 2016-09-26
- Revision:
- 0:8f3f14579021
File content as of revision 0:8f3f14579021:
#include "mbed.h" #include "MODSERIAL.h" AnalogIn pot(A1); DigitalIn butje1(D3); DigitalIn butje4(D4); PwmOut myled(LED_GREEN); MODSERIAL pc(USBTX, USBRX); int main() { //int i = 0; pc.baud(115200); pc.printf("hoi\n"); myled.period_ms(0.1); while (true) { float potje = pot.read(); wait(0.5f); myled.write(potje); pc.printf("%f \n \r ", potje); } }