Skip to content

Use PPMReader with a RP2040 Zero #9

@pierrotm777

Description

@pierrotm777

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions