so im trying to make an rc 2,4 ghz radio control set and i whant to now hos is it posible to make an read on an servo signal sent from one arduino to another (via wires) can this be done via analog read or does it have to be an digital read?
You would need to use a digital input and work out the length of the incoming pulses. Using an eternal interrupt would probably be your best bet. I think it's very likely that you will find code doing this in the playground and I would be surprised if there wasn't already a library for it.
Using an eternal interrupt
A celestial concept or just a typo?
I can't think of any reason to send a servo signal from one Arduino to another. Just send the angle you want the servo to move to and let the receiving Arduino control the servo.
...R
there is function pulseIn() that returns lenght of the impulse sent from one arduino.
than if you use function map(pulseIn(pinWithWire),544,2400,0,180) so it will return you the angle.
As others have said, you probably would not want to send an RC Signal from one Arduino to be read by another, but in case you really really wanted to -
You could actually generate a servo signal and read it back on the same Arduino without even using a wire, just generate the signal using the standard servo library on the same pin that you want to use to read the signal - probably pin 2, I sometimes do this sort of thing for loop back tests.
Duane B
thx alot for the help:)
the reason i whant to do this is to make my own re transmitter and reciver whith arduino and to make an tricopter read them but also to be used with other types of rc control