How to – Boe-Bot Robot with Easy Bluetooth Module


How to – Boe-Bot Robot with Easy Bluetooth Module
·
Bluetooth is widely used for various communication devices today including cell phones, headsets, and computer mice and keyboards. In this activity, we will demonstrate how to wirelessly control your Boe-Bot’s movements through a PC using the Easy Bluetooth Module.


View Video Introduction (YouTube)

Download Source CodeBoeBotEasyBluetooth_SourceCode.zip

Getting Started

If you are new to the BASIC Stamp microcontroller or to programming, it would be a good idea to review the following before continuing:

······· Complete Chapters 1-4 in Robotics with the Boe-Bot
······· Try the “Mini Project” Wireless Musical Keyboard to learn the basics of RF communication
······· Review the Easy Bluetooth Documentation v1.1 and follow all set-up instructions

Parts List

(1) Boe-Bot® Robot, assembled and tested
(1) Easy Bluetooth Module


What is Bluetooth?

Bluetooth is a wireless communication protocol that uses radio frequencies in the 2.4GHz range to exchange data over short distances from fixed and mobile devices.· This allows electronic devices that formally had to be connected via cables (such as computers, cell phones, headsets, keyboards, mice, printers and PDAs) to be connected wirelessly on one secure Bluetooth network.·
·
Bluetooth devices communicate through what’s known as a PAN (Personal Area Network), in which only Bluetooth devices that you have enabled can communicate.· This prevents other Bluetooth devices in the area from interfering with your network.· However, say you want to use a lot of Bluetooth devices on one network, how can it differentiate each connection?· Basically, each PAN consists of many different frequencies that each device can communicate on; and in order to avoid interference from multiple devices, each device “hops” to a new frequency many times per second.
·
Even with frequency hopping, two Bluetooth devices will occasionally end up on the same frequency, and they have built-in protection against the resulting garbled data.· They use an error correction technique called a Cyclical Redundancy Check or CRC.· The CRC makes it possible to figure out when data that was received doesn’t match the data that was sent.· The transmitter performs calculations on the packet before it sends it, and it sends the result of its calculations along with the packet.· The receiver performs the same calculations, and if its result doesn’t match it requests a second copy of the packet.

attachment.php?attachmentid=73744

Bluetooth and the Boe-Bot

The two most common wireless BASIC Stamp configurations that involve the Easy Bluetooth Module are:

1)···· A BASIC Stamp communicating with a Bluetooth equipped PC (Figure 1)
2)···· Two BASIC Stamps using two Easy Bluetooth Modules to communicate

Figure 1 – PC Boe-Bot Robot Bluetooth Communication
attachment.php?attachmentid=60834
We will use Configuration 1 for this activity, a BASIC Stamp using the Easy Bluetooth Module to communicate with a Bluetooth equipped PC.· In this case, the Boe-Bot Robot’s BASIC Stamp is running code that sends user prompts to the PC so that you can enter navigation instructions using the BASIC Stamp Editor’s Debug Terminal.· The PC’s Bluetooth radio and software combined with the Easy Bluetooth Module plugged into the Board of Education platform’s AppMod header makes it possible for the two to use serial communication over the Bluetooth wireless connection.

attachment.php?attachmentid=73745

Initializing a Connection·

Before attempting any code, it’s a good idea to verify that your PC and the Boe-Bot are communicating properly.· Here’s a quick way for you to confirm that a connection has been established:

······· Follow the instructions in the Easy Bluetooth Documentation v1.1 for connecting the Easy Bluetooth Module to your Board of Education + BASIC Stamp 2.
······· Follow the instructions in the Easy Bluetooth Documentation v1.1 for setting up a Bluetooth connection between your PC and Easy Bluetooth module with your computer's Bluetooth manager.
······· Open the BASIC Stamp Editor and select Preferences from the Edit menu.
······· In the Debug Port tab, select Edit Ports.
······· As shown in Figure 2, right-click the COM port entry that matches the Outgoing COM Port determined when you set-up the Easy Bluetooth module and select Include Port.

Figure 2 – Including the Bluetooth COM Port
attachment.php?attachmentid=60835

······· Enter and run TestBluetoothConnection.bs2 and
······· Unplug the serial cable from your Boe-Bot.
······· Open a new Debug Terminal by pressing “Ctrl+D”
······· Select the Outgoing COM port you enabled in the Edit Ports window (See Figure 3)
······· Click the Debug Terminal’s transmit windowpane, and start typing characters.
······· Verify that the Debug Terminal displays results similar to Figure 3.

[color=#008000]' TestBluetoothConnection.bs2[/color]
[color=#008000]' This program displays a bi-directional communication between the Easy[/color]
[color=#008000]' Bluetooth and the Debug Terminal.[/color]
 
[color=#008000]' {$STAMP BS2}[/color]
[color=#008000]' {$PBASIC 2.5}[/color]
 
[color=#000000]RX        PIN     2         [/color][color=#008000]' RX of the Easy Bluetooth[/color]
[color=#000000]TX        PIN     0         [/color][color=#008000]' TX of the Easy Bluetooth[/color]
 
[color=#000000]Baud      CON     84        [/color][color=#008000]' Baud set at 9600[/color]
 
[color=#000000]myByte    VAR     Byte      [/color][color=#008000]' Byte to establish connection & used for workspace[/color]
 
[color=#020FC0]PAUSE[/color][color=#000000] 250                                [/color][color=#008000]' Waits 1/4 second[/color]
[color=#020FC0]SERIN[/color][color=#000000] RX, Baud, [noparse][[/noparse]myByte]                 [/color][color=#008000]' Waiting for byte[/color]
[color=#000000]myByte = 0                               [/color][color=#008000]' Clear the byte value[/color]
 
[color=#020FC0]SEROUT[/color][color=#000000] TX[/color][color=#000000], Baud, [noparse][[/noparse] [/color][color=#800080]CLS[/color][color=#000000],                               [/color][color=#008000]' Send instructions to the Debug[/color]
                   [color=#ff0000]"Click the Debug Terminal's"[/color][color=#000000], [/color][color=#800080]CR[/color][color=#000000],  [/color][color=#008000]' Terminal[/color]
                   [color=#ff0000]"transmit windowpane"[/color][color=#000000], [/color][color=#800080]CR[/color][color=#000000],[/color]
                   [color=#ff0000]"and then Press any key: "[/color][color=#000000], [/color][color=#800080]CR [/color][color=#000000]][/color]
 
[color=#020FC0]DO[/color]
  [color=#020FC0]DO[/color] [color=#020FC0]UNTIL[/color][color=#000000] myByte > 0                                 [/color][color=#008000]' Wait until byte is valid[/color]
    [color=#020FC0]SERIN[/color] [color=#020FC0]RX[/color][color=#000000], Baud, [noparse][[/noparse]myByte]                          [/color][color=#008000]' Receive byte[/color]
  [color=#020FC0]LOOP[/color]
 
  [color=#020FC0]SEROUT[/color][color=#000000] TX[/color][color=#000000], Baud, [/color][color=#ff0000][noparse][[/noparse]"You pressed "[/color][color=#000000], myByte, [/color][color=#ff0000]"."[/color][color=#000000], [/color][color=#800080]CR[/color][color=#000000]]  [/color][color=#008000]' Display byte received[/color]
[color=#000000]  myByte = 0                                          [/color][color=#008000]' Clear the byte value[/color]
[color=#020FC0]LOOP[/color]


[/size]Figure 3 – Debug Display when Running TestBluetoothConnection.bs2
attachment.php?attachmentid=60836

How TestBluetoothConnection.bs2 Works

In most PBASIC examples where the BASIC Stamp communicates with the Debug Terminal the DEBUG and DEBUGIN commands are used.· DEBUG and DEBUGIN are actually special cases of the more general SEROUT and SERIN commands.· While the SEROUT and SERIN commands have arguments for setting serial communication pins, baud rate, and other parameters, the DEBUG and DEBUGIN commands communicate only through the BASIC Stamp’s programming connection pins at 9600 bps.· The Debug Terminal always “pops up” whenever you run a program that uses DEBUG because the BASIC Stamp editor detects that the DEBUG command has been used, so it automatically launches the Debug Terminal after downloading the program.
·
In TestBluetoothConnection.bs2, we aren’t communicating from the BASIC Stamp to the computer through a serial cable.· Instead, we’re communicating directly from the Bluetooth connection in the PC to the Easy Bluetooth module to the BASIC Stamp on the Boe-Bot. ·Therefore, we need to set the COM Port in the Debug Terminal to the COM Port that the Easy Bluetooth Module uses to send signals.
·
The first portion of the TestBluetoothConnection.bs2 waits for a byte to be received before continuing with the rest of the program.· This gives the user time to open a Debug Terminal and select the right COM port before receiving instructions on how to continue.· Once the user has pressed a button, instructions are then sent from the Easy Bluetooth Module to the Debug Terminal using the SEROUT command:
·
PAUSE 250······
SERIN RX, Baud, [noparse][[/noparse]myByte]
myByte = 0
·
SEROUT TX, Baud, [noparse][[/noparse] CLS,····························
·················· "Click the Debug Terminal's", CR,
·················· "transmit windowpane", CR,
··············· ···"and then Press any key: ", CR ]
·
Using the SERIN command, the Easy Bluetooth Module then keeps receiving bytes from the PC’s keyboard, and stores them in a variable named myByte.· Using the SEROUT command, the module then sends the string “You pressed”, the received byte (myByte), and then the string “.” back to the PC to display in the Debug Terminal.· If the characters displayed in the Debug Terminal are the same as what was typed, the PC and the Easy Bluetooth Module are communicating properly.
·
DO
· DO UNTIL myByte > 0
··· SERIN RX, Baud, [noparse][[/noparse]myByte]
· LOOP
·
· SEROUT TX, Baud, [noparse][[/noparse]"You pressed ", myByte, ".", CR]
· myByte = 0
LOOP

Wireless Movement Using the Debug Terminal

The TerminalBoeBotControl.bs2·example program·will prompt you for the number of pulses to send to the servos, and then the pulse width to transmit to each servo.· The program sends about 42 pulses per second, so 42 pulses would give you 1 second of run time, 84 would give you 2 seconds, and so on.· For speed control, 800 is about full speed counterclockwise, 700 is full speed clockwise, and 750 is stop.· If you want a wheel to go half speed counter clockwise, try about 775.· Half speed clockwise would be about 725, and so on.·

attachment.php?attachmentid=73746

[color=#008000]' TerminalBoeBotControl.bs2[/color]
 
[color=#008000]' {$STAMP BS2}[/color]
[color=#008000]' {$PBASIC 2.5}[/color]
 
[color=#000000]RX             PIN     2         [/color][color=#008000]' RX of the Easy Bluetooth[/color]
[color=#000000]TX             PIN     0         [/color][color=#008000]' TX of the Easy Bluetooth[/color]
 
[color=#000000]Baud           CON     84        [/color][color=#008000]' Baud set at 9600[/color]
 
[color=#000000]myByte         VAR     Byte      [/color][color=#008000]' Byte to establish connection[/color]
 
[color=#000000]pulseCnt       VAR     Word      [/color][color=#008000]' Stores number of pulses[/color]
[color=#000000]pulseLeft      VAR     Word      [/color][color=#008000]' Pulse width for left servo[/color]
[color=#000000]pulseRight     VAR     Word      [/color][color=#008000]' Pulse width for right servo[/color]
[color=#000000]counter        VAR     Word      [/color][color=#008000]' Counter for FOR...NEXT loop[/color]
 
[color=#020FC0]PAUSE[/color][color=#000000] 250                        [/color][color=#008000]' Waits 1/4 second[/color]
[color=#020FC0]SERIN[/color][color=#000000] RX, Baud, [noparse][[/noparse]myByte]         [/color][color=#008000]' Waiting for byte[/color]
[color=#000000]myByte = 0                       [/color][color=#008000]' Clear the byte value[/color]
 
[color=#020FC0]SEROUT[/color][color=#000000] TX, Baud, [noparse][[/noparse] [/color][color=#800080]CLS[/color][color=#000000],[/color]
                   [color=#ff0000]"Click the Debug Terminal's"[/color][color=#000000],[/color]
                   [color=#800080]CR[/color][color=#000000], [/color][color=#ff0000]"transmit windowpane and..." [/color][color=#000000]][/color]
[color=#020FC0]PAUSE[/color][color=#000000] 250[/color]
 
[color=#020FC0]DO[/color]
[color=#008000]  ' Prompt user for number of pulses[/color]
  [color=#020FC0]SEROUT[/color][color=#000000] TX[/color][color=#000000], BAUD, [noparse][[/noparse][/color][color=#800080]CR[/color][color=#000000], [/color][color=#800080]CR[/color][color=#000000], [/color][color=#ff0000]"Enter number of pulses: "[/color][color=#000000]][/color]
 
[color=#008000]  ' Recieve number of pulses from the PC[/color]
  [color=#020FC0]SERIN[/color][color=#000000]  RX, Baud, [noparse][[/noparse][/color][color=#000080]DEC[/color][color=#000000] pulseCnt][/color]
[color=#008000]  ' Display number of pulses entered in the Debug Terminal[/color]
  [color=#020FC0]SEROUT[/color][color=#000000] TX[/color][color=#000000], Baud, [noparse][[/noparse][/color][color=#000080]DEC[/color][color=#000000] pulseCnt][/color]
 
[color=#008000]  ' Promput user for left servo pulse width[/color]
  [color=#020FC0]SEROUT[/color][color=#000000] TX[/color][color=#000000], Baud, [noparse][[/noparse] [/color][color=#800080]CR[/color][color=#000000], [/color][color=#ff0000]"Enter left servo"[/color][color=#000000],[/color]
                       [color=#ff0000]"pulse width: "[/color][color=#000000]][/color]
 
[color=#008000]  ' Receive left servo pulse width from PC[/color]
  [color=#020FC0]SERIN[/color][color=#000000]  RX, Baud, [noparse][[/noparse][/color][color=#000080]DEC[/color][color=#000000] pulseLeft][/color]
[color=#008000]  ' Display left servo pulse entered in the Debug Terminal[/color]
  [color=#020FC0]SEROUT[/color][color=#000000] TX[/color][color=#000000], Baud, [noparse][[/noparse][/color][color=#000080]DEC[/color][color=#000000] pulseLeft][/color]
 
[color=#008000]  ' Prompt user for right servo pulse width[/color]
  [color=#020FC0]SEROUT[/color][color=#000000] TX[/color][color=#000000], Baud, [noparse][[/noparse] [/color][color=#800080]CR[/color][color=#000000], [/color][color=#ff0000]"Enter right servo"[/color][color=#000000],[/color]
                       [color=#ff0000]"pulse width: "[/color][color=#000000]][/color]
 
[color=#008000]  ' Receive right servo pulse width from PC[/color]
  [color=#020FC0]SERIN[/color][color=#000000]  RX, Baud, [noparse][[/noparse][/color][color=#000080]DEC[/color][color=#000000] pulseRight][/color]
[color=#008000]  ' Display right servo pulse width in the Debug Terminal[/color]
  [color=#020FC0]SEROUT[/color][color=#000000] TX[/color][color=#000000], Baud, [noparse][[/noparse][/color][color=#000080]DEC[/color][color=#000000] pulseRight][/color]
 
[color=#008000]  ' All data necessary has been recieved,[/color]
  [color=#020FC0]SEROUT[/color][color=#000000] TX, Baud, [noparse][[/noparse][/color][color=#800080]CR[/color][color=#000000], [/color][color=#ff0000]"Executing..."[/color][color=#000000]][/color]
 
  [color=#020FC0]FOR[/color][color=#000000] counter = 1 [/color][color=#020FC0]TO[/color][color=#000000] pulseCnt[/color]
    [color=#020FC0]PULSOUT[/color][color=#000000] 13, pulseLeft[/color]
    [color=#020FC0]PULSOUT[/color][color=#000000] 12, pulseRight[/color]
    [color=#020FC0]PAUSE[/color][color=#000000] 20[/color]
  [color=#020FC0]NEXT[/color]
[color=#020FC0]LOOP[/color]


How TerminalBoeBotControl.bs2 Works

Much like TestBluetoothConnection.bs2, this program receives data from the PC and then sends that information to the BASIC Stamp for processing.· First the user is prompted for information by a string sent from the Easy Bluetooth module.
·
SEROUT TX, BAUD, [noparse][[/noparse]CR, CR, "Enter number of pulses: "]
·
The SERIN command is then used to retrieve a decimal value from the user and store it to the proper variable (pulseCnt, pulseLeft, or pulseRight), and the SEROUT command displays what the user entered.
·
SERIN· RX, Baud, [noparse][[/noparse]DEC pulseLeft]
SEROUT TX, Baud, [noparse][[/noparse]DEC pulseLeft]
·
Once all the values have been gathered, the BASIC Stamp on the Boe-Bot uses the values in each variable to move the Boe-Bot according to the user’s input.
·
FOR counter = 1 TO pulseCnt
· PULSOUT 13, pulseLeft
· PULSOUT 12, pulseRight
· PAUSE 20
NEXT

Control the Boe-Bot Using Your Keyboard

Included in the Easy Bluetooth Documentation v1.1 is sample code to control your Boe-Bot using a GUI interface from RoboTech SRL (the manufacturer of the RoboTech RBT-001 Bluetooth serial module, used on the Easy Bluetooth Module). This application allows you to control your Boe-Bot using the arrow keys on your keyboard.· We can also accomplish the same thing using the same ideas introduced in TerminalBoeBotControl.bs2, the Debug Terminal, and the numerical pad or the letters “awdx” on a keyboard.· Figure 4 shows the layout of each set of keys and what movement they control.
·
Figure 4 – Keyboard Movement
attachment.php?attachmentid=60837
Enter and run TerminalBoeBotControl_Keypad.bs2 and:

······· Verify that your Boe-Bot moves in the correct direction according to Figure 4
······· An arrow is displayed in the Debug Terminal depicting which direction the Boe-Bot is moving

[color=#008000]' TerminalBoeBotControl_Keypad.bs2[/color]
[color=#008000]' Moves the Boe-Bot based on the numbers 2, 4, 6, 8 or the[/color]
[color=#008000]' letters A, W, D, X.[/color]
 
[color=#008000]' {$STAMP BS2}[/color]
[color=#008000]' {$PBASIC 2.5}[/color]
 
[color=#000000]RX             PIN     2         [/color][color=#008000]' RX of the Easy Bluetooth[/color]
[color=#000000]TX             PIN     0         [/color][color=#008000]' TX of the Easy Bluetooth[/color]
[color=#000000]ltServo        PIN     13        [/color][color=#008000]' Left Servo Pin[/color]
[color=#000000]rtServo        PIN     12        [/color][color=#008000]' Right Servo Pin[/color]
 
[color=#000000]FwdLtFast      CON     850       [/color][color=#008000]' Left servo forward full speed[/color]
[color=#000000]BwdLtFast      CON     650       [/color][color=#008000]' Left servo backward full speed[/color]
[color=#000000]FwdRtFast      CON     650       [/color][color=#008000]' Right servo forward full speed[/color]
[color=#000000]BwdRtFast      CON     850       [/color][color=#008000]' Right servo backward full speed[/color]
 
[color=#000000]Baud           CON     84        [/color][color=#008000]' Baud set at 9600[/color]
 
[color=#000000]myByte         VAR     Byte      [/color][color=#008000]' Byte to establish connection[/color]
[color=#000000]index          VAR     Word      [/color][color=#008000]' READ index/character storage[/color]   
[color=#000000]character      VAR     Word[/color]
[color=#000000]dirChar        VAR     Word      [/color][color=#008000]' Stores directional character[/color]
 
[color=#020FC0]DATA[/color] [color=#800080]CLS[/color][color=#000000],[/color]
[color=#ff0000]"              "[/color][color=#000000], [/color][color=#800080]CR[/color][color=#000000],           [/color][color=#008000] ' 14[/color]
[color=#ff0000]"              "[/color][color=#000000], [/color][color=#800080]CR[/color][color=#000000],            [/color][color=#008000]' 28[/color]
[color=#ff0000]"       |      "[/color][color=#000000], [/color][color=#800080]CR[/color][color=#000000],            [/color][color=#008000]' 42[/color]
[color=#ff0000]"     --o--    "[/color][color=#000000], [/color][color=#800080]CR[/color][color=#000000],            [/color][color=#008000]' 56[/color]
[color=#ff0000]"       |      "[/color][color=#000000], [/color][color=#800080]CR[/color][color=#000000],            [/color][color=#008000]' 70[/color]
[color=#ff0000]"              "[/color][color=#000000], [/color][color=#800080]CR[/color][color=#000000],            [/color][color=#008000]' 84[/color]
[color=#ff0000]"              "[/color][color=#000000], [/color][color=#800080]CR[/color]             [color=#008000]' 98[/color]
 
[color=#020FC0]PAUSE[/color][color=#000000] 250                       [/color][color=#008000] ' Waits 1/4 second[/color]
[color=#020FC0]SERIN[/color][color=#000000] RX, Baud, [noparse][[/noparse]myByte]         [/color][color=#008000]' Waiting for byte[/color]
[color=#000000]myByte = 0                       [/color][color=#008000]' Clear the byte value[/color]
 
[color=#008000]' Display background[/color]
[color=#020FC0]FOR[/color][color=#000000] index = 0 [/color][color=#020FC0]TO[/color][color=#000000] 99[/color]
  [color=#020FC0]READ[/color][color=#000000] index, character[/color]
  [color=#020FC0]SEROUT[/color][color=#000000] TX[/color][color=#000000], Baud, [noparse][[/noparse]character][/color]
[color=#020FC0]NEXT[/color]
 
[color=#008000]' Let user know the program is running[/color]
[color=#020FC0]SEROUT[/color][color=#000000] TX, BAUD, [noparse][[/noparse][/color][color=#800080]CR[/color][color=#000000], [/color][color=#800080]CR[/color][color=#000000], "Program Running..."][/color]
 
[color=#020FC0]DO[/color]
  [color=#008000]' Recieve character from the PC[/color]
  [color=#020FC0]SERIN[/color][color=#000000] RX, Baud, [noparse][[/noparse]dirChar][/color]
 
  [color=#020FC0]IF[/color][color=#000000] (dirChar = [/color][color=#ff0000]"8"[/color][color=#000000]) OR (dirChar = [/color][color=#ff0000]"w"[/color][color=#000000]) [/color][color=#020FC0]THEN[/color]
    [color=#020FC0]GOSUB[/color][color=#000000] Forward[/color]
  [color=#020FC0]ELSEIF[/color][color=#000000] (dirChar = [/color][color=#ff0000]"2"[/color][color=#000000]) OR (dirChar = [/color][color=#ff0000]"x"[/color][color=#000000]) [/color][color=#020FC0]THEN[/color]
    [color=#020FC0]GOSUB[/color][color=#000000] Backward[/color]
  [color=#020FC0]ELSEIF[/color][color=#000000] (dirChar = [/color][color=#ff0000]"4"[/color][color=#000000]) OR (dirChar = [/color][color=#ff0000]"a"[/color][color=#000000]) [/color][color=#020FC0]THEN[/color]
    [color=#020FC0]GOSUB[/color][color=#000000] Left[/color]
  [color=#020FC0]ELSEIF[/color][color=#000000] (dirChar = [/color][color=#ff0000]"6"[/color][color=#000000]) OR (dirChar = [/color][color=#ff0000]"d"[/color][color=#000000]) [/color][color=#020FC0]THEN[/color]
    [color=#020FC0]GOSUB[/color][color=#000000] Right[/color]
  [color=#020FC0]ENDIF[/color]
[color=#020FC0]LOOP[/color]
 
[color=#000000]Forward:[/color]
  [color=#020FC0]SEROUT[/color][color=#000000] TX, BAUD, [noparse][[/noparse][/color][color=#800080]CRSRXY[/color][color=#000000], 7, 0, [/color][color=#ff0000]"*"[/color][color=#000000], [/color][color=#800080]CRSRXY[/color][color=#000000], 6, 1, [/color][color=#ff0000]"*"[/color][color=#000000], [/color][color=#800080]CRSRXY[/color][color=#000000], 8, 1, [/color][color=#ff0000]"*"[/color][color=#000000]][/color]
  [color=#020FC0]PULSOUT[/color][color=#000000] ltServo, FwdLtFast[/color]
  [color=#020FC0]PULSOUT[/color][color=#000000] rtServo, FwdRtFast[/color]
  [color=#020FC0]PAUSE[/color][color=#000000] 20[/color]
  [color=#020FC0]SEROUT[/color][color=#000000] TX, BAUD, [noparse][[/noparse][/color][color=#800080]CRSRXY[/color][color=#000000], 7, 0, [/color][color=#ff0000]" "[/color][color=#000000], [/color][color=#800080]CRSRXY[/color][color=#000000], 6, 1, [/color][color=#ff0000]" "[/color][color=#000000], [/color][color=#800080]CRSRXY[/color][color=#000000], 8, 1, [/color][color=#ff0000]" "[/color][color=#000000]][/color]
[color=#020FC0]RETURN[/color]
 
[color=#000000]Backward:[/color]
  [color=#020FC0]SEROUT[/color][color=#000000] TX, BAUD, [noparse][[/noparse][/color][color=#800080]CRSRXY[/color][color=#000000], 7, 6, [/color][color=#ff0000]"*"[/color][color=#000000], [/color][color=#800080]CRSRXY[/color][color=#000000], 6, 5, [/color][color=#ff0000]"*"[/color][color=#000000], [/color][color=#800080]CRSRXY[/color][color=#000000], 8, 5, [/color][color=#ff0000]"*"[/color][color=#000000]][/color]
  [color=#020FC0]PULSOUT[/color][color=#000000] ltServo, BwdLtFast[/color]
  [color=#020FC0]PULSOUT[/color][color=#000000] rtServo, BwdRtFast[/color]
  [color=#020FC0]PAUSE[/color][color=#000000] 20[/color]
  [color=#020FC0]SEROUT[/color][color=#000000] TX, BAUD, [noparse][[/noparse][/color][color=#800080]CRSRXY[/color][color=#000000], 7, 6, [/color][color=#ff0000]" "[/color][color=#000000], [/color][color=#800080]CRSRXY[/color][color=#000000], 6, 5, [/color][color=#ff0000]" "[/color][color=#000000], [/color][color=#800080]CRSRXY[/color][color=#000000], 8, 5, [/color][color=#ff0000]" "[/color][color=#000000]][/color]
[color=#020FC0]RETURN[/color]
 
[color=#000000]Left:[/color]
  [color=#020FC0]SEROUT[/color][color=#000000] TX, BAUD, [noparse][[/noparse][/color][color=#800080]CRSRXY[/color][color=#000000], 3, 3, [/color][color=#ff0000]"*"[/color][color=#000000], [/color][color=#800080]CRSRXY[/color][color=#000000], 4, 2, [/color][color=#ff0000]"*"[/color][color=#000000], [/color][color=#800080]CRSRXY[/color][color=#000000], 4, 4, [/color][color=#ff0000]"*"[/color][color=#000000]][/color]
  [color=#020FC0]PULSOUT[/color][color=#000000] ltServo, FwdRtFast[/color]
  [color=#020FC0]PULSOUT[/color][color=#000000] rtServo, FwdRtFast[/color]
  [color=#020FC0]PAUSE[/color][color=#000000] 20[/color]
  [color=#020FC0]SEROUT[/color][color=#000000] TX, BAUD, [noparse][[/noparse][/color][color=#800080]CRSRXY[/color][color=#000000], 3, 3, [/color][color=#ff0000]" "[/color][color=#000000], [/color][color=#800080]CRSRXY[/color][color=#000000], 4, 2, [/color][color=#ff0000]" "[/color][color=#000000], [/color][color=#800080]CRSRXY[/color][color=#000000], 4, 4, [/color][color=#ff0000]" "[/color][color=#000000]][/color]
[color=#020FC0]RETURN[/color]
 
[color=#000000]Right:[/color]
  [color=#020FC0]SEROUT[/color][color=#000000] TX, BAUD, [noparse][[/noparse][/color][color=#800080]CRSRXY[/color][color=#000000], 11, 3, [/color][color=#ff0000]"*"[/color][color=#000000], [/color][color=#800080]CRSRXY[/color][color=#000000], 10, 2, [/color][color=#ff0000]"*"[/color][color=#000000], [/color][color=#800080]CRSRXY[/color][color=#000000], 10, 4, [/color][color=#ff0000]"*"[/color][color=#000000]][/color]
  [color=#020FC0]PULSOUT[/color][color=#000000] ltServo, FwdLtFast[/color]
  [color=#020FC0]PULSOUT[/color][color=#000000] rtServo, FwdLtFast[/color]
  [color=#020FC0]PAUSE[/color][color=#000000] 20[/color]
  [color=#020FC0]SEROUT[/color][color=#000000] TX, BAUD, [noparse][[/noparse][/color][color=#800080]CRSRXY[/color][color=#000000], 11, 3, [/color][color=#ff0000]" "[/color][color=#000000], [/color][color=#800080]CRSRXY[/color][color=#000000], 10, 2, [/color][color=#ff0000]" "[/color][color=#000000], [/color][color=#800080]CRSRXY[/color][color=#000000], 10, 4, [/color][color=#ff0000]" "[/color][color=#000000]][/color]
[color=#020FC0]RETURN[/color]


__________________________________________________ ___________________________
··
(c) 2009·by Parallax Inc - all rights reserved.··

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jessica Uelmen
Education Department
Parallax Inc.

Post Edited (Jessica Uelmen (Parallax)) : 8/25/2010 6:27:25 PM GMT
198 x 43 - 2K
414 x 389 - 42K
351 x 318 - 22K
548 x 236 - 12K
727 x 213 - 35K
727 x 96 - 15K
727 x 96 - 15K
Allons-y!
--
@jessicauelmen

Comments

  • 25 Comments sorted by Date Added Votes
  • Jessica UelmenJessica Uelmen Posts: 490
    edited May 2009 Vote Up0Vote Down
    Reserved for attachments...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jessica Uelmen
    Education Department
    Parallax, Inc.
    Allons-y!
    --
    @jessicauelmen
  • Rob7Rob7 Posts: 275
    edited May 2009 Vote Up0Vote Down
    Jessica,
    Thank you for taking the time to write and test such a popular area of discussion for many parallax users, not just in the stamp in Class but also in the Robotics section.
    I have seen many post's in the past just on this area alone with many members not really sure in witch direction to go, or even how to start it.
    Thank you again,
    Rob7
  • WhitWhit Posts: 3,719
    edited May 2009 Vote Up0Vote Down
    This looks really good Jessica. Thanks!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Whit+


    "We keep moving forward, opening new doors, and doing new things, because we're curious and curiosity keeps leading us down new paths." - Walt Disney
    Whit+

    "We keep moving forward, opening new doors, and doing new things, because we're curious and curiosity keeps leading us down new paths." - Walt Disney
  • Jessica UelmenJessica Uelmen Posts: 490
    edited May 2009 Vote Up0Vote Down
    Thanks for the feedback! I'm glad it's helpful! [noparse]:)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jessica Uelmen
    Education Department
    Parallax, Inc.
    Allons-y!
    --
    @jessicauelmen
  • treborz17treborz17 Posts: 76
    edited May 2009 Vote Up0Vote Down
    Jessica,

    Thanks, great project.· Nice to have everything that is needed readily identified -- your article is exceptional.·

    I still have two EmbeddedBlue Transceivers #30068.· Would there be a lot of changes in the source code to use these modules, and/or can they communicate with the Easy Bluetooth modules,·of which·I also plan to use?

    Thanks,

    Robert
  • Jessica UelmenJessica Uelmen Posts: 490
    edited May 2009 Vote Up0Vote Down
    Hi Robert,

    There are a few changes to the source code to use it with the eb500, but not many. Andy actually posted an article for that module back in December, and you can see it here.

    As for communication, it is possible, since they're both Bluetooth enabled. You will have to set one to be in search mode, which isn't the easiest thing in the world, but it can be done. I'm hoping to do a future Project of the Week demonstrating this, but we'll see what time allows.

    Jessica

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jessica Uelmen
    Education Department
    Parallax, Inc.
    Allons-y!
    --
    @jessicauelmen
  • Alex-VIIAlex-VII Posts: 8
    edited June 2010 Vote Up0Vote Down
    Hi,

    I could implement the "Control the Boe-Bot Using Your Keyboard" TerminalBoeBotControl_Keypad.bs2 code on my Boe-Bot. So I can run Boe-Bot via Easy Bluetooth Module, wirelessly.

    Now I am trying to improve the code. I want that Boe Bot begins to move gradually increasing speed. Here is the code. It works fine.

    It is easier and more precise to drive Boe-Bot remotely if it is increasing speed gradually while moving forward, backward, and making turns. And I've read in the book "Robotics with the Boe-Bot" by Andy Lindsay that it also saves batteries' energy and prolongs servos' life.

    If one wants that Boe-Bot starts to move gradually increasing speed it is necessary to press "space" on the keyboard between "w"-forward, "x"-backward, "a"-left, "d"-right. If one wants that Boe-Bot starts to move at the highest possible speed just do not press "space" in-between.

    ' TerminalBoeBotControl_Keypad.bs2
    
    ' Moves the Boe-Bot based on the numbers 2, 4, 6, 8 or the
    
    ' letters A, W, D, X.
    
    ' modification of the original code by Alex-VII: pressing "space" resets starting speed to zero (750) and Boe-Bot starts to move gradually increasing speed.
    
    
    
    ' {$STAMP BS2}
    
    ' {$PBASIC 2.5}
    
    FREQOUT 4, 200, 3000
    
    
    RX             PIN     2         ' RX of the Easy Bluetooth
    
    TX             PIN     0         ' TX of the Easy Bluetooth
    
    ltServo        PIN     13        ' Left Servo Pin
    
    rtServo        PIN     12        ' Right Servo Pin
    
    
    FwdLtFast      CON     850       ' Left servo forward full speed
    
    BwdLtFast      CON     650       ' Left servo backward full speed
    
    FwdRtFast      CON     650       ' Right servo forward full speed
    
    BwdRtFast      CON     850       ' Right servo backward full speed
    
    Baud           CON     84        ' Baud set at 9600
    
    
    
    myByte         VAR     Byte      ' Byte to establish connection
    
    index          VAR     Word      ' READ index/character storage
    
    character      VAR     Word
    
    
    dirChar        VAR     Word      ' Stores directional character
    
    SpeedIncrement CON     1
    
    FwdLt          VAR     Word
    FwdRt          VAR     Word
    BwdRt          VAR     Word
    BwdLt          VAR     Word
    
    ' setting speed first to zero in order to start moving gradually increasing speed
    
    FwdLt = 750
    FwdRt = 750
    BwdRt = 750
    BwdLt = 750
    
    
    DATA CLS,
    
    "              ", CR,            ' 14
    
    "              ", CR,            ' 28
    
    "       |      ", CR,            ' 42
    
    "     --o--    ", CR,            ' 56
    
    "       |      ", CR,            ' 70
    
    "              ", CR,            ' 84
    
    "              ", CR             ' 98
    
    
    
    PAUSE 250                        ' Waits 1/4 second
    
    SERIN RX, Baud, [noparse][[/noparse]myByte]         ' Waiting for byte
    
    myByte = 0                       ' Clear the byte value
    
    
    
    ' Display background
    
    FOR index = 0 TO 99
    
      READ index, character
    
      SEROUT TX, Baud, [noparse][[/noparse]character]
    
    NEXT
    
    
    
    ' Let user know the program is running
    
    SEROUT TX, BAUD, [noparse][[/noparse]CR, CR, "Program Running..."]
    
    
    
    DO
    
      ' Recieve character from the PC
    
      SERIN RX, Baud, [noparse][[/noparse]dirChar]
    
    
      IF (dirChar = "8") OR (dirChar = "w") THEN
    
         IF FwdLt < FwdLtFast THEN
    
            FwdLt = FwdLt + SpeedIncrement
    
          ENDIF
    
          IF FwdRt > FwdRtFast THEN
    
            FwdRt = FwdRt - SpeedIncrement
    
          ENDIF
    
          GOSUB Forward
    
    
      ELSEIF (dirChar = "2") OR (dirChar = "x") THEN
    
          IF BwdLt > BwdLtFast THEN
    
            BwdLt = BwdLt - SpeedIncrement
    
          ENDIF
    
          IF BwdRt < BwdRtFast THEN
    
            BwdRt = BwdRt + SpeedIncrement
    
          ENDIF
    
          GOSUB Backward
    
    
        ELSEIF (dirChar = "4") OR (dirChar = "a") THEN
    
          IF FwdRt > FwdRtFast THEN
    
            FwdRt = FwdRt - SpeedIncrement
    
          ENDIF
    
          GOSUB Left
    
        ELSEIF (dirChar = "6") OR (dirChar = "d") THEN
    
          IF FwdLt < FwdLtFast THEN
    
            FwdLt = FwdLt + SpeedIncrement
    
          ENDIF
    
          GOSUB Right
    
    
        ELSEIF dirChar = "b" THEN    ' sending audio beep signal to a Piezospeaker
    
             GOSUB Beep
    
        ELSEIF dirChar = " " THEN      ' resetting speed by pressing "Space" on the keyboard
    
          FwdLt = 750
    
          FwdRt = 750
    
          BwdLt = 750
    
          BwdRt = 750
    
        ENDIF
    
    LOOP
    
    
    
    Forward:
    
      SEROUT TX, BAUD, [noparse][[/noparse]CRSRXY, 7, 0, "*", CRSRXY, 6, 1, "*", CRSRXY, 8, 1, "*"]
    
      PULSOUT ltServo, FwdLt
    
      PULSOUT rtServo, FwdRt
    
      'PAUSE 20
    
      SEROUT TX, BAUD, [noparse][[/noparse]CRSRXY, 7, 0, " ", CRSRXY, 6, 1, " ", CRSRXY, 8, 1, " "]
    
    RETURN
    
    
    
    Backward:
    
      SEROUT TX, BAUD, [noparse][[/noparse]CRSRXY, 7, 6, "*", CRSRXY, 6, 5, "*", CRSRXY, 8, 5, "*"]
    
      PULSOUT ltServo, BwdLt
    
      PULSOUT rtServo, BwdRt
    
      'PAUSE 20
    
      SEROUT TX, BAUD, [noparse][[/noparse]CRSRXY, 7, 6, " ", CRSRXY, 6, 5, " ", CRSRXY, 8, 5, " "]
    
    RETURN
    
    
    
    Left:
    
      SEROUT TX, BAUD, [noparse][[/noparse]CRSRXY, 3, 3, "*", CRSRXY, 4, 2, "*", CRSRXY, 4, 4, "*"]
    
      PULSOUT ltServo, FwdRt
    
      PULSOUT rtServo, FwdRt
    
      'PAUSE 20
    
      SEROUT TX, BAUD, [noparse][[/noparse]CRSRXY, 3, 3, " ", CRSRXY, 4, 2, " ", CRSRXY, 4, 4, " "]
    
    RETURN
    
    
    
    Right:
    
      SEROUT TX, BAUD, [noparse][[/noparse]CRSRXY, 11, 3, "*", CRSRXY, 10, 2, "*", CRSRXY, 10, 4, "*"]
    
      PULSOUT ltServo, FwdLt
    
      PULSOUT rtServo, FwdLt
    
      'PAUSE 20
    
      SEROUT TX, BAUD, [noparse][[/noparse]CRSRXY, 11, 3, " ", CRSRXY, 10, 2, " ", CRSRXY, 10, 4, " "]
    
    RETURN
    
    
    Beep:
    
        ' Piezospeaker on Pin 4
        FREQOUT 4, 300, 1500
    
        FREQOUT 4, 300, 2000
    
    RETURN
    
    
    

    Post Edited (Alex-VII) : 6/10/2010 3:46:52 PM GMT
  • Jessica UelmenJessica Uelmen Posts: 490
    edited June 2010 Vote Up0Vote Down
    Hi Alex-VII,

    So glad to see you're improving on the code, and your code looks great! And good call catching the unnecessary counter variable, I must have added it for some reason and then forgot to remove it, I'll remove it now!

    I think the issue might be as simple as needing to reset the FwdLt, FwdRt, BwdLt, and BwdRt within your IF...THEN statements. Currently, it looks like you've got them reversed - the Bwd's are reset to 750 in the Fwd statement and the Fwd's are reset to 750 in the Bwd statement.

    This seems like it would be the most simple solution, but I haven't tried it out. If it doesn't work, let me know, I've got some other ideas too. :]

    -- Jess

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jessica Uelmen
    Education Department
    Parallax Inc.
    Allons-y!
    --
    @jessicauelmen
  • Alex-VIIAlex-VII Posts: 8
    edited June 2010 Vote Up0Vote Down
    Hi Jessica,

    I think by now that pressing "space" on the keyboard between movements is a useful feature, not a bug.

    Because, now there is a choice, if I want that the next move starts at the highest speed, I just do not press "space" on the keyboard in-between.

    But if I want that Boe-Bots starts the next move gradually increasing speed I press "space" button on the keyboard, sending a blank space character via bluetooth connection to Boe-Bot's program, and Boe-Bots is gradually increasing speed.

    I've changed my modification of your code above, so that the only way to reset starting speed to zero (750) is to press "space".

    I've encountered and solved one more issue, which at first puzzled me, with the bluetooth navigation via Debug window. I had to make the keyboard's "Repeat delay" longer and "Repeat rate" slower at the control panel on my laptop. Otherwise the bluetooth connection was sometimes "overwhelmed" with large amount of characters to be transmitted.

    I also noticed that if I comment out "PAUSE 20' then Boe-Bot moves faster and more smoothly, almost like via the GUI navigation. But I am not sure if it is safe not to use "PAUSE 20" in subs for servos. I've read in some post at this forum that "PAUSE 20" must always be used, however in code "Easy Bluetooth PBASIC.bs2" (http://www.parallax.com/Portals/0/Downloads/docs/prod/comm/30085_EasyBluetoothPBASIC.zip ), which comes with GUI for Easy Bluetooth Module "PAUSE 20" is not used.

    I guess the role of "PAUSE 20" is played here by a delay of the character transmission via bluetooth connection.

    Post Edited (Alex-VII) : 6/9/2010 1:56:02 PM GMT
  • supralovasupralova Posts: 2
    edited June 2010 Vote Up0Vote Down
    hi all,
    I also use Easy Bluetooth
    But I use ATMEGA8535
    And uses two DC motors to control the wheels and a servo motor to control the camera.
    Can you all help me in this program
    so that I can control this robot with the keyboard on my laptop
    I've tried many times but failed
    I am a beginner, I use Code Vision AVR
    Thank you for your attention ..
  • FranklinFranklin Posts: 4,747
    edited June 2010 Vote Up0Vote Down
    @supralova This is a Parallax forum and as such we can help with the Parallax parts and programming. I would recommend the CodeVision or avr forums for help with those items. Easy Bluetooth questions we can answer. At least somebody here can.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • sws325sws325 Posts: 1
    edited July 2010 Vote Up0Vote Down
    Hi, i may· need some of your advices...

    I wrote a PC-based·program (OS: windows xp) to remotely control the Boe-Bot with EmbeddedBlue Transceiver ApMod.
    The robot receives commands sent from PC and moves as expected. (ex. forward, backward, leftturn and rightturn)
    If EmbeddedBlue Transceiver ApMod is replaced by·my new Easy Bluetooth module, some problems occurred regarding to robot motion.
    Below listed are my codes in robot, "leftSpeedW" and "rightSpeedW" are values sent from PC to control two wheels.
    If i keep sending 20, 20 for these two values, the Debug window·should always·show 2020.
    However, sometime i got results as:
    2020
    2020
    2020
    520
    2020
    020
    205

    If i switch back to EmbeddedBlue Transceiver ApMod , this issue disappear.
    Any suggestions!!

    ' {$STAMP BS2}
    ' {$PBASIC 2.5}
    leftSpeedW VAR Word
    rightSpeedW VAR Word
    durationW VAR Word
    baudmodeW VAR Word
    pulseCountW VAR Word
    directionW VAR Word
    calibRightW VAR Word
    calibLeftW VAR Word
    baudmodeW=84
    durationW=5
    'More positive is more backwards, more negative is more forwards
    calibRightW=0
    calibLeftW=34
    ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
    'This is the main function body
    '
    ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
    Main:
    DO
    · 'Wait for the command string for this boebot
    · SERIN 2, baudmodeW, [noparse][[/noparse]WAIT("CMD"), SDEC leftSpeedW, SDEC rightSpeedW]
    · DEBUG SDEC leftSpeedW, SDEC rightSpeedW, CR
    · 'Control the robot
    · FOR pulseCountW = 1 TO durationW
    ··· PULSOUT 13, 750 + leftSpeedW + calibLeftW
    ··· PULSOUT 12, 750 - rightSpeedW + calibRightW
    ··· PAUSE 20
    · NEXT
    LOOP
  • Cactus MasterCactus Master Posts: 1
    edited January 2012 Vote Up0Vote Down
    I'm having a problem with the program. Irregardless of what I do, when I press a key, all the robot does is move forward. Anyone know what the issue is?
    Thanks in advance.
  • Jessica UelmenJessica Uelmen Posts: 490
    edited January 2012 Vote Up0Vote Down
    Hi Cactus Master, welcome to the forums!

    Could you attach the code you're using or include it inline with your reply using [ code ] [ /code ] tags (remove the spaces)? It will help us get a better understanding of what's going wrong.

    Cheers,
    Jessica
    Allons-y!
    --
    @jessicauelmen
  • eslameslam Posts: 2
    edited January 2012 Vote Up0Vote Down
    @jessica Uelmen
    i'am using the easy bluetooth module in my simple project as same as yours but i got a simple problem is that when i send a string to the bluetooth it resends me the same string i had sent and strange characters in addition....!! what in your opinion that could be ??? and how could i solve this problem ??
  • Jessica UelmenJessica Uelmen Posts: 490
    edited February 2012 Vote Up0Vote Down
    Hi eslam,

    Make sure the baud rate in the Debug Terminal is set to 9600. Could you also attach your code, just so we can double check?

    Cheers,
    Jessica
    Allons-y!
    --
    @jessicauelmen
  • spruilldaspruillda Posts: 1
    edited March 2012 Vote Up0Vote Down
    I'm trying to create a system with 5 robots that all need to communicate over bluetooth with the easy Bluetooth Module. I can get two robots to talk to each other via pairing, but how would I go about setting up a network of robots?
  • heba ahmedheba ahmed Posts: 4
    edited August 2012 Vote Up0Vote Down
    Jessica,
    I want to know if can i send data to the Bluetooth from 4 BC in the same time ?
    if it is yes . how can i do this ?
  • Mike GreenMike Green Posts: 22,577
    edited August 2012 Vote Up0Vote Down
    @spruillda (I know this is an old message) ... You can't build networks like that with Bluetooth. Bluetooth was designed originally for a PC-based master and relatively low speed clients with many clients paired with one master. For networks, you could use xBee ZigBee Series 2 modules. You'll have to download and look at Digi's documentation on the Series 2 modules for details on how to configure such a network. Parallax's documentation focuses on the Series 1 modules which only do pairing.

    @heba ahmed ... You'll have to provide more information. What do you mean by "4 BC"? If you mean "How do I send data from 4 devices to one central controller over Bluetooth?", see my comments above. You can have four Easy Bluetooth Modules, all paired with the same PC, and you can write a program that will talk with one Module at a time, but rapidly so all of them are serviced as fast as they can send the data.
  • heba ahmedheba ahmed Posts: 4
    edited August 2012 Vote Up0Vote Down
    @Mike Green ....




    Thank you very much for answering ...
    . yes this exactly what I mean ."How do I send data from 4 devices to one central controller over Bluetooth?".....
    I have a movable robot in an area and I want to send to it its position via Bluetooth. This position is known through four cameras each one connected to a laptop .....
    four Easy Bluetooth Modules will be too much.


    IS xBee ZigBee Series 2 appropriate solution for me ?.
  • Mike GreenMike Green Posts: 22,577
    edited August 2012 Vote Up0Vote Down
    Here's a Wikipedia article on the ZigBee protocol. This is what the Series 2 modules do. There's one central coordinator which could be the BoeBot and you would have 4 end devices which would be attached to the laptops. The laptops would send the position information and each message would contain the network address of the message sender. The BoeBot would see the sender's address, so it would know where the position information is coming from.

    This could be done with Series 1 devices, but the BoeBot would have to connect to the laptops one at a time and request the current position from the laptop.

    Note that you could also use the WiFly modules which provide a serial connection using WiFi. The laptops could use UDP messages sent to the BoeBot, each containing the position information. Like the Series 2 devices, these would contain the network addresses of the sender, so the BoeBot could tell who sent it. These have the advantage that most laptops have WiFi transceivers built-in and the only device you'd need would be on the BoeBot. Parallax's xBee adapters work with the WiFly modules.
  • heba ahmedheba ahmed Posts: 4
    edited August 2012 Vote Up0Vote Down
    OK,
    Thank’s very much for your time . I read about ZigBee .It is very good for my robot ,but I still have a small problem . I don’t know how to connect laptop or the camera to it as an end device .
    I didn't find any thing in internet explain how can I do this .
  • Mike GreenMike Green Posts: 22,577
    edited August 2012 Vote Up0Vote Down
    Parallax and others make adapter boards like this one. That provides a socket for the xBee module and a USB interface that plugs directly into your PC. The xBee module appears as a COM port to your PC.

    Parallax's adapter comes with socket pins that you can solder into the adapter if you want access to the xBee module's pins from a breadboard. You don't need to use these if all you're going to do is hook the xBee module to your PC.

    You will need to write a program or modify an existing program that gets the data from the camera, processes it, and formats messages to send to the xBee module to be transmitted to the BoeBot. We can't help you with that. You'll have to learn the details of the ZigBee protocol for that.
  • heba ahmedheba ahmed Posts: 4
    edited August 2012 Vote Up0Vote Down
    Thank’s very much I realy appreciate your support ....
Sign In or Register to comment.