Created
June 23, 2014 22:34
-
-
Save vortec/5b43afe88dfe5744266d to your computer and use it in GitHub Desktop.
This file contains hidden or 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 sensor = 5; | |
| int led = 3; | |
| void setup() { | |
| Serial.begin(9600); | |
| pinMode(led, OUTPUT); | |
| } | |
| // the loop routine runs over and over again forever: | |
| void loop() { | |
| int sensorValue = analogRead(sensor); | |
| analogWrite(led, sensorValue / 4); | |
| Serial.println(sensorValue / 4); | |
| delay(10); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment