Werkcollege opgave 23 september BMT K9
Dependencies: Encoder HIDScope MODSERIAL mbed QEI biquadFilter
main.cpp
- Committer:
- ThomasBNL
- Date:
- 2015-09-23
- Revision:
- 7:f01efd933bfd
- Parent:
- 1:0a89274e1279
File content as of revision 7:f01efd933bfd:
#include "mbed.h" #include "HIDScope.h" #include "encoder.h" #include "MODSERIAL.h" //Motor 2 DigitalOut motor2direction(D4); //D4 en D5 zijn motor 2 (op het motorshield) PwmOut motor2speed(D5); DigitalIn button(PTA4); MODSERIAL pc(USBTX,USBRX); int main() { while(true) { pc.printf("Clockwise \n"); motor2direction = 1; motor2speed = 0.5f; wait (1); pc.printf("Counter Clockwise \n"); motor2direction = 0; wait (1); } }