I just simply want to get the remote values of channel 1(or any channel for testing) in arduino. I have tried many a times with pulsein() but the value on serial monitor is always 0. I have configuered the remote. And when i shake the signal wire the serial monitor gives random values. I have tried many codes of others. The reciever used is R6b which comes with the transmitter ct6b. On the box its mentioned PPM. I need help with the programming as pulsein doesn't work.
I can't understand that much complexity
show
That receiver has an output of six PWM channels. I do not think it has a PPM output connector.
PulseIn should work, so you may want to publish your sketch here, so others can test it for you.
void setup(){int ch1=2;
pinMode(ch1,INPUT)
}
void loop(){
int a=pulseIn(ch1,HIGH);
Serial.println(a);
}
Yes, I agree but in some places it's written PWM but like on the box it's written PPM, and on website it's written PWM.
how will you determine that is really channel 1?
every single pin of arduino is after reset acting as INPUT, so it is no need to write code that change nothing.
here's a simpler step by step tutorial then! ![]()
(assuming your device is ACTUALLY transmitting said PPM!)
hope that helps...
@luxury_waffle's receiver does not provide a PPM data stream.
It may be easier to get a receiver that does, and use the library that decodes PPM, following a tutorial a good idea, than to use pulseIn on N number of distinct channels.
PPM would almost certainly be faster, at least faster than any way I can think of using PWM.
The Flysky FS-iA6B, for example. There are other Flysky receivers, FS-X6B is one I used for years, great receiver.
a7
try
long a=pulseIn(2,HIGH);