Shop OBEX P1 Docs P2 Docs Learn Events
Propeller based robot for RobotBASIC? — Parallax Forums

Propeller based robot for RobotBASIC?

Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
edited 2010-10-09 14:18 in Robotics
My son and I are working together with RobotBASIC.

Has anyone adapted a simple Propeller bot for use with this code?

Thanks

OBC

Comments

  • ratronicratronic Posts: 1,451
    edited 2010-10-09 14:18
    OBC, I have used it to interface the computer's usb joystick to my robot (the robot in my avatar), also my stingray with rs232 via rf. Here's an example where it collects the computers joystick data and sends it out a com port @ 9600 baud. Then I use the spin object rf2.spin within my program for the transmitted joystick data. I have a parallax transmitter attached to the computer com port and a parallax receiver on my robot.
    From what I gather you can also use it with your computers network(TCP/IP) to do the same things, but I haven't digged that deep into it.
    'joystick transmitter by Dave Ratcliff 'ratronic' 7/17/10
    'use either parallax #27980 transmitter or #27982 transceiver
    SetCommPort 3,br9600   'set com port where parallax transmitter or transceiver hooked to
    loop:
      Joystick 1,x,y,z,t
      a = round(x*255)
      b = round(y*255)
      c = round(z*255)
      cs = (a+b+c+t) & 255
      serialout "!~#}",a,b,c,t,cs
    goto loop:
    
Sign In or Register to comment.