Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

Arduino UNO Based Voice-Controlled LED with HC-05 Bluetooth

View and Edit Project In Cirkit DesignerImage of Arduino UNO Based Voice-Controlled LED with HC-05 Bluetooth

Circuit Documentation

Summary

This circuit integrates an Arduino UNO microcontroller with an HC-05 Bluetooth module, a red LED, and a voice recognition module. The Arduino UNO is programmed to control the LED based on voice commands received through the Bluetooth module. A resistor is used in series with the LED to limit the current.

Component List

Arduino UNO

HC-05 Bluetooth Module

LED: Two Pin (red)

Voice Recognition Module

Resistor (220 Ohms)

Wiring Details

Arduino UNO

HC-05 Bluetooth Module

LED: Two Pin (red)

Resistor (220 Ohms)

Documented Code

// Code for Arduino UNO
int ledPin = 13; // LED connected to digital pin 13
char voiceCommand; // Variable to store the voice command

void setup() {
  pinMode(ledPin, OUTPUT); // Initialize the LED pin as an output
  Serial.begin(9600); // Start serial communication at 9600 baud rate
}

void loop() {
  if (Serial.available() > 0) { // Check if data is available to read
    voiceCommand = Serial.read(); // Read the next character from the serial buffer
    
    if (voiceCommand == '1') {
      digitalWrite(ledPin, HIGH); // Turn on the LED
    } else if (voiceCommand == '0') {
      digitalWrite(ledPin, LOW); // Turn off the LED
    }
  }
}

This code is designed to run on the Arduino UNO. It initializes the LED pin and sets up serial communication. The loop function checks for incoming serial data, which represents voice commands. If the command '1' is received, the LED is turned on. If '0' is received, the LED is turned off.