Help with Reading PWM using pulseIn on Arduino R4 Minima

I’m trying to read the PWM signal output from an RC car receiver, but the value displayed in the Serial Monitor remains at 0us. The code is very simple, and it worked perfectly on the Arduino Uno and MEGA. However, I need to switch my development environment to the Arduino R4 Minima, and after making this change, it no longer works.

I’m using the Futaba R3008SB receiver, and I’m trying to read the signal using the R4 Minima. The wiring is simple: I’ve connected the receiver’s channel 1, the Arduino’s GND, and 5V, as well as the signal line directly to the corresponding pins. The program is as follows.

const int pwmPin = 2;  
unsigned long pulseWidth;

void setup() {
  pinMode(pwmPin, INPUT);
  Serial.begin(115200);  
}

void loop() {

  pulseWidth = pulseIn(pwmPin, HIGH);


  Serial.print("Pulse Width: ");
  Serial.print(pulseWidth);
  Serial.println(" us");

}

I’m not an expert on Arduino, but I have checked the jumper wires and voltage from the receiver, and there’s no issue. The pulseIn function only fails to work on the R4 Minima. If anyone knows what might be wrong, please let me know.

I don't know Minima, but you could try with button instead of Futaba to verify your board is working and able to print pulse width. If that works you probably have some powering issue.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.