SmartWheels self-driving race car. Designed for NXP Cup. Uses FRDM-KL25Z, area-scan camera, and simple image processing to detect and navigate any NXP spec track.
Dependencies: TSI USBDevice mbed-dev
Fork of SmartWheels by
Diff: Hardwares/Motor.cpp
- Revision:
- 11:676ea42afd56
- Parent:
- 9:b72e18f80f49
- Child:
- 13:7dcb1642ef99
--- a/Hardwares/Motor.cpp Tue Feb 07 18:20:38 2017 +0000 +++ b/Hardwares/Motor.cpp Tue Feb 07 21:58:20 2017 +0000 @@ -1,9 +1,12 @@ #include "Motor.h" #include "mbed.h" +#include "Core.h" + #include "PinAssignment.h" -Motor::Motor() : +Motor::Motor(SW::Core& core) : + m_core(core), m_dirL(DigitalOut(MC_DIR_L, 1)), m_dirR(DigitalOut(MC_DIR_R, 1)), m_pwmL(PwmOut(MC_SPEED_L)),