Last active
August 29, 2015 14:13
-
-
Save toolboc/bc3bffe60893befba3cf to your computer and use it in GitHub Desktop.
Water Experiment
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int frequencyInHz = 51; | |
int led = 13; | |
float restTime = (1/frequencyInHz) * 1000;; | |
void setup() { | |
// put your setup code here, to run once: | |
pinMode(led, OUTPUT); // Configure the pin for OUTPUT so you can turn on the LED | |
tone(8, frequencyInHz); | |
} | |
void loop() { | |
// put your main code here, to run repeatedly: | |
delay(restTime); | |
digitalWrite(led, LOW); | |
delay(restTime); | |
digitalWrite(led,HIGH); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment