I tryed to run this code:
byte PWM_PIN = D2;
int pwm_value;
void setup() {
pinMode(PWM_PIN, INPUT);
Serial.begin(115200);
}
void loop() {
pwm_value = pulseIn(PWM_PIN, HIGH);
Serial.println(pwm_value);
}
But it gives me so many random values:
1
10
467
2
1
2
1
2
1
1
1
1
1
2
1
2
1
2
1
4834
44
4873
41
106
76
42
623
1
1
2
393
If I plug an servo to this receiver it works great.
According to this picture this should be the values I need to get.
Could you help me?