Arduino Sunflower
Arduino Sunflower
The sunflower follows the light using a servo motor and two
photoresistors. Arduino is an open source computer hardware and
software company, project, and user community that designs and
manufactures single-board microcontrollers and microcontroller kits for
building digital devices and interactive objects that can sense and control
objects in the physical and digital world. Arduino boards are available
commercially in preassembled form, or as do-it-yourself (DIY) kits.
Arduino board designs use a variety of microprocessors and
controllers. The boards are equipped with sets of digital and analog
input/output (I/O) pins that may be interfaced to various expansion
boards or Breadboards (shields) and other circuits. The boards feature
serial communications interfaces, including Universal Serial Bus (USB)
on some models, which are also used for loading programs from personal
computers.
Components of the Project
Arduino UNO
Servo Motor
Photoresistor
Jumper
Schematic Diagram
Project Snap!
Program
#include <Servo.h>
int sensorValue = 0;
int servoGrad = 90;
int tolerance = 40;
Servo myservo;
void setup() {
pinMode( sensorPin, INPUT);
myservo.attach( servoPin );
myservo.write( servoGrad );
}
void loop() {
sensorValue = analogRead(sensorPin);
if ( sensorValue < (512-tolerance) )
{
if (servoGrad < 180) servoGrad++;
}
myservo.write( servoGrad );
delay(100);
}
Project Features
Can be used as a smart Solar Cell.
Can be used as a smart Street Light.
Energy Efficient
Easily Accessible