loading
 
bluetooth boe bot
Tom Amara  [13 posts]
10 years
is it possible to use Roborealm software with Parallax eb500 bluetooth module.
Anonymous 10 years
Yes, but we can't say for 100% sure since we don't have that device. It appears that with this device and an RS232 connector you are just talking serial across the device to another hardware component. Using the serial module you should be able to create a protocol to that other hardware device over the bluetooth connection. This assumes that you are using the RS232 protocol.

Does that match with what you were thinking?

STeven.
Tom Amara  [13 posts] 10 years
Hi Steven,
I am new to this, but I am pretty sure thats the way it works. It does work with MSRS but I would hate to sacrafice myself to Microsoft. I really enjoy using Roborealm with my wired servo controller even though I know very little about programming. My Boe Bot has 4 sevros ( 2 pan and tilt and 2 drive wheel ). I would love to have my boe track and follow a colored ball. Can you point me to any code or a code for dummies tutorial :-)
tom
Tom Amara  [13 posts] 10 years
Hi Again,
One of the features listed for eb500 is Simple serial UART communications and control.
tom
Tom Amara  [13 posts] 10 years
These Boe Bot pan and tilt addons are screaming for Roborealm. I plan on putting these into production. There are a kazillion boe bots out there. I think everyone who would buy this addon would love Roborealm software.

Anonymous 10 years
Tom,

Sounds great! Perhaps the best way for you to get started is to have a look at the green ball following tutorial at http://www.roborealm.com/tutorial/color_object_tracking_2/slide010.php

The part that is missing is the protocol between the PC (over the wireless connection) to the hardware on the other side. We are not familiar with the Boe Bot protocol. Does the serial connection interface with a hardware board on the Boe Bot ... is this hardware running your custom program or a program provided by Parallax? Does it have an interface language that will understand certain serial commands to move the motors? If so we can add in a Boe Bot module to drive the Bot Bot in a nicer way that using the more generic serial module.

Let us know ...

FYI, way cool robot!! :-)

STeven.

Tom Amara  [13 posts] 10 years
Hi Steven,
Here is some code that does what I want on the boe bot side. It was written for the bs2 and the eb500 bluetooth adapter.The person who wrote it ( Stuart Weightman ) used StampPlot V3 on the PC side. If we could use Roborealm on the PC side it would be the most fantastic  Boe Bot software ever. Hope this helps. Also there is a manual for the eb500 here http://www.parallax.com/dl/docs/prod/comm/eb500UserManual.pdf

'{$STAMP BS2} Bluetooth GUI control of tracked vehicle Stuart Weightman 2005
' **** StampPlot control/interface with Bluetooth EB500 and Basic Stamp2****
' **** Pins 10 through to 19 are available for I/O, sounder on P11, SSC on P10 ****
INPUT 5 'EB500 I/O Line 5 provides the connection status
PAUSE 1000 'Wait for the eb500 radio to be ready
WaitForConnection:
SEROUT 10,$4054,[255,0,127] 'Set Left servo0 to stop, mid position
SEROUT 10,$4054,[255,2,127] 'Set Right servo1 to stop, mid position
IF IN5 = 0 THEN WaitForConnection
GOSUB Beep1 'Beep when connected and continue
Eb500
Bluetooth adapter
Parallax BOE
Basic stamp II
Serial
Servo
controller
Dual motor
speed
controller
M1
M2
PC,
StampPlot,
& Camera
display
Wireless
camera
Servo pan
Servo tilt
Bluetooth
adapter
PAN VAR Byte
TILT VAR Byte
EStop VAR Bit
FF VAR Bit
FS VAR Bit
BS VAR Bit
BF VAR Bit
FR VAR Bit
FL VAR Bit
BR VAR Bit
BL VAR Bit
SR VAR Bit
SL VAR Bit
L VAR Byte
R VAR Byte
XL VAR Byte
XR VAR Byte
Main:
IF IN5 = 0 THEN WaitForConnection 'If Bluetooth connection is lost then wait to re-establish
SEROUT 1,84,["!READ (PAN)",CR] 'Read StampPlot PAN slider
SERIN 0,84,1000,Main,[SDEC PAN] 'Accept returning data
SEROUT 10,$4054,[255,4,PAN] 'Scaled output to SSCI servo4 (needs baud $4054 not 84)
SEROUT 1,84,["!READ (TILT)",CR] 'Read StampPlot TILT slider
SERIN 0,84,1000,Main,[SDEC TILT] 'Accept returning data
SEROUT 10,$4054,[255,6,TILT] 'Scaled output to SSCI servo6 (needs baud $4054 not 84)
SEROUT 1,84,["!READ (EStop)",CR] 'Request status (1/0) of STOP checkbox
SERIN 0,84,1000,Main,[DEC EStop] 'Store returning data
IF EStop = 1 THEN EmgStop
SEROUT 1,84,["!READ (FF)",CR] 'Request status (1/0) of checkbox
SERIN 0,84,1000,Main,[DEC FF] 'Store returning data
IF FF = 1 THEN Forwfast
SEROUT 1,84,["!READ (FS)",CR] 'Request status (1/0) of checkbox
SERIN 0,84,1000,Main,[DEC FS] 'Store returning data
IF FS = 1 THEN ForwSlow
SEROUT 1,84,["!READ (BS)",CR] 'Request status (1/0) of checkbox
SERIN 0,84,1000,Main,[DEC BS] 'Store returning data
IF BS = 1 THEN BackSlow
SEROUT 1,84,["!READ (BF)",CR] 'Request status (1/0) of checkbox
SERIN 0,84,1000,Main,[DEC BF] 'Store returning data
IF BF = 1 THEN BackFast
SEROUT 1,84,["!READ (FR)",CR] 'Request status (1/0) of checkbox
SERIN 0,84,1000,Main,[DEC FR] 'Store returning data
IF FR = 1 THEN ForwRight
SEROUT 1,84,["!READ (FL)",CR] 'Request status (1/0) of checkbox
SERIN 0,84,1000,Main,[DEC FL] 'Store returning data
IF FL = 1 THEN ForwLeft
SEROUT 1,84,["!READ (BR)",CR] 'Request status (1/0) of checkbox
SERIN 0,84,1000,Main,[DEC BR] 'Store returning data
IF BR = 1 THEN BackRight
SEROUT 1,84,["!READ (BL)",CR] 'Request status (1/0) of checkbox
SERIN 0,84,1000,Main,[DEC BL] 'Store returning data
IF BL = 1 THEN BackLeft
SEROUT 1,84,["!READ (SR)",CR] 'Request status (1/0) of checkbox
SERIN 0,84,1000,Main,[DEC SR] 'Store returning data
IF SR = 1 THEN SpinRight
SEROUT 1,84,["!READ (SL)",CR] 'Request status (1/0) of checkbox
SERIN 0,84,1000,Main,[DEC SL] 'Store returning data
IF SL = 1 THEN SpinLeft
GOTO Main
EmgStop:
SEROUT 10,$4054,[255,0,127] 'Set Left SSCI Motor0 to stop mid position
SEROUT 10,$4054,[255,2,127] 'Set Right SSCI Motor2 to stop mid position
PAUSE 100 'Pause to view check tick
SEROUT 1,84,["!O EStop=0",CR] 'Clear the check box
GOSUB ClearChecks : GOSUB Beep2 'Clear all checks and Two beeps to acknowledge Emg stop initiated
L=127 : R=127 'L & R variables to mid stop value
GOTO Main
ForwFast:
L=255 : R=255 : GOSUB ClearChecks : GOTO Tracks
ForwSlow:
L=190 : R=190 : GOSUB ClearChecks : GOTO Tracks
BackSlow:
L=64 : R=64 : GOSUB ClearChecks : GOTO Tracks
BackFast:
L=0 : R=0 : GOSUB ClearChecks : GOTO Tracks
ForwLeft:
XL=L : XR=R 'Store in use values of L & R
L=127 : R=255
SEROUT 1,84,["!O FL=0",CR] 'Clear the check box
GOSUB TrackTimer
L=XL : R=XR 'Restore in use values of L & R
GOTO Tracks
ForwRight:
XL=L : XR=R 'Store in use values of L & R
L=255 : R=127
SEROUT 1,84,["!O FR=0",CR] 'Clear the check box
GOSUB TrackTimer
L=XL : R=XR 'Restore in use values of L & R
GOTO Tracks
BackRight:
XL=L : XR=R 'Store in use values of L & R
L=0 : R=127
SEROUT 1,84,["!O BR=0",CR] 'Clear the check box
GOSUB TrackTimer
L=XL : R=XR 'Restore in use values of L & R
GOTO Tracks
BackLeft:
XL=L : XR=R 'Store in use values of L & R
L=127 : R=0
SEROUT 1,84,["!O BL=0",CR] 'Clear the check box
GOSUB TrackTimer
L=XL : R=XR 'Restore in use values of L & R
GOTO Tracks
SpinRight:
XL=L : XR=R 'Store in use values of L & R
L=255 : R=0
SEROUT 1,84,["!O SR=0",CR] 'Clear the check box
GOSUB TrackTimer
L=XL : R=XR 'Restore in use values of L & R
GOTO Tracks
SpinLeft:
XL=L : XR=R 'Store in use values of L & R
L=0 : R=255
SEROUT 1,84,["!O SL=0",CR] 'Clear the check box
GOSUB TrackTimer
L=XL : R=XR 'Restore in use values of L & R
GOTO Tracks
Tracks:
SEROUT 10,$4054,[255,0,R] 'Output VAR R to Motor0
SEROUT 10,$4054,[255,2,L] 'Output VAR L to Motor2
GOTO Main
TrackTimer:
SEROUT 10,$4054,[255,0,R] 'Output VAR R to SSCI Motor0
SEROUT 10,$4054,[255,2,L] 'Output VAR L to SSCI Motor2
PAUSE 1000
RETURN
ClearChecks:
SEROUT 1,84,["!O FF=0",CR] : SEROUT 1,84,["!O FS=0",CR] 'Remove checks
SEROUT 1,84,["!O BF=0",CR] : SEROUT 1,84,["!O BS=0",CR] 'Remove checks
RETURN
Beep1:
FREQOUT 11,750,2500
RETURN
Beep2:
FREQOUT 11,200,2500
FREQOUT 11,200,2800
RETURN
MACRO ( Running on StampPlotPro on PC )
01-11-2005
Vehicle GUI via Bluetooth
Stuart Weightman
' **** StampPlot GUI construction ****
INIT:
!RSET
!NPSU OFF
' Set as default macro
!DEFS (ME)
!MACR .OBJECTS
' Set Queue size
!QSIZ 5185
' Set analog span
!SPAN 0, 250
' Set max time
!TMAX 120
' Set number of samples
!PNTS 2000
' Title plot
!TITL GUI Bluetooth control Macro -- Stuart Weightman
' Flush old data
!FLSH ON
!DISP D9 G2 A0 S0 B15 R
!ECHO OFF
!SETD 1,1
' Reset the plot
!RSET
' Enable plotting
!PLOT ON
' Connect port on startup
!CONN ON
ENDMAC
OBJECTS:
' Clear all objects
!POBJ Clear
' Set plot percentage
!PPER 40,40
' Background = Blue
!O oBack=(Blue)
' Create a H slider object called PAN
!O oHSlider.PAN=44.5,59,33,30,0,255,127
' Create a V slider object called TILT
!O oVSlider.TILT=40,100,10,40,0,255,127
' Create a red stop button with check box
!O oCheck.EStop=84.5,74.5,7,6,STOP,0,12,0,10
' Create check object
!O oCheck.FF=85,96,6,7,Forw Fast,8
' Tip
!O FF.tip=Both tracks forward fast
' Create check object
!O oCheck.FS=85,86,6,7,Forw Slow,8
' Tip
!O FS.tip=Both tracks forward slow
' Create check object
!O oCheck.BS=85,65,6,7,Back Slow,8
' Tip
!O BS.tip=Both tracks Backward slow
' Create check object
!O oCheck.BF=85,55,6,7,Back Fast,8
' Tip
!O BF.tip=Both tracks Backward fast
' Create check object
!O oCheck.FR=92,96,6,7,Forw Right,8
' Tip
!O FR.tip=Both tracks Forward right
' Create check object
!O oCheck.FL=78,96,6,7,Forw Left,8
' Tip
!O FL.tip=Both tracks forward left
' Create check object
!O oCheck.BL=78,55,6,7,Back Left,8
' Tip
!O BL.tip=Both tracks Backward left
' Create check object
!O oCheck.BR=92,55,6,7,Back Right,8
' Tip
!O BR.tip=Both tracks Backward right
' Create check object
!O oCheck.SR=92,75,6,7,Spin Right,8
' Tip
!O SR.tip=Both tracks Spin right
' Create check object
!O oCheck.SL=78,75,6,7,Spin Left,8
' Tip
!O SL.tip=Both tracks Spin left
ENDMAC


Thank You
Tom Amara  [13 posts] 10 years
Keep in mind that we only need to drive the 4 servos, 2 pan and tilt and the 2 drive wheel servos. I beleive Stuart had dc motors for his drive system. Also we would not need The StampPlot GUI construction part of this code. I am showing this code because it is all I could find on the net that is close to what I would like have for Roborealm.
Thanks Again
Tom
Tom Amara  [13 posts] 10 years
I forgot to mention that drive servos are continous rotation  < 750 reverse > 750 forward. The range is still 500 to 1500. There is a great manual for the Boe Bot here. http://www.parallax.com/dl/docs/books/edu/Roboticsv2_2.pdf

Tom
Tom Amara  [13 posts] 10 years
Scratch that last long bit of code. The following 2 codes say it all. the first is "monkey see" ( this would be Roborealm ) and the second "monkey do" ( this would be Boe Bot )

' **************************************************************************
' MonkeySee.bs2
' A7 Engineering, 2003-2005
'
' This program is used with a Parallax SumoBot robot and an EmbeddedBlue
' eb500 radio module.
'
' Description
' ===========
' This program demonstrates wireless communications between two eb500 radio
' modules. The program uses the infrared sensors to follow an object and
' then transmits the movement information to a BOE-Bot equipt with an eb500
' module.
'
' Instructions
' ============
' 1. Verify that the eb500 module is connected properly to the AppMod
'    header of the SumoBot robot.
' 2. Modify the connection logic to use the correct Bluetooth Address.
' 3. Compile and run this program.
'
' **************************************************************************
'{$STAMP BS2}
'I/O Line 5 provides the connection status
INPUT 5
'-----[I/O Definitions]---------------------------------------
LMotor        CON    13
RMotor        CON    12
LfIrOut        CON    4
LfIrIn        VAR    In11
RtIrOut        CON    15
RtIrIn        VAR    In14

'-----[Constants]----------------------------------------------
LFwdFast    CON    1000
LRevFast    CON    500
RFwdFast    CON    500
RRevFast    CON    1000

'-----[Variables]-----------------------------------------------
irBits        VAR    NIB
irLeft        VAR    irBits.Bit1
irRight        VAR    irBits.Bit0
lastIr        VAR    NIB
bBuffer        VAR    BYTE(4)
bErrorCode    VAR    BYTE

'-----[Initialization]------------------------------------------
'Wait for the eb500 radio to be ready
PAUSE 1000

Connect:
    'Connect to Monkey-Do
    SEROUT 1,84,["con 00:0C:84:00:07:D7",CR]
    SERIN 0,84,[WAIT("ACK",CR)]
    'Either an Err #<CR> or a ">" will be received
    SERIN 0,84,[STR bBuffer\6\">"]
    IF bBuffer(0) = "E" THEN ErrorCode

WaitForConnection:
    IF in5 = 0 THEN WaitForConnection

'-----[Main Code]-----------------------------------------------
Main:
    'Verify the connection is still up before each loop
    IF in5 = 0 THEN Connect
    GOSUB Read_IR_Sensors
    BRANCH irBits,[Hold, Turn_Right,Turn_Left,Move_Fwd]

Move_Fwd:
    SEROUT 1,84,["3"]
    PULSOUT LMotor,LFwdFast
    PULSOUT RMotor,RFwdFast
    GOTO Main

Turn_Right:
    SEROUT 1,84,["1"]
    PULSOUT LMotor,LFwdFast
    PULSOUT RMotor,RRevFast
    GOTO Main

Turn_Left:
    SEROUT 1,84,["2"]
    PULSOUT LMotor,LRevFast
    PULSOUT RMotor,RFwdFast
    GOTO Main

Hold:
    GOTO Main

'-----[Subroutines]---------------------------------------------
Read_IR_Sensors:
    FREQOUT LfIrOut,1,38500
    irLeft = ~LfIrIn
    FREQOUT RtIrOut,1,38500
    irRight = ~RtIrIn
    RETURN

BadCommand:
    DEBUG "A bad command was received."
    END

ErrorCode:
    bErrorCode = bBuffer(4)
    DEBUG "An error was received: ",STR bErrorCode,CR
    END




second  code  starts here

' **************************************************************************
' MonkeyDo.bs2
' A7 Engineering, 2003-2005
'
' This program is used with a Parallax Boe-Bot robot and an EmbeddedBlue
' eb500 radio module.
'
' Description
' ===========
' This program demonstrates wireless communications between two eb500 radio
' modules. The program waits for a connection from the remote SumoBot robot
' and then reads the movement information from the eb500 and performs the
' specified action.
'
' Instructions
' ============
' 1. Verify that the eb500 module is connected properly to the AppMod
'    header of the Boe-Bot robot.
' 2. Compile and run this program.
'
' **************************************************************************
'{$STAMP BS2}
'-----[I/O Definitions]-----------------------------------------
LMotor        CON    15
RMotor        CON    14

'-----[Constants]-----------------------------------------------
LFwdFast    CON    1000
LRevFast    CON    500
RFwdFast    CON    500
RRevFast    CON    1000

'-----[Variables]-----------------------------------------------
CmdData        VAR    BYTE

'-----[Initialization]------------------------------------------
Initialize:
    'Wait for the eb500 radio to be ready
    PAUSE 1000
    'Set the initial state to hold
    CmdData = 3

'-----[Main Code]-----------------------------------------------
Main:
    'Wait for a command
    SERIN 0,84,[DEC1 CmdData]

    'Process the command
    BRANCH CmdData,[Hold, Turn_Right, Turn_Left, Move_Fwd]

    'If the command was invalid, just loop again
    GOTO Main

Move_Fwd:
    PULSOUT LMotor,LFwdFast
    PULSOUT RMotor,RFwdFast
    GOTO Main

Turn_Right:
    PULSOUT LMotor,LFwdFast
    PULSOUT RMotor,RRevFast
    GOTO Main

Turn_Left:
    PULSOUT LMotor,LRevFast
    PULSOUT RMotor,RFwdFast
    GOTO Main

HOLD:
    GOTO Main



Thanks again
Tom


This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index