Shop OBEX P1 Docs P2 Docs Learn Events
Connecting Parallax Boe Bot with Wireless — Parallax Forums

Connecting Parallax Boe Bot with Wireless

David TanDavid Tan Posts: 12
edited 2009-01-19 05:44 in BASIC Stamp
Just wanna the confirmation from all the expert, if possible for us as the new beginner to set up the wireless connection to control the parallax boe-bot?

Thank You..>^.^<

Comments

  • sylvie369sylvie369 Posts: 1,622
    edited 2009-01-08 14:41
    Yes, if you carefully follow the wonderfully well-written instructions you'll find here:

    http://forums.parallax.com/showthread.php?p=524063

    Note that the project described there uses an accelerometer through the wireless connection to control the BoeBot. If you want to use some kind of manual control (for example, typing numbers on a keyboard using DEBUGIN), you'll need to learn a little about how to get that control into the handheld Stamp, but that's a fairly simple process that you can easily learn if you work your way through the "What's a Microcontroller?" book.
  • SRLMSRLM Posts: 5,045
    edited 2009-01-08 17:07
    Here is some code that I wrote to use the 912 MHz transceivers.I like making my own wireless setup because you can add lots of different commands very easily.

    
    'Produced by SRLM Productions.
    
    out PIN 0
    in  PIN 1
    
    letter VAR Byte
    done   VAR Byte
    
    DEBUG "Commands: ", CR, "8 - Forward", "2 - Backward", CR, "4 - Turn Left", CR, "6 - Turn Right", CR, "q - Play song (use 1-9 above)", CR, "w - beep", CR, "e - countdown", CR
    
    'Send one char at a time
    done = 0
    DEBUG CR, "You >> "
    DO WHILE done = 0
      DEBUGIN STR letter \1
      SEROUT out, 84, [noparse][[/noparse]letter, CR]
    LOOP
    
    



    That was the console (the part to run on you PC and connected stamp). The following is the program that was on the BOE bot. The tilt functions refer to a third servo that I added to tilt a camera.

    'App to run the BOE-Bot via remote control witht he 912 mhz reciver
    
    'use keypad nums for the dirrection control. 4 and 6 turn.
    
    motor PIN 12
    right PIN 13
    in PIN 0
    piezo PIN 2
    ledA PIN 3
    ledB PIN 4
    ledC PIN 5
    camera PIN 14
    
    counter VAR Byte
    letter VAR Byte
    frequency VAR Word
    tilt VAR Word
    
    tilt = 750
    
    
    DO
    
      GOSUB _GetData
    
      IF(letter = "8") THEN
       GOSUB _Forward
      ELSEIF(letter = "4") THEN
       GOSUB _TurnLeft
      ELSEIF(letter = "2") THEN
       GOSUB _Backward
      ELSEIF(letter = "6") THEN
       GOSUB _TurnRight
      ELSEIF(letter = "5") THEN
        GOSUB _Stop
      ELSEIF(letter = "q") THEN
       GOSUB _PlaySong
      ELSEIF(letter = "w") THEN
       GOSUB _Beep
      ELSEIF(letter = "e") THEN
       GOSUB _CountDown
      ELSEIF(letter = "9") THEN
       GOSUB _TiltUp
      ELSEIF(letter = "3") THEN
       GOSUB _TiltDown
      ELSE
       DEBUG "Not valid dirrection.", CR
      ENDIF
    LOOP
    
    
    _GetData:
      SERIN in, 84, [noparse][[/noparse]letter]
    RETURN
    
    _Beep:
      FREQOUT piezo, 750, 3136
    RETURN
    
    _Countdown:
      FOR counter = 0 TO 10
        FREQOUT piezo, 150, 3136
        PAUSE 150
      NEXT
      FOR counter = 50 TO 0
        FREQOUT piezo, 100 + counter, 3136
        PAUSE counter*3
      NEXT
      FOR counter = 100 TO 0
        FREQOUT piezo, 20, 40*counter
      NEXT
    RETURN
    
    
    _PlaySong:
    
      counter = 0
      DO WHILE counter = 0
        GOSUB _GetData
        IF(letter = CR OR letter > 57 OR letter < 48) THEN
          counter = 1
        ELSE
          LOOKUP letter - 48, [noparse][[/noparse]1174, 1318, 1568, 1760, 1975, 2093, 2349, 2637, 3136, 3520, 3951], frequency
          FREQOUT piezo, 250, frequency
        ENDIF
      LOOP
    RETURN
    
    _TurnLeft:
      FOR counter = 0 TO 4
        PULSOUT motor, 790
        PULSOUT right, 530
        PAUSE 20
      NEXT
    RETURN
    
    _TurnRight:
      FOR counter = 0 TO 4
        PULSOUT motor, 790
        PULSOUT right, 790
        PAUSE 20
      NEXT
    RETURN
    
    _Forward:
    
      FOR counter = 0 TO 20
        PULSOUT motor, 790
        PULSOUT right, 680
        PAUSE 20
      NEXT
    RETURN
    
    _Backward:
      FOR counter = 0 TO 20
        PULSOUT motor, 710
        PULSOUT right, 680
        PAUSE 20
      NEXT
    RETURN
    
    _Stop:
      FOR counter = 0 TO 4
        PULSOUT motor, 750
        PULSOUT right, 680
      NEXT
    RETURN
    
    _TiltUp:
      IF(tilt <= 1000 AND tilt >=500) THEN
        tilt = tilt + 5
      ELSE
        tilt = 1000
      ENDIF
      FOR counter = 0 TO 4
        PULSOUT camera, tilt
        PAUSE 20
      NEXT
    RETURN
    
    _TiltDown:
      IF(tilt <= 1000 AND tilt >=500) THEN
        tilt = tilt - 5
      ELSE
       tilt = 500
      ENDIF
      FOR counter = 0 TO 4
        PULSOUT camera, tilt
        PAUSE 20
      NEXT
    RETURN
    
    
  • David TanDavid Tan Posts: 12
    edited 2009-01-09 04:33
    Dear SRLM..

    Did this involve additional hardware to install in the Parallax Boe-bot?
  • David TanDavid Tan Posts: 12
    edited 2009-01-09 05:43
    Dear sylvie369...

    If possible for us to use the laptop or desktop to control the movement of the Boe-Bot using the wireless?

    did this required any extra hardware?

    Thank you..
  • SRLMSRLM Posts: 5,045
    edited 2009-01-09 05:53
    The BOE is not capable of wireless communication by itself (no uC is that I know of, they all require external hardware). My program used the 912 MHz transceiver(now discontinued), but the principle is the same for other wireless links. It uses a human at a computer to wirelessly control the robot.
  • azmax100azmax100 Posts: 173
    edited 2009-01-09 06:28
    SRLM

    Can i use this 433 RF transmitter/receiver with boe bot? [noparse][[/noparse]http://cytron.com.my/listProductCategory.asp?cid=282]
  • SRLMSRLM Posts: 5,045
    edited 2009-01-09 07:29
    Probably. But, they are not very well documented, so you'll probably be on your own with those. However, have you looked at these? They are very similar, and the documentation is complete enough to indicate that all you need to do is serout on one side and serin on the other. Very cool. I've been thinking of getting some for some time, but haven't gotten the need yet.
  • azmax100azmax100 Posts: 173
    edited 2009-01-09 07:54
    SRLM

    This is the C code for the above said RF. Is it mean anything to you. Looks like it can be use with BS2. How to serout/serin 1200 baud
    with BS?
    c
    c
  • sylvie369sylvie369 Posts: 1,622
    edited 2009-01-09 11:54
    David Tan said...
    Dear sylvie369...

    If possible for us to use the laptop or desktop to control the movement of the Boe-Bot using the wireless?

    did this required any extra hardware?

    Thank you..

    You'll need a transmitter on the control unit and a receiver on the Boe-Bot, of course. If the transmitter is on a BS2 connected to a laptop or desktop, you can use Debugin to send commands to that BS2, which then transmits them to the Boe-Bot, which acts on them. You program that just the same way that you do the accelerometer-based controller described in the link I posted.
  • SRLMSRLM Posts: 5,045
    edited 2009-01-09 16:45
    @azmax100

    No need to look at the C code. It appears as if you just SEROUT within the specified baud range, and SERIN at the same value at the other side. For the programmer, it appears like a wire (no commands for the module).
  • David TanDavid Tan Posts: 12
    edited 2009-01-14 02:18
    To:SRLM

    Regarding the above statement, i quiet confuss with what u trying to deliver..

    can u be more specify..

    Thanks you
  • David TanDavid Tan Posts: 12
    edited 2009-01-14 02:37
    To all the PBasic stamp 2 expert...

    Got any new expansion for Parallax Boe-Bot beside the normal use..

    Thank You..
  • SRLMSRLM Posts: 5,045
    edited 2009-01-14 02:39
    There are two main resources in a problem like this. The primary one is the Basic Stamp Syntax and Reference Manual, under the section labeled SERIN and under the section labeled SEROUT. The second resource is the RF module datasheet. If I remember right (an don't hold me to this) the RF Modules can transfer serial speeds between 2400 and 9600 bps. The module should work (in certain circumstances) as a drop in replacement for a signal wire, which is very convenient. [noparse]:)[/noparse]
  • David TanDavid Tan Posts: 12
    edited 2009-01-18 09:59
    I need help for the PING comment...

    List of Hardware Involve...?

    Thank You..
  • SRLMSRLM Posts: 5,045
    edited 2009-01-18 16:20
    David Tan said...
    I need help for the PING comment...List of Hardware Involve...?
    I'm not quite sure what you mean, but the PING does not require any external hardware except some wires to connect it.
  • David TanDavid Tan Posts: 12
    edited 2009-01-19 05:44
    This is what the PIng i means ...

    Thank You

    Regards
    David Tan
    1280 x 1024 - 92K
Sign In or Register to comment.