Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: LineFollowingRobot/IRsensor.cpp
- Revision:
- 2:74d8b693bc62
- Parent:
- 1:a2ceed49374e
- Child:
- 3:54c41af9e119
--- a/LineFollowingRobot/IRsensor.cpp Sat Feb 02 16:11:37 2019 +0000 +++ b/LineFollowingRobot/IRsensor.cpp Sat Feb 02 16:38:08 2019 +0000 @@ -4,11 +4,16 @@ IRSensor::IRSensor(PinName pin1,PinName pin2,PinName pin3,PinName pin4,PinName pin5, float Kp, float Ki, float Kd): m_leftIR(pin1), m_midLeftIR(pin2), m_midIR(pin3), m_midRightIR(pin4), m_rightIR(pin5), m_Kp(Kp), m_Ki(Ki), m_Kd(Kd){ - //class constructor + //class constructor + m_P = 0.0; m_I = 0.0; m_D = 0.0; + m_toggle = false; + m_dirL = true; + m_dirR = true; + Sample(); }