vb.net barcode reader source code COMMANDING A ROBOT WITH INFRARED REMOTE CONTROL in Software

Draw Quick Response Code in Software COMMANDING A ROBOT WITH INFRARED REMOTE CONTROL

16.3 COMMANDING A ROBOT WITH INFRARED REMOTE CONTROL
Decoding QR In None
Using Barcode Control SDK for Software Control to generate, create, read, scan barcode image in Software applications.
Denso QR Bar Code Maker In None
Using Barcode generation for Software Control to generate, create QR-Code image in Software applications.
4x AA Battery
Reading QR Code JIS X 0510 In None
Using Barcode recognizer for Software Control to read, scan read, scan image in Software applications.
QR Code JIS X 0510 Generation In Visual C#
Using Barcode drawer for VS .NET Control to generate, create QR Code JIS X 0510 image in .NET framework applications.
Vcc C5
Denso QR Bar Code Maker In .NET
Using Barcode generator for ASP.NET Control to generate, create QR Code ISO/IEC18004 image in ASP.NET applications.
QR Code 2d Barcode Encoder In Visual Studio .NET
Using Barcode drawer for Visual Studio .NET Control to generate, create QR Code ISO/IEC18004 image in .NET applications.
C1 C2 0.1 uF 1 2 3 4 5 6 7 8 9 10 11 12
QR Code 2d Barcode Creation In VB.NET
Using Barcode creation for .NET framework Control to generate, create QR Code image in .NET applications.
Code 128A Creation In None
Using Barcode generator for Software Control to generate, create Code 128 Code Set A image in Software applications.
16 1 7 Vcc _Clr 3Q/2D 2Q/1D 1Q/6D 6Q/5D 5Q/4D
Generate GS1 128 In None
Using Barcode creator for Software Control to generate, create GS1 128 image in Software applications.
Painting Code-39 In None
Using Barcode printer for Software Control to generate, create Code39 image in Software applications.
4Q IC4 Gnd 3D Clk 8 6 9
Encoding Barcode In None
Using Barcode maker for Software Control to generate, create bar code image in Software applications.
GS1 - 13 Encoder In None
Using Barcode printer for Software Control to generate, create GTIN - 13 image in Software applications.
24 23 22 21 20 19 18 17 16 15 14 13
Paint Postnet In None
Using Barcode creator for Software Control to generate, create USPS POSTal Numeric Encoding Technique Barcode image in Software applications.
Scan GS1 - 12 In VB.NET
Using Barcode reader for .NET Control to read, scan read, scan image in .NET applications.
FIGURE 16-7 A single shot delay can produce the clock signal to pass IR serial data to two 74LS174s wired as six-bit shift registers that can be read by the BS2.
Code 39 Reader In Java
Using Barcode scanner for Java Control to read, scan read, scan image in Java applications.
Paint EAN 13 In Objective-C
Using Barcode printer for iPad Control to generate, create GS1 - 13 image in iPad applications.
To test the operation of the circuit, the following program was developed.
Code 128C Drawer In Objective-C
Using Barcode printer for iPad Control to generate, create Code 128B image in iPad applications.
Code 39 Extended Generator In Java
Using Barcode encoder for Android Control to generate, create Code 39 image in Android applications.
' ' ' ' ' ' BS2 Remote Control - Add a Sony Remote Control Read to BS2 This program reads the 12 bits of a Sony Remote Control and Displays the Result on the Console myke predko
Barcode Maker In Visual Studio .NET
Using Barcode creation for .NET Control to generate, create barcode image in .NET applications.
GS1-128 Generation In Java
Using Barcode creator for Java Control to generate, create UCC-128 image in Java applications.
TABLE 16-3 BS2 IC1 IC2 IC3 IC4 R1 R2 R3 C1 C2 C5 Misc.
0.1 uF
47 uF
Vcc Vcc Vcc 4Q C2 16 5Q/4D _Clr 6Q/5D 1 1Q/6D 2Q/1D _Clrb Vcc 3Q/2D 16 11 C4 Rcb Bb 7 10 Cextb 3D 6 6 Ab Gnd Clk 9 _Qb Gnd 8 9 12 8 IC2
0.1 uF
0.1 uF
74LS123
0.1 uF
Parts List for BS2 Sony Remote Control Receiver Hardware Parallax BASIC Stamp 2 38 kHz TV remote control IR receiver (Sharp GP1U57X or equivalent) 74LA123 dual shot chip 74LS174 Hex D-flip flop chips 100 resistor 10k resistor 22k resistor 47 F electrolytic capacitor 0.1 F capacitor BS2 communications/programming interface, long breadboard, breadboard wiring kit, 4x AA battery clip, 4x AA alkaline batteries
REMOTE CONTROL SYSTEMS
'{$STAMP BS2} '{$PBASIC 2.50} ' Pin/Variable Declarations RemotePins VAR INS ' Use all 16 Bits for the Read RemoteData VAR Word ' Initialization/Mainline DO ' Repeat forever RemoteData = RemotePins & &FFF DEBUG "Remote Code is 0x", HEX3 RemoteData, CR PAUSE 333 ' Wait 1/3 Second before Repeating LOOP
Despite the simplicity of the code, the circuit works surprisingly well and data bits are read from the packets with good repeatability. When you build and test the application, there are three things that you will probably notice. The first is that occasionally, when a button is pressed on the remote control, the changing value read from the serial register is different from subsequent values. This is due to the data still being shifted in when the I/O port is executing. The second issue that you might have is the number of BS2 I/O pins that are required for the application only four are left available for controlling the robot. You may want to shift in the data using the SHIFTIN PBASIC statement with some hardware to arbitrate between the incoming data and reading it. Finally, to indicate that a value has been read, you may want to clear the shift register: this could be accomplished by driving pin 1 of the 74LS174s low, but this would require an additional BS2 pin. Table 16-4 lists some of the different codes provided by a Sony TV remote control using this circuit and the previous code. By selecting a VCR, DVD, or cable/satellite receiver, you will get slightly different codes for the different functions.
16.3.3 CONTROLLING ROBOT MOTORS WITH A REMOTE CONTROL
As noted earlier in this chapter, the software running in the remote control is very simple; when a button is pressed, a packet of data representing the button is sent out. If it is still pressed 40 or 50 ms later, then a packet is sent again and each and every 40 or 50 ms until the button is released. The real intelligence is built into the device that is being controlled. Understanding how the remote control works is important to being able to use the remote control to directly control the robot s motors. The remote control output is so simple because as a communications link infrared data transmission is quite poor, especially compared to other forms of wireless communications. People rarely point the remote control directly at the controlled device s receiver (often, people will point the remote control at the wrong unit altogether); IR communications depend on the ability of the signal to bounce off various objects in the room as well as the receiver s ability to receive and accept very low power signals. Despite this sensitivity and the ability to reflect off of different objects, quite a few packets are normally lost. The receiver compensates for this by continuing the last action some length of time after the last
Copyright © OnBarcode.com . All rights reserved.