IOT application to measure the intensity of light and send feedback
IOT application to measure the intensity of light and send feedback - Tinker Cad
Tinker Cad Circuit Design:
Components Required:
1) Arduino Uno R3
2) Breadboard Small
3) Led
4) Photoresistor
5) Multimeter
6) Resistor (x2)
Code for the circuit:
int sensorvalue = 0;
void setup(){
pinMode(A0, INPUT);
Serial.begin(9600);
pinMode(9, OUTPUT);
}
void loop(){
sensorvalue = analogRead(A0);
Serial.println(sensorvalue);
analogWrite(9, map(sensorvalue, 0, 1023, 0, 255));
delay(100);
}
Comments
Post a Comment