Page 317 - Robots Androids and Animatrons : 12 Incredible Projects You Can Build
P. 317
if bit5 = 1 then send
goto start
send:
‘Read port A
peek PortA,b0 ‘Repeat ‘Output number
if bit4 = 1 then eleven ‘Is the number 11?
poke PortB, b0 ‘Output number
goto start ‘Repeat
eleven:
if bit0 = 0 then ten
poke portb,11
goto start ‘Repeat
ten:
poke partb,10
goto start ‘Repeat
end
Updates to the 16F84 program may be downloaded for free at
http://www.imagesco.com.
Programming the speech-recognition interface
Programming the speech-recognition interface is the same proce-
296 dure used to program the speech-recognition kit in Chap. 7. To
operate the robotic arm properly, you must program certain word
numbers to specific robotic arm functions. You may use whatever
command word you wish for any particular command. I am pro-
viding a command word in Table 15.1 for illustration; you may
change any word you wish.
Table 15.1
Word Number Typical Command Word Robotic Arm Function
1 GRIP Close gripper
2 E-Down Elbow down
3 R-Base Rotate base CCW
4 S-Up Shoulder up
5 L-Wrist Rotate wrist CW
6 Release Open gripper
7 E-Up Elbow up
8 L-Base Rotate base CW
9 S-Down Shoulder down
10 R-Wrist Rotate wrist CCW
11 Stop Stop
Team LRN
Chapter fifteen