Items Needed: Code: #include <FastLED.h>#define LED_PIN 7#define NUM_LEDS 30#define T1 10 // pin 10 is trigger for sensor 1#define E1 9 //// pin 9 is echo for sensor 1int val=0;CRGB leds[NUM_LEDS];long DistanceSensor (int, int); //trigger echovoid setup() {//delay(10000);Serial.begin(9600); pinMode(E1, INPUT); //echo sensor 1 pinMode(T1, OUTPUT); //trigger sensor 1 FastLED.addLeds<WS2812, LED_PIN, […]
Monthly Archives: May 2025
Code #include <SoftwareSerial.h>#include "LCD.h"#include <LiquidCrystal_I2C.h>#define I2C_ADDR 0x27 // <<----- Add your address here. Find it from I2C Scanner#define BACKLIGHT_PIN 3#define En_pin 2#define Rw_pin 1#define Rs_pin 0#define D4_pin 4#define D5_pin 5#define D6_pin 6#define D7_pin 7LiquidCrystal_I2C lcd(I2C_ADDR,En_pin,Rw_pin,Rs_pin,D4_pin,D5_pin,D6_pin,D7_pin);SoftwareSerial sonarSerial(10, 11); // RX, TX - connect sensor TX to pin 10void setup() { lcd.begin(20,4); […]
This project showcases a simple logic-based Light and Movement Detector built using only analog and digital non-programmable components: the LM741 operational amplifier, 74HCT04 inverter, and 74HC368 tri-state inverter. The circuit is designed to turn ON a LED only when movement is detected in the dark. If there is ambient light, […]