Skip to content

Instantly share code, notes, and snippets.

Created May 6, 2017 02:20
Show Gist options
  • Save anonymous/c057c6f5718c1d3b2a8dc61991bc98ea to your computer and use it in GitHub Desktop.
Save anonymous/c057c6f5718c1d3b2a8dc61991bc98ea to your computer and use it in GitHub Desktop.
Arduino lendo pino PWD
byte PWM_PIN = 11;
int pwm_value;
void setup() {
pinMode(PWM_PIN, INPUT);
Serial.begin(115200);
}
void loop() {
pwm_value = pulseIn(PWM_PIN, HIGH);
Serial.println(pwm_value);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment