Robot code for searching an object and charging at it.

Dependencies:   HCSR04 Motor mbed

Revision:
36:0a69dc7bfcf9
Parent:
33:4d0fe8fbed68
Child:
37:a08d2e37b7e6
--- a/functions.cpp	Sun Jun 07 19:09:35 2015 +0000
+++ b/functions.cpp	Tue Jun 09 10:28:16 2015 +0000
@@ -16,13 +16,13 @@
 // if there is a difference between the readings of these sensors 
 // the robot has detected a line.
 // Setting pins for line sensor
-DigitalInOut line1(p20);
-DigitalInOut line2(p19);
+DigitalInOut line1(p29);
+DigitalInOut line2(p22);
 
 // Setting pins for motor, as follows:
 // Example: Motor____(PWM, Forward, Reverse)
-Motor MotorRight(p23, p27, p28);
-Motor MotorLeft(p22, p30, p29);
+Motor MotorLeft(p24, p13, p14); // pwm, fwd, rev
+Motor MotorRight(p23, p11, p10); // pwm, fwd, rev
 
 // Setting pins for ultrasonic sensor, as follows:
 // Example: usensor(Trigger, Echo)