Posts

Showing posts from November, 2025

Smart talking plan code

 #include <Wire.h> #include <LiquidCrystal_I2C.h> LiquidCrystal_I2C lcd(0x27, 16, 2); // --- Sensor Pins --- int soilPin = A0; int lightPin = A1; // --- LED Pins --- int waterLED = 10;     // Blue LED int sunlightLED = 11;  // Yellow LED int happyLED = 12;     // Green LED // --- Voice Modules --- int waterVoicePin = 7;     // ISD1820 for "Need Water" int sunlightVoicePin = 8;  // ISD1820 for "Need Sunlight" // --- Buzzer --- int buzzerPin = 4; // --- Thresholds --- int soilThreshold = 600; int lightThreshold = 500; // --- Flags --- bool waterPlayed = false; bool sunlightPlayed = false; void setup() {   Serial.begin(9600);   lcd.init();   lcd.backlight();   pinMode(waterLED, OUTPUT);   pinMode(sunlightLED, OUTPUT);   pinMode(happyLED, OUTPUT);   pinMode(waterVoicePin, OUTPUT);   pinMode(sunlightVoicePin, OUTPUT);   pinMode(buzzerPin, OUTPUT);   digitalWrite(waterVoicePin, LOW); ...