Alle functies van de motoren werken
Dependencies: MODSERIAL QEI mbed
Fork of worknotjet by
main.cpp
- Committer:
- Frostworks
- Date:
- 2016-10-10
- Revision:
- 0:2b420376e01d
- Child:
- 1:833c73834749
File content as of revision 0:2b420376e01d:
#include "mbed.h" #include "MODSERIAL.h" DigitalOut M1_rotate(D2); PwmOut M1_Speed(D3); //DigitalOut M2_rotate(D6); //PwmOut M2_Speed(D7); AnalogIn pot(A4); MODSERIAL pc(USBTX, USBRX); int main() { pc.baud(115200); pc.printf("hoi\n"); M1_rotate = 1; while (true) { float potje = pot.read(); M1_Speed.write(potje); wait(0.1); pc.printf("%f \n \r ", potje); } }