Shop OBEX P1 Docs P2 Docs Learn Events
controling using RF — Parallax Forums

controling using RF

EBradicatorEBradicator Posts: 2
edited 2005-01-21 15:41 in BASIC Stamp
I am a high school student learning to use a BS2.· I have operated a BOE Bot, and have basic knowledge of how to operate the stamp.· I have run into a problem, however.· I have two 433 MHz RF transcievers, and have sucessfully had them communicate to each other using a master/slave program I found using this site, but can not figure out how to put it to use (ie. blinking LEDs, operating a BOE Bot).· Are there any programs/literature available to download or purchase that would help me?· Thanks

Comments

  • NewzedNewzed Posts: 2,503
    edited 2005-01-17 17:51
    Suppose you want to turn on an LED on the BoeBot:

    You transmit from your Stamp:
    serout pin, baud, [noparse][[/noparse]"a"]· You want the BoeBot to turn on an LED
    pause 5000
    serout pin, baud, [noparse][[/noparse]"b"]·· Turn LED off

    The BoeBot receives via its receiver:
    serin pin, baud, [noparse][[/noparse]com]

    Then you write (on the BoeBot Stamp) -
    if com = "a" then HIGH LED
    if com = "b" then LOW LED

    You can use any byte on your keyboard - number, letter, $, #, &, etc.

    One thing to remember - watch your timing.· The BoeBot must be sitting at a serin before your master serouts.· If·the master·serouts, and the BoeBot isn't ready to serin, it will never see the serout, and will just sit and wait forever when it finally gets to its serin.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Sid Weaver
    Do you have a Stamp Tester?

    http://hometown.aol.com/newzed/index.html
    ·
  • EBradicatorEBradicator Posts: 2
    edited 2005-01-21 15:41
    I have tried what you said.· I've got the Transciever plugged into the breadboard of my stamp, with GND into Vss, +5vDC into Vdd, mode into Vdd, TXD into p15, TXFLO into 14, and RXD into 13.··There is·one LED·in p5 on one of the boards.· Is there any other wiring I need to do?

    The program given did not quite work the way I expected it to.· The serout part went into one, but the serin kept asking for labels on the "HIGH LED/LOW LED" part, so I simply told it to goto·two programs for high/low·LED.· I am still unsure on what to do next.·


    Here's how I modified the serin commands so it would actually download to the stamp:

    c var word
    serin 13,16468,[noparse][[/noparse]c]
    if c = "a" then go
    if c = "b" then no
    go:
    low 5
    no:
    high 5

    serout looks like this:

    serout 15,16468,[noparse][[/noparse]"a"]
    pause 5000
    serout 15,16468,[noparse][[/noparse]"b"]

    Any elaboration would be greatly appreciated.
Sign In or Register to comment.