This setup allows you to incrementally and decrementally control which LED is lit using the two push buttons connected to your Arduino. Also, there is a buzzer. Adjust pin numbers and delays as per your actual circuit configuration and desired performance. This circuit is designed for children. Debounce is done using millis(), no button interrupt has been used. If you are adult, and relatively … [Read more...]
Arduino Adjustable Countdown Timer With I2S LCD, Rotary Encoder and RTC module
Creating an adjustable countdown timer with an Arduino using an I2C LCD, rotary encoder, pushbuttons with interrupt handling, two status LEDs, and an RTC module to control a relay requires careful management of interrupts for responsive button handling while maintaining accurate timing. It is an advanced project. The person going to create it requires to know few theories and previous work … [Read more...]
Bit Manipulation in Microcontrollers Explained
Bit manipulation is a fundamental concept in microcontroller programming, enabling developers to perform efficient and optimized operations on individual bits within data registers. Understanding and harnessing the power of bit manipulation techniques is essential for maximizing resource utilization, optimizing code performance, and implementing advanced functionalities in microcontroller-based … [Read more...]
What is Pin-Change Interrupt (PCINT)? Explained
In the world of microcontroller programming, efficient event handling is crucial for real-time applications, where timely responses to external stimuli are essential. One powerful feature offered by many microcontrollers is Pin-Change Interrupts, which allow the microcontroller to react swiftly to changes in the state of input pins. This article aims to provide a detailed exploration of Pin-Change … [Read more...]
What Are the Different Types of Light Sensors?
Light sensors, also known as photodetectors or photo sensors, are electronic devices designed to detect and measure light levels in various environments. They play a crucial role in a wide range of applications, from automatic lighting control and photography to industrial automation and environmental monitoring. In this article, we'll delve into the diverse world of light sensors, exploring the … [Read more...]
Read a Pushbutton with Arduino with Interrupts and Debounce
Pushbuttons are ubiquitous components used for user input in Arduino projects. However, reading pushbutton inputs reliably can be challenging due to issues such as contact bounce and the need for responsive behaviour. In this article, we'll explore how to read pushbutton inputs using interrupts and debounce techniques, ensuring accurate and responsive interaction with Arduino … [Read more...]
Arduino 3V DC Mini Pump with Push Button Control and LED Indicators (For Kids)
Here's an Arduino sketch to control a 3V DC pump using a push button to start and stop the pump. Additionally, it includes two indicators (green and red LEDs) to signify the status of the pump (running or stopped). This project is intended for the kids, however parents will be required to help them. Although the project is the kids, the sketch includes the usage of Arduino Interrupt. We have … [Read more...]
Arduino Interrupt: Blink LED and Beep Every 1 Second, Pauses Upon Button Press
Though the previous few articles, I have explained some theories required for embedded projects, which include three longer articles on Interrupt - What is Interrupt, How Interrupt Works and Understanding Arduino Interrupts. If you have not read those articles and are not sure what I am talking about, then kindly read the three articles after testing the code in this guide. Our target of this … [Read more...]
An Introduction to FreeRTOS
FreeRTOS is a real-time operating system (RTOS) for embedded systems. It is based on a microkernel architecture (explained below) and has been ported to various microcontrollers. FreeRTOS is an open-source RTOS designed for embedded systems and IoT devices. Richard Barry initiated its development in 2003, and since then, it has garnered significant traction in various industries due to its … [Read more...]
Reader/Writer Lock in Microcontrollers: Explained With Code Examples
In computer science, a lock or locking is the act of blocking access to equipment. Such a lock allows a process to have exclusive access to a resource, i.e. with the guarantee that no other process will read or modify that resource as long as the lock is in place. Locking is often used in process synchronization as well as in file and database systems to ensure atomic and consistent read and write … [Read more...]
Programming the ESP32: ESP-IDF vs Arduino IDE
The ESP32 microcontroller has emerged as a versatile platform for IoT (Internet of Things) development, offering robust connectivity, powerful processing capabilities, and a vibrant ecosystem of development tools. When it comes to programming the ESP32, developers have two primary options: Espressif IoT Development Framework (ESP-IDF) and Arduino IDE. Introduction to ESP-IDF and Arduino … [Read more...]