Go Down

Topic: Rc Receiver to a variable (Read 1 time) previous topic - next topic

May 03, 2012, 07:45 am Last Edit: May 03, 2012, 08:27 am by MrBuggitt Reason: 1
Ok so me and my school club are working with arduino and are planning to make various things, and we were thinking we could use an RC controller to control our projects, (and make things pretty universal). Ive been sent on the mission to hook this up to arduino, to be used. I've looked everywhere and cant really find what im looking for (Im a beginner with codeing, but learning).
I thought i would ask the community of Arduino its self..
So my thinking is that have the Rc reciver be read by the arduino and then create a variable (between 0-180, that would make sense right? since its originally controlling servos) and then for whatever we need it for I can set variables to do things (easily with if statements)  

I would very much appreciate anyone's time to code this.

If any questions just post and id be happy to answer.
(Oh also we are using Arduino UNO, if you need to know that)

-MrBuggitt

AWOL

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.


PaulS

Quote
Does pulsein work with PWM?

For what purpose?

AWOL

Quote
Does pulsein work with PWM?

The great thing about Arduino is, it allows you to try things out, very rapidly.
But another answer is "it depends on the frequency of the PWM"
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.


Quote
Does pulsein work with PWM?

For what purpose?

Read the OP, I would like to take the PWM input (to arduino) and translate it to a variable so I can easily use my RC transmitter/receiver.

AWOL

Yes, you can do that.
You can read the PWM out of one of the Arduino's pins
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

DuaneB

Hi,

have a look here, there is a lot about reading RC receivers, the whole site is bought RC and arduino.

Rcarduino.blogspot.com

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

PaulS

Quote
Read the OP, I would like to take the PWM input (to arduino) and translate it to a variable so I can easily use my RC transmitter/receiver.

I read the OP. The output of an RC transmitter is NOT PWM. Get over it.


Quote
Read the OP, I would like to take the PWM input (to arduino) and translate it to a variable so I can easily use my RC transmitter/receiver.

I read the OP. The output of an RC transmitter is NOT PWM. Get over it.

I though it would be.
Since its original use it controlling a servo (which is pwm)

PaulS

Quote
Since its original use it controlling a servo (which is pwm)

No, servos do NOT use PWM. Where did you get that idea?

AWOL

Actually, they do use PWM.
The stream between Tx and Rx is PPM, but once the stream is past the demultiplexer and on its way to the servo or ESC, it's PWM.
Get over it.
I did.
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.


Actually, they do use PWM.
The stream between Tx and Rx is PPM, but once the stream is past the demultiplexer and on its way to the servo or ESC, it's PWM.
Get over it.
I did.

Thank you,
So is there an easy way to 'read' the pwm to a 0-180 variable?

AWOL

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.


See reply #1

Would it be anything like the potentiometer example sketch?

Go Up