The circuit in question consists of an Arduino UNO, a 4x4 Membrane Matrix Keypad, and an ESP8266 NodeMCU microcontroller. The Arduino UNO is used as the primary controller, interfacing with the keypad for user input and communicating with the ESP8266 NodeMCU for wireless capabilities. The ESP8266 NodeMCU is programmed to handle WiFi connectivity and send email notifications based on certain triggers from the Arduino UNO. The keypad provides a user interface for password input and system interaction.
#include <Keypad.h>
#include <Wire.h>
#include <SoftwareSerial.h>
char hexaKeys[4][4] = {
{'1', '2', '3', 'A'},
{'4', '5', '6', 'B'},
{'7', '8', '9', 'C'},
{'*', '0', '#', 'D'}
};
byte rowPins[4] = {11, 10, 9, 8};
byte colPins[4] = {7, 6, 5, 4};
Keypad customKeypad = Keypad(makeKeymap(hexaKeys), rowPins, colPins, 4, 4);
String userPassword = "1234";
int incorrectcount = 0;
void changePassword() {
// Function to change the user password
}
void setup() {
Serial.begin(115200);
}
void loop() {
// Main code execution block
}
#include <ESP8266WiFi.h>
#include <ESP8266WebServer.h>
#include <SMTPClient.h>
#include <WiFiClientSecure.h>
#include <EMailSender.h>
#define My_Email "nodemail"
#define password "lasj oeir sbpa vayu"
#define recv_Email "ReceiverEmail"
#define Server "smtp.gail.com"
#define port 465
EMailSender sender(My_Email, password, recv_Email, Server, port);
const char* ssid = "your_ssid";
const char* password = "your_password";
ESP8266WebServer server(80);
void sendmail2() {
// Function to send an email when the password is changed
}
void sendmail() {
// Function to send an email when the incorrect count is more than 3
}
void setup() {
Serial.begin(115200);
// WiFi connection setup
}
void loop() {
// Main code execution block
}
This documentation provides an overview of the circuit, including the components used, their wiring, and the embedded code for the microcontrollers. The code snippets are simplified and do not include the full logic for brevity.