encoder verwerkt

Dependencies:   MODSERIAL QEI mbed

Fork of motor_control by Floor Couwenberg

Committer:
FloorC
Date:
Thu Sep 29 13:29:18 2016 +0000
Revision:
1:e415c6eda278
Parent:
0:8ed7e7bbc391
Child:
2:80753272d9e4
proberen motor;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
FloorC 0:8ed7e7bbc391 1 #include "mbed.h"
FloorC 0:8ed7e7bbc391 2
FloorC 1:e415c6eda278 3 DigitalOut motor(D4);
FloorC 1:e415c6eda278 4 PwmOut pwm_motor(D5);
FloorC 1:e415c6eda278 5 //DigitalIn switch3(SW3);
FloorC 1:e415c6eda278 6
FloorC 0:8ed7e7bbc391 7 Serial pc(USBTX, USBRX);
FloorC 0:8ed7e7bbc391 8
FloorC 1:e415c6eda278 9 int CW = 0;
FloorC 1:e415c6eda278 10 int CCW = 1;
FloorC 1:e415c6eda278 11
FloorC 1:e415c6eda278 12 int main ()
FloorC 0:8ed7e7bbc391 13 {
FloorC 0:8ed7e7bbc391 14 while (true){
FloorC 1:e415c6eda278 15 motor = CW;
FloorC 1:e415c6eda278 16 pwm_motor = 0.5;
FloorC 1:e415c6eda278 17
FloorC 1:e415c6eda278 18
FloorC 1:e415c6eda278 19 }
FloorC 1:e415c6eda278 20 }