Page 315 - Robots Androids and Animatrons : 12 Incredible Projects You Can Build
P. 315

robotic arm can be controlled manually at any time. It doesn’t make
                                a difference if the interface is connected to the computer or not.
                        DOS-level keyboard program
                                The keyboard program is a DOS-level program that allows one to
                                control the robotic arm in real time (interactively) using the key-
                                board. The following keys perform the following functions:


                                                 Key      Function
                                                  U         Up
                                                  L         Left
                                                  G         Grip
                                                  SStop
                                                  D         Down
                                                  R         Right
                                                  H         Release
                                                  Q         Quit


                        Speech control for robotic arm
           294
                                The speech control for the robotic arm uses the speech-recogni-
                                tion kit from Chap. 7. In this section we will build an interface from
                                the speech-recognition kit to the robotic arm. This interface is also
                                offered in a kit form from Images SI, Inc.
                                The schematic for  the speech-recognition  interface is shown  in
                                Fig. 15.11. The interface uses a 16F84 microcontroller. The pro-
                                gram for the microcontroller is as follows:
                                ‘ Speech Recognition Interface program
                                Symbol PortA = 5
                                Symbol TRISA = 133
                                Symbol PortB = 6
                                Symbol TRISB = 134
                                Poke TRISA, 255
                                Poke TRISB, 240
                                Start:
                                Peek PortB, B0
                                If bit4 = 0 then trigger  ‘Trigger enabled, read speech-
                                                          recognition circuit
                                goto start  ‘Repeat
                                trigger:
                                Pause 500  ‘Wait 0.5 seconds
                                Peek PortB, B0  ‘Read BCD number
                                                       Team LRN
            Chapter fifteen
   310   311   312   313   314   315   316   317   318   319   320