Shop OBEX P1 Docs P2 Docs Learn Events
Tx Rx Code questions and concerns (class Final Project) — Parallax Forums

Tx Rx Code questions and concerns (class Final Project)

HueyHuey Posts: 23
edited 2006-11-21 00:45 in BASIC Stamp
Some of the questions that i have are:
· How much data can be transmitted?
· Different baud rates..???
· Sync'ing up?
·
· The reason for all these questions is the project is a Remote control(one basic stamp2) is gonna control a "car"(the other basic stamp2)·by sending data to control one unipolar stepper(the drive wheels) and one servo motor(directional wheels).
· I know i gotta send direction, step speed, and other parameters for the stepper and just a pulse value for the servo. Other than that alot of misc questions arise. My stepper motor is from jameco pt# 237745 and the driver is also from jameco pt# 141532. The reason i choose that driver is because it has more functions like free spinning, half or full stepping, two ways of driving the stepper, and is bi-directional.
· I know i am asking alot from the forum but any help would be most appreciated.

Comments

  • HueyHuey Posts: 23
    edited 2006-11-16 03:56
    Another question arises is that if you can run two servos at the same time· just w/ the chip alone
  • allanlane5allanlane5 Posts: 3,815
    edited 2006-11-16 14:52
    Some related questions:

    Is the 'remote control' going to be implemented using a hard-wired connection, an RF remote, or an IR remote? Each has different speeds.

    You CAN run two servos at the same time, since the servo control signal is a 1 mSec to 2 mSec 'pulse', repeated every 20 msec. So you can pulse servo 1, then pulse servo 2, then wait 18 mSec and repeat. However, one of your motors is a 'stepper' motor -- I don't think there's any 'dead time' in a stepper motor's control signals for you to send the Servo control signal. Using the 'driver' may free up the BS2, though.
  • HueyHuey Posts: 23
    edited 2006-11-21 00:45
    i changed the design to (2) stepper motors.· i am using the parallax transeiver kit· which uses rf· there is a bug that might hit if something goes wrong.. see code

    'Tx Part

    (replace this text with your code)
    'Tx Part
    i        VAR Byte
    wallData VAR Byte
     
    start:
    FOR i = 0 TO 7
       PULSOUT 15,1200
       SEROUT 15,16486,[noparse][[/noparse]"!",i]
       SERIN 14,16486,[noparse][[/noparse]WAIT("?"),wallData]
       debug bin wallData.LOWNIB
       pause 200
    NEXT
    GOTO start
     
     
     
    'Rx Part
    i        VAR Byte 'counter
    stepData VAR Byte
    sense    VAR Byte
     
    start:
    FOR i = 0 to 7
       SERIN 14,16486,[noparse][[/noparse]WAIT("!"),sense]
       DEBUG CLS,?sense
       SEROUT 15,16486,[noparse][[/noparse]"?",wallData]
    NEXT
    GOTO start
    



    what i see wrong is that if the Rx part misses the transmission both codes are waiting for something that will never come.

    Rx would be waiting for "!"

    Tx would be waiting for "?"

    any solutions??
Sign In or Register to comment.