Shop OBEX P1 Docs P2 Docs Learn Events
Robot — Parallax Forums

Robot

buahmedbuahmed Posts: 2
edited 2011-02-28 01:15 in BASIC Stamp
Is there any body can help to run boe bot with RF433 Transceiver and 5-Position?
* 2 RF433 Transceiver - 1 in robot and 2nd in Homeboard
* 5-Position in Homeboard

I need to move the robot
up-down or right to left.

adnanzowayed@gmail.com

Comments

  • stamptrolstamptrol Posts: 1,731
    edited 2011-02-27 05:37
    The best way to get help here is to ask specific questions.

    So, the answer to your question is "yes, there are probably folks here who can help you".

    Tell us what you've done so far; what have you tried that you need help with? What part of your project are you stuck with right now?

    Cheers,
  • buahmedbuahmed Posts: 2
    edited 2011-02-28 01:15
    (1) the homeboard code with RF433 Transceiver

    ' {$STAMP BS2}
    ' {$PBASIC 2.5}
    ' Sender Side
    ' PIN14 TO TX/RX
    ' PIN15 TO DATA

    synch CON "A"
    junk CON 126
    dat VAR Byte
    baud CON 16468
    TR PIN 14 ' TX/RX pin of Transceiver

    main:
    HIGH TR ' Set Transceiver to TX
    DEBUGIN dat
    SEROUT 15,baud,[junk,synch,dat]
    GOTO main

    (2) Basic Stamp 2 board with RF433 Transciver

    ' {$STAMP BS2}
    ' {$PBASIC 2.5}
    ' Receiver side

    ' PIN14 TO TX/RX
    ' PIN15 TO DATA
    synch CON "A"
    dat VAR Byte
    baud CON 16468
    TR PIN 14 ' TX/RX pin of Transceiver
    x VAR Byte
    LOW TR ' Set Transceiver to RX
    DO
    PULSOUT 0, 1200
    SERIN 15,baud,[WAIT(synch),dat]
    SELECT dat
    CASE "w" ' Forward
    LOW 6
    FOR x=1 TO 21
    PULSOUT 12,650
    PULSOUT 13,850
    PAUSE 20
    NEXT
    CASE "s" ' Reverse
    HIGH 6
    FOR x =1 TO 21
    PULSOUT 13,650
    PULSOUT 12,850
    PAUSE 20
    NEXT
    CASE "d" ' Right
    FOR x=1 TO 21
    PULSOUT 12,850
    PULSOUT 13,850
    PAUSE 20
    NEXT
    CASE "a" ' Left
    FOR x=1 TO 21
    PULSOUT 13,650
    PULSOUT 12,650
    PAUSE 20
    NEXT
    ENDSELECT
    LOOP
    END

    (3) when I had try to wite a code using 5-position device like.
    ' =========================================================================
    ' File...... 5PositionSwitch_Simple.bs2
    ' Purpose... Show Directional Output of the 5-Position Switch
    ' Author.... Parallax Inc.
    ' E-mail.... support@parallax.com
    ' Started... 9-30-2009
    ' {$STAMP BS2}
    ' {$PBASIC 2.5}
    '
    '
    [ Program Description ]
    ' Displays the position of the 5-Position Switch on the DEBUG screen.
    '
    [ Program Code ]
    DEBUG CLS, ' Display directional graph
    " ", CR,
    " | ", CR,
    " - - ", CR,
    " | ", CR
    DO
    IF (IN0 = 0) THEN DEBUG CRSRXY, 2, 2, "<" ELSE DEBUG CRSRXY, 2, 2, " "
    IF (IN1 = 0) THEN DEBUG CRSRXY, 5, 4, "v" ELSE DEBUG CRSRXY, 5, 4, " "
    IF (IN2 = 0) THEN DEBUG CRSRXY, 8, 2, ">" ELSE DEBUG CRSRXY, 8, 2, " "
    IF (IN3 = 0) THEN DEBUG CRSRXY, 5, 2, "o" ELSE DEBUG CRSRXY, 5, 2, " "
    IF (IN4 = 0) THEN DEBUG CRSRXY, 5, 0, "^" ELSE DEBUG CRSRXY, 5, 0, " "
    PAUSE 20
    LOOP

    (4) the Key Features for the 5-position as follws :
    Key Features :
    * 8-Pin DIP Module is ready fro breadboard of through hole Projects
    * 10 kΩ pull-up resistor included on each postional pin
    * simple communication with any parallax microcontroller

    Do I need to replace the wire with resistors 10kΩ ?

    Thank you.
Sign In or Register to comment.