cleaned up motor class with separate header and .cpp files
Dependencies: mbed
Dependents: TerraBot_Drive_2D TerraBot_Drive_2D TerraBot_Drive_2D_FINAL DUMP_TRUCK_Test ... more
Diff: Motor.cpp
- Revision:
- 1:92be353590b4
- Parent:
- 0:0a5af2965205
--- a/Motor.cpp Fri Oct 07 01:21:10 2016 +0000 +++ b/Motor.cpp Mon Oct 24 18:54:53 2016 +0000 @@ -5,7 +5,7 @@ } void Motor::write(float Val) - { +{ if (Val >= 0) { dirPin = 1; pwmPin = Val; @@ -14,9 +14,9 @@ pwmPin = -1 * Val; } lastVal = Val; - } +} float Motor::read() - { +{ return lastVal; - } \ No newline at end of file +} \ No newline at end of file