Pages: [1]   Go Down
Author Topic: Need help with RC and arduino  (Read 782 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I need some help, I have the uno and trying to hook up a rc controler to control servos, My initial set up with LED's was a failure. I got the code from the guy who built the lawnbot, he did a test using led's to see if it was working, one led would come on when the control stick was pressed forward, another would come on when the stick was pressed backwards, and the last one would come on when the stick was in the middle. 
I ran the same code and could not get anything to work for me. The signal wire from the reciever i hook up to pin 2 as an input from channel 1 from the reciever, an LED i hook up to pin 12 for an output. So when i push the control stick forward it should turn the led on and when i release it the led should go off.
What am i missing. Please can anyone help me out.
Thanks
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17263
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What your missing is not posting your sketch (use the # code window) and a drawing of all your wiring. Without that all we can say is: "Hey kid, your not doing it right".  smiley-wink

Lefty
Logged

Dubai, UAE
Offline Offline
Edison Member
*
Karma: 22
Posts: 1675
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,
   You also do not indicate if you are using hobby quality of toy quality radio control systems. In the case of toy quality, the signal is on or off, in the case of hobby quality, its mostly empty space with short pulses, you would need very different code depending on which it is.

See here for details of hobby quality signals - http://rcarduino.blogspot.com/2012/01/how-to-read-rc-receiver-with.html

Duane B

rcarduino.blogspot.com
Logged


Gosport, UK
Offline Offline
Faraday Member
**
Karma: 21
Posts: 3113
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Take a look at this page: http://diydrones.com/profiles/blog/show?id=705844:BlogPost:38418

There is a sample sketch to download. It uses pulseIn() to read the receiver.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

no luck with the code from there,, all i get it two led lights blinking, no matter what i do with the stick they still blink.
is there just a code i can find that just test the led lights with the controller ? I'm new to all this and i look at diffrent threads and its overwhelming.
Logged

Dubai, UAE
Offline Offline
Edison Member
*
Karma: 22
Posts: 1675
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,
   People have pointed you to good resources, however you do have to do some work yourself. Here are some pointers to get you going

1) If you use the code from here - http://rcarduino.blogspot.com/2012/01/how-to-read-rc-receiver-with.html

It should print the RC Input value to the serial monitor, have you done this ?

2) If yes to 1) after then after the line Serial.println(nThrottleIn);  you can add some code to turn one LED on if nThrottle in > 1500 and the other LED on if nThrottle in < 1500.

Over to you,

Duane B.

rcarduino.blogspot.com
« Last Edit: February 21, 2012, 03:25:26 am by DuaneB » Logged


Pages: [1]   Go Up
Jump to: