Skip to content

Instantly share code, notes, and snippets.

@ecehan-civril
Created August 18, 2021 08:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ecehan-civril/79b1f80b4c05e137a33ecac41a78c354 to your computer and use it in GitHub Desktop.
Save ecehan-civril/79b1f80b4c05e137a33ecac41a78c354 to your computer and use it in GitHub Desktop.
3-kablolu-fan
int pin = 7;
unsigned long duration;
void setup() {
Serial.begin(9600);
pinMode(pin, INPUT);
}
void loop()
{
duration = pulseIn(pin, HIGH);
Serial.print(duration);
delay(1);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment