Autonomous line tracking with bump sensor
Fork of SeeedShieldBot by
Diff: SeeedStudioShieldBot.cpp
- Revision:
- 9:e7a86f43d5ad
- Parent:
- 7:887c729fd7c1
diff -r 9fd1722259a1 -r e7a86f43d5ad SeeedStudioShieldBot.cpp --- a/SeeedStudioShieldBot.cpp Thu Jul 31 14:42:21 2014 +0000 +++ b/SeeedStudioShieldBot.cpp Thu Aug 20 21:45:07 2015 +0000 @@ -160,3 +160,9 @@ stopLeft(); stopRight(); } + +int* SeeedStudioShieldBot::get_IR() +{ + int sensors[5] = {rightSensor.read(), inRightSensor.read(), centreSensor.read(), inLeftSensor.read(), leftSensor.read()}; + return sensors; +} \ No newline at end of file