Arduino and Multiplexer
Code for LED Brightness Controller:
Code: Brightness Equalizer
Code: SOS Signal
#define A 2#define B 3#define C 4#define PWM_PIN 9#define INH 5
void setup() { pinMode(A, OUTPUT); pinMode(B, OUTPUT); pinMode(C, OUTPUT); pinMode(INH, OUTPUT); digitalWrite(INH, LOW); // Enable multiplexer pinMode(PWM_PIN, OUTPUT);}
void loop() { for (int i = 0; i < 8; i++) { sendSOS(i); delay(2000); // Pause between SOS signals }}
void sendSOS(int channel) { selectChannel(channel);
// Dot-Dot-Dot for (int i = 0; i < 3; i++) { analogWrite(PWM_PIN, 255); delay(200); // Short flash analogWrite(PWM_PIN, 0); delay(200); }
// Dash-Dash-Dash for (int i = 0; i < 3; i++) { analogWrite(PWM_PIN, 255); delay(600); // Long flash analogWrite(PWM_PIN, 0); delay(200); }
// Dot-Dot-Dot for (int i = 0; i < 3; i++) { analogWrite(PWM_PIN, 255); delay(200); // Short flash analogWrite(PWM_PIN, 0); delay(200); }}
void selectChannel(int channel) { digitalWrite(A, channel & 0x01); digitalWrite(B, (channel >> 1) & 0x01); digitalWrite(C, (channel >> 2) & 0x01);}
Code: LED Chaser
You may also like
EmbedLab Team
Embedded systems engineer and educator. Writes weekly tutorials at EmbedLab to help beginners ship real hardware.
Related projects
Arduino and shift register
Project Description This Arduino project with code is a smart parking status display system designed to monitor and show the availability of parking spots in real-time. It leverages a 74HC165 s
Arduino traffic lights
This project implements a traffic light system with a countdown timer , designed using an Arduino microcontroller. It controls a sequence of traffic lights (red, yellow, and green) and a 7-segme
Arduino UNO and EEPROM
Project Description: EEPROM SPI Communication with Arduino In this quick tutorial, we'll explore how to communicate with an EEPROM (Electrically Erasable Programmable Read-Only Memory) using SPI (Seri
Arduino buzzer + 4511 bcd + 7SEG
This Arduino code implements a countdown timer with a 7-segment display driven by a 4511 IC, a buzzer for an alarm, and an optional start/reset button. Here's a brief explanation: Components and
Arduino IR + LCD + Proteus8
Smart parking systems are innovative solutions that use sensors and microcontrollers to detect and display parking availability. This article explains how to build a basic smart parking system



