0% found this document useful (0 votes)
129 views

Arduino Sunflower

This document describes a sunflower project that uses an Arduino Uno microcontroller, servo motor, and photoresistors to turn a servo motor to face the light source. The Arduino board reads the light level with the photoresistors and turns the servo motor to face the brighter side. It provides the components, schematic diagram, program code, and potential applications of the project.

Uploaded by

ashutosh mishra
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
129 views

Arduino Sunflower

This document describes a sunflower project that uses an Arduino Uno microcontroller, servo motor, and photoresistors to turn a servo motor to face the light source. The Arduino board reads the light level with the photoresistors and turns the servo motor to face the brighter side. It provides the components, schematic diagram, program code, and potential applications of the project.

Uploaded by

ashutosh mishra
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

About the Project

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 sensorPin = A0;


int servoPin = 9;

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++;
}

if ( sensorValue > (512+tolerance) )


{
if (servoGrad > 0) 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

You might also like