high school robot club question for whiskers circuit
peterobot
Posts: 3
My high school robotics team is getting ready for a competition. Every program we run has failed. We can't figure out how to do the following:
1) sensory input and visual output for the robot.
1.a) Please provide the schematic diagram for the input circuit that is taking input from P0
and P1 for the “Whiskers sensory input”.
1.b) Explain how the circuit works. What kind of logic is provided to the Microcontroller.
1.c) Provide a Debug program that will allow your circuit to be tested, providing the on the
screen output as well as through the two LEDs connected to P2 and P3.
1.d) Provide the schematic diagram for the output connected to the two LEDs connected to
P2 and P3.
2) Design the software for the Boe-Bot that has the schematic diagram that is called for in
the item 1. above. (1.a and 1.d). Servo motors are connected to P14 controlling the right
hand wheel and P15 controlling the left hand wheel.
Both whiskers detect obstacle, Back up for two seconds & make a circle of 1 ft & U-turn
(left twice)
Left whisker contacts, Back up & turn left
Right whisker contacts, Back up & turn right
Both whiskers 1, no contacts, Apply a forward pulse and check again.
1) sensory input and visual output for the robot.
1.a) Please provide the schematic diagram for the input circuit that is taking input from P0
and P1 for the “Whiskers sensory input”.
1.b) Explain how the circuit works. What kind of logic is provided to the Microcontroller.
1.c) Provide a Debug program that will allow your circuit to be tested, providing the on the
screen output as well as through the two LEDs connected to P2 and P3.
1.d) Provide the schematic diagram for the output connected to the two LEDs connected to
P2 and P3.
2) Design the software for the Boe-Bot that has the schematic diagram that is called for in
the item 1. above. (1.a and 1.d). Servo motors are connected to P14 controlling the right
hand wheel and P15 controlling the left hand wheel.
Both whiskers detect obstacle, Back up for two seconds & make a circle of 1 ft & U-turn
(left twice)
Left whisker contacts, Back up & turn left
Right whisker contacts, Back up & turn right
Both whiskers 1, no contacts, Apply a forward pulse and check again.
Comments
The LED circuit is in there too (in chapter 2).
You can find the test code for these circuits a few pages later (respectively).
Circle:········································ ‘1·foot circle’
PULSOUT 13, 850 ' Veer right
PULSOUT 12, 716
···· PAUSE 20
NEXT
RETURN
·
BTW, your subroutine has an error. You should have a FOR in there somewhere. When posting code, be sure to use the [noparse][[/noparse] code ] option (without spaces). Test it out in the test forum if you want to play with it.