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.
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); }