Skip to content

Instantly share code, notes, and snippets.

@nenodias
Forked from anonymous/pwd.cpp
Last active May 9, 2017 22:54
Show Gist options
  • Save nenodias/a3ae1594cd89f81602e94d71ecb7c4a9 to your computer and use it in GitHub Desktop.
Save nenodias/a3ae1594cd89f81602e94d71ecb7c4a9 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