Serial Controlled RC Car

I want to build a project using series 1 XBee Modules and 4 motors that will drive a car via serial. I want to be able to type in my direction (forward or reverse), the power level out of 255, then the time in milliseconds. I would enter it in like this: forward, 150, 3000;
Is this project doable? Is there any sample code out there that would be beneficial to look at?


Hi Andrew, This is certainly doable and there are many examples out there. I'll look thru my notes..

I am working on a 2-motor car / robot that will receive serial signals and run them as "LOGO" code. See Logo (programming language) - Wikipedia

Obviously it would be best to have a radio link for this, but you can start out with storing a series of commands in the robot and then letting it go..

So the most common commands would be:

FW 100 (Forward: The numbers are distance, you have to decide what that scale is!)
RT 90 (Right Turn (degrees]
BK 200 (Back)
LT 180 (turn around)

etc... See the Logo information.

That might be enough to start.

Logo also has simple repetitive commands, so:

REPEAT 4 [FD 200 RT 90] travels in a square

Logo has the concept that the vehicle has a pen that can draw on the ground / floor / paper. I've seen some draw with chalk on the sidewalk :slight_smile:

So those commands are PENDOWN and PENUP usually abbreviated as PD and PU.

All/most Logo commands have 2-letter abbreviations that would be good...

I plan to have two more commands:

GA (Go autonomous: according to onboard software and sensors etc. you develop)
SA (Stop autonomous: return to remote Logo commands) Possibly triggered by a hard-contact crash!

Another 'new' command usually is SP 100 (Set speed)

Let us know how you're making out with all this...

I have several different sensors etc. that I'm testing that are available here:

DISCLAIMER: I mentioned stuff from my own Shop...

That Logo language looks very neat. I'll have to look into using that.