Learn about Arduino

Learn about Arduino

Arduino acts as the brain of the system and processes the data from the sensor.

Arduino is an open-source electronics platform based on easy-to-use hardware and software.

Learn Arduino online Classes

Here is the Arduino code to Light Sensitivty

int PHOTORESISTOR=A1;
int LED=3;
void setup() {
// put your setup code here, to run once:
pinMode(PHOTORESISTOR,INPUT);
pinMode(LED,OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
int data=analogRead(PHOTORESISTOR);
if(data>1022)
{
digitalWrite(LED,HIGH);
}
else
{
digitalWrite(LED,LOW);
}
delay(400);
}

Important Links

techouse

I love helping beautiful people like you. I love hanging out with my dogs.

You may also like...

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

× How can I help you?