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.

Revisions

  1. @invalid-email-address Anonymous created this gist May 6, 2017.
    13 changes: 13 additions & 0 deletions pwd.cpp
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    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);
    }