#include <Wire.h>
#include <LiquidCrystal_PCF8574.h>
// Define the I2C address and create an instance of the LCD
#define I2C_ADDR 0x27 // Change this to your LCD's I2C address
LiquidCrystal_PCF8574 lcd(I2C_ADDR);
// Define the OLED display width and height
#define SCREEN_WIDTH 128
#define SCREEN_HEIGHT 64
// Define the analog pin for the LDR
#define LDR_1 32
#define LDR_2 33
#define LDR_3 34
#define LDR_4 35
#define LDR_5 36
#define LDR_6 39
// Define the pins for the push buttons and the toggle switch
#define add_pin 4
#define minus_pin 2
#define mode_switch 14
#define select_ldr 15
#define reset_switch 12
#define esp_now_st 26
int threshold = 0;
void setup() {
// Initialize serial communication
Serial.begin(115200);
// Initialize the LCD
lcd.begin(16, 2); // Initialize the LCD with 16 columns and 2 rows
lcd.setBacklight(255); // Turn on the backlight
// Initialize the pins for the buttons and the toggle switch
pinMode(add_pin, INPUT_PULLUP);
pinMode(minus_pin, INPUT_PULLUP);
pinMode(mode_switch, INPUT_PULLUP);
pinMode(select_ldr, INPUT_PULLUP);
pinMode(reset_switch, INPUT_PULLUP);
lcd.clear();
lcd.setCursor(4,0);
lcd.print(F("Starting..."));
}
void loop() {
int no_of_ldr = 2;
}