Samenwerking Groep 12
Dependencies: Encoder MODSERIAL HIDScope mbed
Foo
main.cpp
- Committer:
- bscheltinga
- Date:
- 2015-09-21
- Revision:
- 11:6ddb61ebbe4b
- Parent:
- 2:3de3c5eb400f
File content as of revision 11:6ddb61ebbe4b:
#include "mbed.h" #include "HIDScope.h" #include "encoder.h" #include "MODSERIAL.h" //Motor 1 DigitalOut motor1direction(D6); //D4 en D5 zijn motor 2 (op het motorshield) PwmOut motor1speed(D7); DigitalIn button(PTA4); int main() { while(true) { if (button.read() == 0) { motor1direction = 1; motor1speed = 0.3f; } else { motor2direction = 0; motor2speed = 0.3f; } } } // Geen functie hieronder nog //Encoder encoder1(D13,D12);