Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 45c539ad9c
Fetching contributors…

Cannot retrieve contributors at this time

28 lines (16 sloc) 0.374 kb
/*
Streetlamp - fade
*/
const int analogInPin = A0;
const int analogOutPin = 9;
int sensorValue = 0;
int outputValue = 0;
void setup() {
pinMode(analogOutPin, OUTPUT);
}
void loop() {
sensorValue = analogRead(analogInPin);
outputValue = sensorValue / 4;
analogWrite(analogOutPin, outputValue);
delay(2);
}
Jump to Line
Something went wrong with that request. Please try again.