IoT application that will alert whenever it will be going to rain outside
IoT application that will alert whenever it will be going to rain outside - Proteus Simulation
Proteus Circuit Design:
Components Required:
1) Arduino Uno
2) Rain Sensor
3) Virtual Terminal
4) Logic Toggle
5) DC
6) Ground
Links for Libraries:
https://drive.google.com/drive/folders/18G4d2w5Sot_XCv7rKVMpC90EIM1FT8_f
Link for Arduino IDE download:
https://www.arduino.cc/en/software
Code for Arduino:
void setup() {
Serial.begin(9600);
pinMode(2, INPUT);
}
void loop() {
int rain_sensor = digitalRead(2);
if(rain_sensor == 1){
Serial.println("It's raining");
delay(500);
}
if(rain_sensor == 0){
Serial.println("It's not raining");
delay(500);
}
}
Comments
Post a Comment