Mail Notofier
ArduinoJust install it in your mailbox and be notified about any mail that comes to your mailbox
#include <Wire.h>
#include "rgb_lcd.h"
int number=1;
rgb_lcd lcd;
int ledPin=8;
int thresholdValue = 400;
const int colorR = 200;
const int colorG = 100;
const int colorB = 3;
void setup() {
Serial.begin(9600);
pinMode(ledPin,OUTPUT);
lcd.begin(16, 2);
lcd.setRGB(colorR, colorG, colorB);
Serial.begin(9600);
delay (5000);
}
void loop() {
int sensorValue = analogRead(A0);
Serial.println(sensorValue);
if(sensorValue>thresholdValue)
{digitalWrite(ledPin,HIGH);
lcd.setCursor(0, 1);
lcd.print("New Mails =");
number=number+1;
lcd.print(number);
}
delay(200);
digitalWrite(ledPin,LOW);
}
Comments
Please log in or sign up to comment.