Use PPMReader with a RP2040 Zero
Hello,
I try to use your library with a RP2040 Zero but the serial terminal return 0 for all channels. In theory the PI RP2040 accept interrups on all its pins.
My code is the demo and i use the pin 2: `/* This example outputs values from all PPM channels to Serial in a format compatible with Arduino IDE Serial Plotter */
#include <PPMReader.h>
// Initialize a PPMReader on digital pin 3 with 6 expected channels. byte interruptPin = 2; byte channelAmount = 8; PPMReader ppm(interruptPin, channelAmount);
void setup() { Serial.begin(115200); }
void loop() { // Print latest valid values from all channels for (byte channel = 1; channel <= channelAmount; ++channel) { unsigned value = ppm.latestValidChannelValue(channel, 0); Serial.print(value); if(channel < channelAmount) Serial.print('\t'); } Serial.println(); delay(20); }`
If i test on an Pro Micro, the code is running very well.
Thanks for your help.
Hey, I have given a reply for a similar problem on issue #6 . I don't have a RP2040 Zero, but maybe you could try my answer ? If you do, please give us a feedback so I could add it to my pull request (maybe this isn't a ESP32-issue-only ?).
Sorry, not solve my issue :-(
Hello,
I try to use your library with a RP2040 Zero but the serial terminal return 0 for all channels. In theory the PI RP2040 accept interrups on all its pins.
My code is the demo and i use the pin 2: `/* This example outputs values from all PPM channels to Serial in a format compatible with Arduino IDE Serial Plotter */
#include <PPMReader.h>
// Initialize a PPMReader on digital pin 3 with 6 expected channels. byte interruptPin = 2; byte channelAmount = 8; PPMReader ppm(interruptPin, channelAmount);
void setup() { Serial.begin(115200); }
void loop() { // Print latest valid values from all channels for (byte channel = 1; channel <= channelAmount; ++channel) { unsigned value = ppm.latestValidChannelValue(channel, 0); Serial.print(value); if(channel < channelAmount) Serial.print('\t'); } Serial.println(); delay(20); }`
If i test on an Pro Micro, the code is running very well.
Thanks for your help.
I'm using the rp2040 reading ppm perfectly using this library (on pin 12) if it recieves a pulse shorter than 1000 or longer than 2000, it will return a 0 instead of the value, perhaps thats the issue?