Category: Arduino Homework Exercises
Jon’s Potentiometer Controlled Servo!
Tadaaaa!!!
Jon
CIRC 08 by Long
CIRC-12 RGB LEDs
Lou – CIRC-09
Adam F Arduino 09 work…
Photo Light Resister by Marianna Mezhibovskaya
Circ-09 Night Light Edition
Arduino circuit 9
int ledPin = 9;
int photoPin = 0;
int light =0;
void setup()
{
Serial.begin(9600);
pinMode(ledPin, OUTPUT);
}
void loop()
{
light = analogRead(photoPin);
light = map(light, 0, 900, 0, 255);
if(light>100)
{
digitalWrite(ledPin, HIGH);
}
else
{
digitalWrite(ledPin, LOW);
}
Serial.println(light);
}
Arduino CIRC-9 Night Light by Natsuki
The more you play with Arduino, the more fun it gets!


