Go Down

Topic: Need help with RC and arduino (Read 1 time) previous topic - next topic

vizina13

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

retrolefty

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".  ;)

Lefty

DuaneB

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
Read this
http://rcarduino.blogspot.com/2012/04/servo-problems-with-arduino-part-1.html
then watch this
http://rcarduino.blogspot.com/2012/04/servo-problems-part-2-demonstration.html

Rcarduino.blogspot.com

dxw00d

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.

vizina13

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.

DuaneB

#5
Feb 21, 2012, 06:47 am Last Edit: Feb 21, 2012, 09:25 am by DuaneB Reason: 1
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
Read this
http://rcarduino.blogspot.com/2012/04/servo-problems-with-arduino-part-1.html
then watch this
http://rcarduino.blogspot.com/2012/04/servo-problems-part-2-demonstration.html

Rcarduino.blogspot.com

joearduino

I'm looking for Duane B.
I have been looking over the Arduino code for reading the hobby grade RC radio receiver signals from way back.
I have gotten confuse with so many posts and blog entries that I can't keep track of what I'm working on.
So I have a real simple request.
My daughter has a Mega controller.  We want to use it to read a 6 channel RC hobby receiver and control stuff from it.
I'm lost as far as all of the exact files and code I need to download/copy to include in my project.
There seems to be the RCArduino library, Interrupts library, etc.  I'm lost to find all of the needed files to run a Mega device.
Just getting started in this project with my high school kid and trying to track down everything we need to start testing.
I see this has been done several times over the years but I haven't seen a nice little bow wrapped around a whole project with updated code.
I found stuff on google docs, gethub, and web blogs.  So I have a lot of stuff and reading material but I'm not sure I'm going to assemble the parts together correctly.

Your thoughts?

Regards

Jim

PaulS

Quote
I have been looking over the Arduino code for reading the hobby grade RC radio receiver signals
What code?

Quote
Your thoughts?
Give us some starting point. You have something that does/does not work. You are/are not missing pieces. Clue us in.
The art of getting good answers lies in asking good questions.

Go Up