Skip to main content

Posts

Showing posts from 2024

Clap On Off Switch Circuit Using Arduino

  Arduino Clap LED program #define MicAO 8 int ledPin = 13; int clap = 0; long detection_range_start = 0; long detection_range = 0; boolean status_lights = false; void setup() {   pinMode(MicAO, INPUT);   pinMode(ledPin,OUTPUT);   } void loop() { int status_MicAO = digitalRead(MicAO); if (status_MicAO == 0) { if (clap == 0) { detection_range_start = detection_range = millis(); clap++; } else if (clap > 0 && millis()-detection_range >= 50) { detection_range = millis(); clap++; } } if (millis()-detection_range_start >= 400) { if (clap == 2) { if (!status_lights) { status_lights = true; digitalWrite(ledPin, HIGH); } else if (status_lights) { status_lights = false; digitalWrite(ledPin, LOW); } } clap = 0; } }

LED Chaser Using Arduino Nano Project For Beginners

Creating a Swastik style LED chaser using an Arduino Nano is a fascinating project that combines art and technology, allowing you to explore the realms of electronics and programming while producing a visually striking display. The Swastik symbol, with its rich cultural and historical significance, makes for a unique LED pattern that can bring vibrancy to any setting. In this project, you'll learn how to wire up multiple LEDs to your Arduino Nano, write a simple program to create a mesmerizing chaser effect, and gain hands-on experience with coding, circuit design, and troubleshooting. Whether you’re a beginner or an experienced maker, this guide will walk you through the entire process, from setup to execution, ensuring that you can create your own stunning LED display in no time. Let’s illuminate your creativity! Here is the code below,- void setup() {  pinMode(2,OUTPUT);  pinMode(3,OUTPUT);  pinMode(4,OUTPUT);  pinMode(5,OUTPUT); } void loop() {  //effect 1 ...

How To Make Radar With Arduino UNO Using Ultrasonic Sensor

  Creating a radar system with an Arduino UNO and an ultrasonic sensor involves a few straight forward steps. First, you'll need to connect the ultrasonic sensor's trigger pin to one of the Arduino’s digital output pins and the echo pin to a digital input pin. Then, write a simple Arduino sketch to send a pulse from the trigger pin and measure the duration of the pulse received on the echo pin. This duration, proportional to the distance of an object from the sensor, can be calculated using the speed of sound. By continuously taking readings and mapping them to distances, you can plot these measurements to visualize objects in your environment, effectively creating a basic radar system. To display the results, you could use a serial monitor or even integrate an LCD display for real-time feedback. Here is the code below ,- //radar.ino #include <Servo.h>  const int trigPin = 9; const int echoPin = 8; long duration; int distance; Servo myServo;  void setup() {   p...