Lu-Hsuan Chen
/
motorcar_pid
motor car with PID running feature
Diff: main.cpp
- Revision:
- 3:4be8f486a120
- Parent:
- 2:1dcd81fdef9e
- Child:
- 4:982dcc2390a2
--- a/main.cpp Tue Jul 31 08:09:05 2018 +0000 +++ b/main.cpp Wed Aug 01 07:18:57 2018 +0000 @@ -1,9 +1,9 @@ #include "mbed.h" -//#include "motorcar_pid.h" +#include "motorcar.h" DigitalOut led1(LED1); // LED indicating car is running -DigitalIn pb(PC_13); // car activate button +DigitalIn pb(USER_BUTTON); // car activate button int lastButtonState = 0; bool ledState = false; @@ -30,11 +30,11 @@ led1.write(ledState); - /*if(ledState) { + if(ledState) { readSensorValue(); - runPID(); - }*/ + //runPID(); + } } }