Pages: [1] 2   Go Down
Author Topic: Rc Receiver to a variable  (Read 1329 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
« Last Edit: May 03, 2012, 01:27:11 am by MrBuggitt » Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 310
Posts: 26626
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Read a pulse's length
Map a number to a different range
Logged

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

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

Does pulsein work with PWM?
Logged

Seattle, WA USA
Online Online
Brattain Member
*****
Karma: 652
Posts: 50868
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Does pulsein work with PWM?
For what purpose?
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 310
Posts: 26626
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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"
Logged

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

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

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.
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 310
Posts: 26626
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes, you can do that.
You can read the PWM out of one of the Arduino's pins
Logged

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

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

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
Logged


Seattle, WA USA
Online Online
Brattain Member
*****
Karma: 652
Posts: 50868
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

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

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)
Logged

Seattle, WA USA
Online Online
Brattain Member
*****
Karma: 652
Posts: 50868
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Since its original use it controlling a servo (which is pwm)
No, servos do NOT use PWM. Where did you get that idea?
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 310
Posts: 26626
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

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

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

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?
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 310
Posts: 26626
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

See reply #1
Logged

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

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

See reply #1
Would it be anything like the potentiometer example sketch?
Logged

Pages: [1] 2   Go Up
Jump to: