Is This Possible??

Is it possible to use two arduinos (Duemilanove or Mega) to control a radio controlled car, one arduino as the Tx/Rx in the car and the other made in to a Tx/Rx for control using the 2.4GHz Xbee modules, i would want the Arduino in the car to sent back temp data for the engine (Nitro Powered RC Car) and also the engines rpm and to display them on an OLED module, and for the reciever to control two servos and also allow me to turn lights on and off in the RC car.

I know exactly what i want this kit to do, but i dont have an arduino (YET) and am clueless at programming, would anyone be willing to help? I would of course pay for any help with the coding!

If you want a full description the email me : “exchange at craigmclean dot com”

Thanks in advance to anyone who replies.

I did this a few weeks back, it’s not hard at all… it mainly depends on what type of remote you will use (this defines how the code will work) and how much extra space you have in the rc car - room for the arduino, the xbee shield, and the h bridge (thats gonna take up a decent amount of space, cause you’l need to solder up a pcb, and probably put it into a project box for safety) to control the motor…

There is no motor it’s a Nitro powered RC car, has a little Nitro powered engine in it!

Whats a H Bridge? lol, also soldering is not a problem, just the programming side, i have only ever used HTML and a little CSS. So where the hell would i start?

Yes, of course it is possible.
Can’t imagine why you’d want to - an off-the-shelf R/C set is probably cheaper/more reliable for the Tx side of things.
For the return data, well, the RPM data would obviously lag a little.
Temperature is a little slower changing, so the latency wouldn’t matter that much.
BTW the “motor” / “engine” thing is cultural - some don’t make the distinction.

Start here, for instance:
http://ladyada.net/make/xbee/index.html

ahh, what nitro? I still play round with my old ones - I have the mugen mtx-3 if you know it… sexy little beast of a car…

an h bridge is an IC used to drive motors based on input from a microcontroller such as the arduino (since the arduino can’t output enough amps to run the motor on its own)

but since your talking nitro, your job is much easier, you wont even need to solder… all you need is the xbee setup and the knowledge of how to control two servo’s (steering and throttle)

Thanks for all your help! However…

AWOL: i have encountered problems with off the shelf RC equipment unless i pay obscene amounts for some of the new 2.4GHz equipment which is all geared towards rc planes and helicopters, so i figured building my own would be a bit of fun and i get to learn stuff throughout. The RPM data doesn’t have to be Perfect just an idea of the RPM’s would be nice, just so i can see it for tuning/tweaking purposes.

Jezuz:

all you need is the xbee setup and the knowledge of how to control two servo’s (steering and throttle)

<< This is the problem i have no knowledge and don’t own an arduino yet i just ordered 2xArduino Duemilanove and 2x Arduino Mega’s and the XBee Stuff from the web, should be with me within a couple of weeks.

I also want to simulate the flashing lights on undercover police cars (3 Fast flashes of blue light followed by 3 fast flashes of red light) and also the Headlights alternating flash when i press a button, but also have the brake lights come on when i apply brakes, maybe the police light sequence would be an easier place to start off with!

Thanks guys for all your help so far, but is there a website or a book i can get that will better help me understand the programming language? What programming language is the Arduino based on or is it a specific coding for the Arduino’s? Any help is greatly appreciated as i am a complete noob to programming in general, like i said i have only ever used (x)HTML and CSS.

Once again thanks for your input!

wanted to answer the most questions before but something important came by ::slight_smile:
before i start: don’t pay for programming, read some tutorials think about it and if you have questions ASK. if you want to repay the answers just help other people when you can thats how its work here. and you do that all for fun, understanding things is more fun than get some prepacked stuff, right? ^^

the homepage here http://arduino.cc/ is actually everything you need if it comes to basic arduino knowlege (the link from florinc has also some good tutorials), there are lots of amazing tutorials out there but this page is a really good starting point. the language for programming arduinos is pretty much c/c++ on the homepage under learning are some easy tutorials about controlling leds (aka flashing lights). under playground you’ll find some informations about controlling servos (interfacing with hardware). controlling lights and servos are easy beginner projects, start with that if you don’t understand a function just look in the reference and ask if you don’t get it. reading themperature and rpm requires some sensors, no matter what sensor what the arduino gets is pretty much allways the same there are some sketches (programms for arduino) who allready come with the programming software. once you understand the led and servostuff that isn’t that hard to understand. once you got that you can start with xbee and the oleddisplay that you want to add, that stuff is more complex and i don’t think someone can understand it without the bare basics.

h-bridge = speed controller for electrical engines
or said in a different way: they controll high voltage engines(7,2 or 12v for example) with a low voltage data (5v from the reciver or arduino) they act as a bridge betwen a low and a high voltage circut

Thanks fujii, you really made a lot of sense! lol, I have made a quick sketch using the Blink and button sketches included with the Arduino Software to simulate the Police light effect and the alternating headlights, i have attatched them, would you check them to see if i got the right idea on how this works! However these are seperate files, i’m not sure but doesn’t all my programming/code need to be in one file? if so how do i conbine these files? Also how do i tell the arduino to only turn the effects on when a particular input is activated, Also (I know i’m cheeky but…) there won’t be any physical switches on the Vehicle unit how does that work cos the buttons will be on the transmitter!

Undercover police light effect 2 strobing led’s ie: 111222111222 etc…:
http://img.taz-n-trek.net/P_Lights.pde

Alternating Headlight Effect ie: 1212121212 etc…: http://img.taz-n-trek.net/H_Lights.pde

Please tell that these are correct, lol, i’d like to think i’m getting the hang of at least the LED part!

You can check out my ideas for this project on my website: http://www.craigmclean.com, click the Arduino tab at the top!

Once again thanks!

the sketches looks fine to me if you want to combine them you CAN do it like this:

int ledPin[] = { 10, 11, 12, 13 };

void setup()
{
  pinMode(ledPin[10, 11, 12, 13], OUTPUT);
}

void loop() {
  digitalWrite(ledPin[10], HIGH);
  digitalWrite(ledPin[13], HIGH);
  delay(50);
  digitalWrite(ledPin[13], LOW);
  delay(50);
  digitalWrite(ledPin[13], HIGH);
  delay(50);
  digitalWrite(ledPin[13], LOW);
  delay(50);
  digitalWrite(ledPin[13], HIGH);
  delay(50);
  digitalWrite(ledPin[13], LOW);
  delay(50);
  digitalWrite(ledPin[12], HIGH);
  delay(50);
  digitalWrite(ledPin[12], LOW);
  delay(50);
  digitalWrite(ledPin[12], HIGH);
  delay(50);
  digitalWrite(ledPin[12], LOW);
  delay(50);
  digitalWrite(ledPin[12], HIGH);
  delay(50);
  digitalWrite(ledPin[12], LOW);
  delay(50);
  digitalWrite(ledPin[10], LOW];
  digitalWrite(ledPin[11], HIGH];
  delay(50);
  digitalWrite(ledPin[13], LOW);
  delay(50);
  digitalWrite(ledPin[13], HIGH);
  delay(50);
  digitalWrite(ledPin[13], LOW);
  delay(50);
  digitalWrite(ledPin[13], HIGH);
  delay(50);
  digitalWrite(ledPin[13], LOW);
  delay(50);
  digitalWrite(ledPin[12], HIGH);
  delay(50);
  digitalWrite(ledPin[12], LOW);
  delay(50);
  digitalWrite(ledPin[12], HIGH);
  delay(50);
  digitalWrite(ledPin[12], LOW);
  delay(50);
  digitalWrite(ledPin[12], HIGH);
  delay(50);
  digitalWrite(ledPin[12], LOW);
  delay(50);
  digitalWrite(ledPin[11], LOW];
}

well, we can all agree that dosn’t look that good… in the reference look at the “if” and “for” Control Structures, you will use them more than once later so try to understand them. oh and under “learning” take a look at the “blink without delay”. if you use delay the arduino does nothing but waiting and i really mean nothing the servo that controlls the engine for example will just not move <-thats a bad thing if the car is running at 50mph ^^

and yes all programming stuff need to be in one file expect librarys, thats something like a css stylefile for html.
once you have your arduino you can see the results of your work so learning will be less painfull ::slight_smile:

God i love you guys, thanks so much for all your help, no doubt i will be on here again soon when i recieve my Arduino’s (Yes i’m crazy i ordered 4, maybe i should have an arduiono party! lmao) Once again thanks for your help.

Many Regards