Your BOE-Bot code and the transparency of XBee is really cool. It works amazingly, using BST on GNU/Linux (Debian Lenny). Thank you for making this code and information available.
Post Edited (J. A. Streich) : 2/2/2009 1:56:01 AM GMT
Does your serial code allow a unix end of line (Newline) for enter, or is it a "windows" end of line (Carriage Return & Line Feed)?
I have code sending commands over XBee and it's not working.
The serial messages all involve CR/LF (13,10). If you want to modify things, you can search for "def#Cr" or "def#Lf" and delete whichever one you don't want. The input routine "getline" uses "def#Cr" as a line terminator and adds a def#Lf afterwards when echoing to the output device. I think all the message and serial I/O is in the main file (BoeBotBasic.spin).
Thanks for the info. I'm writing a program in C that takes input from a Logitech gamepad and converts the input to servo pulsewith and sends "srvleft = ..." and "srvright = " to the bot over XBee. I get the "OK" messages returned from the bot but it doesn't actually move. When I use the serial terminal in BST, everything works fine (typing in the commands by hand).
I'll take a look back through your code again tomorrow and see what I'm doing differently than the bot's expecting.
Ezsyn said...
That's not a BOE-BOT! (Coz' BOE stands for Board of Education)
Nor is it a Propeller powered BOE-BOT!
It's a PROBO-BOT. (Propeller-pROtoBOard - roBOT).
I think a better name would be "Pro2-BOT" (PROpeller PROtoboard roBOT)...
I don't know if you've figured it out by now, but I just realized what you're doing and it wouldn't work. When a Basic program ends and you get an "OK" prompt, several things are reset including the I/O registers (other than the ones the interpreter is using) and the extra cogs that are doing things like the servo pulse timing. Any servo movement would be stopped. You could write a Basic program to wait for input from xBee and interpret it (including commands to move the servos) and that would work.
I got it working with your code (without modification -- well, increased the baud rate). Eventually I will be writing my own "OS" for it (and that is coming sooner and sooner as new parts just came in), but I'd like to maintain as much compatability as I can so I switch back and forth between my code and Femto. If your interested it's posted in the Robotics Forum.
I have some delay issues that I may have cured, but I ran out of 9volt batteries and so I can't run servos to see.
Instead of PING I have just received 4 IR LED, Photoresitor pairs. I was thinking to have one pair on each side (front, back, left rght), but I'm starting to think a turret design would be better (as I have the extra servos (though not continuous rotation)).
Comments
Your BOE-Bot code and the transparency of XBee is really cool. It works amazingly, using BST on GNU/Linux (Debian Lenny). Thank you for making this code and information available.
Post Edited (J. A. Streich) : 2/2/2009 1:56:01 AM GMT
I have code sending commands over XBee and it's not working.
I'll take a look back through your code again tomorrow and see what I'm doing differently than the bot's expecting.
I think a better name would be "Pro2-BOT" (PROpeller PROtoboard roBOT)...
I got it working with your code (without modification -- well, increased the baud rate). Eventually I will be writing my own "OS" for it (and that is coming sooner and sooner as new parts just came in), but I'd like to maintain as much compatability as I can so I switch back and forth between my code and Femto. If your interested it's posted in the Robotics Forum.
I have some delay issues that I may have cured, but I ran out of 9volt batteries and so I can't run servos to see.
Instead of PING I have just received 4 IR LED, Photoresitor pairs. I was thinking to have one pair on each side (front, back, left rght), but I'm starting to think a turret design would be better (as I have the extra servos (though not continuous rotation)).