Offline
Newbie
Karma: 0
Posts: 7
|
 |
« on: May 03, 2012, 12:45:31 am » |
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
Brattain Member
Karma: 137
Posts: 19006
I don't think you connected the grounds, Dave.
|
 |
« Reply #1 on: May 03, 2012, 02:09:53 am » |
|
|
|
|
|
Logged
|
Pete, it's a fool looks for logic in the chambers of the human heart.
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 7
|
 |
« Reply #2 on: May 03, 2012, 09:52:03 am » |
Does pulsein work with PWM?
|
|
|
|
|
Logged
|
|
|
|
|
Seattle, WA USA
Offline
Brattain Member
Karma: 311
Posts: 35470
Seattle, WA USA
|
 |
« Reply #3 on: May 03, 2012, 09:55:34 am » |
Does pulsein work with PWM? For what purpose?
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
UK
Offline
Brattain Member
Karma: 137
Posts: 19006
I don't think you connected the grounds, Dave.
|
 |
« Reply #4 on: May 03, 2012, 09:56:36 am » |
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.
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 7
|
 |
« Reply #5 on: May 03, 2012, 09:59:25 am » |
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
Brattain Member
Karma: 137
Posts: 19006
I don't think you connected the grounds, Dave.
|
 |
« Reply #6 on: May 03, 2012, 10:07:31 am » |
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.
|
|
|
|
Dubai, UAE
Offline
Edison Member
Karma: 20
Posts: 1626
|
 |
« Reply #7 on: May 03, 2012, 10:29:20 am » |
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
Offline
Brattain Member
Karma: 311
Posts: 35470
Seattle, WA USA
|
 |
« Reply #8 on: May 03, 2012, 10:41:25 am » |
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
Newbie
Karma: 0
Posts: 7
|
 |
« Reply #9 on: May 03, 2012, 11:14:57 am » |
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
Offline
Brattain Member
Karma: 311
Posts: 35470
Seattle, WA USA
|
 |
« Reply #10 on: May 03, 2012, 11:34:22 am » |
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
Brattain Member
Karma: 137
Posts: 19006
I don't think you connected the grounds, Dave.
|
 |
« Reply #11 on: May 03, 2012, 12:18:18 pm » |
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.
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 7
|
 |
« Reply #12 on: May 03, 2012, 12:33:09 pm » |
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
Brattain Member
Karma: 137
Posts: 19006
I don't think you connected the grounds, Dave.
|
 |
« Reply #13 on: May 03, 2012, 12:38:31 pm » |
See reply #1
|
|
|
|
|
Logged
|
Pete, it's a fool looks for logic in the chambers of the human heart.
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 7
|
 |
« Reply #14 on: May 03, 2012, 01:09:49 pm » |
See reply #1
Would it be anything like the potentiometer example sketch?
|
|
|
|
|
Logged
|
|
|
|
|
|