Building a Bluetooth-Controlled Firework Launcher with BT Lab

 


Building a Bluetooth-Controlled Firework Launcher with BT Lab

This project shows you how to build a wireless 2-axis rotation firework launcher using an Arduino Nano, two MG995 servos, and the BT Lab app. This setup allows you to control movement and a trigger relay from your phone.

BT Lab App Setup

To control your hardware, follow these steps to configure the app:

Download & Open: Open the BT Lab app on your Android device.

Pair Bluetooth: Go to your phone's Bluetooth settings and pair with the HC-06 module (usually the default PIN is 1234 or 0000).

Connect: In BT Lab, select the HC-06 device from the list to establish a connection.

Interface Configuration.

Follow the images below to create a push button and two sliders to set up the interface in BT Lab. First, open the Control feature within the BT Lab app.


#include <Servo.h> Servo s1; Servo s2; void setup() { s1.attach(3); s2.attach(4); pinMode(2 , OUTPUT); Serial.begin(9600); } String data; void loop() { if(Serial.available()){ char val = Serial.read(); if(val == '\n'){ action(); data = ""; }else{ data += val; } } } void action(){ char tag = data[0]; int val = data.substring(1).toInt(); switch(tag){ case 'B': digitalWrite(2 , val == 1 ? HIGH : LOW); break; case 'X': s1.write(val); break; case 'Y': s2.write(val); break; } }

Post a Comment

Previous Post Next Post

Slider Maximum 10 sliders