Things used in this project

Hardware components:
11113 01
SparkFun Arduino Pro Mini 328 - 5V/16MHz
×1
HC-05 bluetooth
×1
12002 04
Breadboard (generic)
×1
Male/Male Jumper Wires
×1
826 04
Male/Female Jumper Wires
×1
Rg relay a
RobotGeek Relay
×1
3 AAA enclosed battery case
×1
2S LiPo battery 300-1000 mah (XT-60 connector)
×1
0.25 mm Nichrome wire
×1
XT-60 LiPo connector
×1
Heat Shrink Tubing
×1
A plastic box with detachable lid
×1
Openbuilds wire cable by foot
OpenBuilds Wire Cable - By the Foot
×1
Terminal strip block
×1
Hand tools and fabrication machines:
Screwdriver
Wire stripper
Wire cutter
Lighter
Soldering flux
09507 01
Soldering iron (generic)
Cutter
Usb to TTL adapter

Schematics

The circuit schematic
Azqltkq4sjt3pm4vtiix

Code

The code that should be uploaded th the pro miniArduino
The code establishes a software serial connection (for HC-05) bluetooth module.

Then in the loop it listens to the serial connection for incoming communication (from the phone or tablet).

When something is received it will be checked for validity in the isPinNrValid function ( it should a pin number from 3 to 9), and then it toggles the pin on for "igniteTime". Ignite time is a constant initially defined by me for 2500 ms, you can change that to whatever you like, i've found out that my fireworks would ignite successfully given that interval.
#include <SoftwareSerial.h>

SoftwareSerial bluetooth(12, 13); // RX, TX
const int igniteTime = 2500;

void setup()
{
    Serial.begin(9600);	
    bluetooth.begin(9600);    
}

void loop()
{
    if (bluetooth.available() > 0) {
        char received = bluetooth.read();
        Serial.println(received);    
        if (isPinNrValid(received)) {
            togglePin(received);
        }  
    }
}

bool isPinNrValid(char pin)
{
    return pin >= '3' and pin <= '9';
}

void togglePin(char pinNr)
{
   Serial.print("Toggle pin:");Serial.println(pinNr);
   String pin;
   pin += (char) pinNr;
   int number = pin.toInt();
   pinMode(number, OUTPUT);
   digitalWrite(number, HIGH); 
   delay(igniteTime);
   digitalWrite(number, LOW); 
}

Credits

Replications

Did you replicate this project? Share it!

I made one

Love this project? Think it could be improved? Tell us what you think!

Give feedback

Comments

Similar projects you might like

Grove starter kit for arduino - piezo vibration sensor
Easy
  • 117
  • 4

Protip

teaches you how to use the piezo vibration sensor in the Arduino Grove starter kit.

Happy birthday melody on Arduino Nano with 3-way polyphony
Easy
  • 1,138
  • 19

Full instructions

Playing polyphony Happy birthday theme on Arduino Nano with three buzzers on a single mini breadboard.

7 Segment LED Displays 101 - How to Make one Work
Easy
  • 40
  • 2

Protip

Seven Segment LED Displays are everywhere and are available in many configurations. This tutorial will show you how they work.

Kaleidoscope Infinity Mirror
Easy
  • 2,012
  • 25

Full instructions

Build a beautiful “infinity mirror” Illusion that you can control by changing this mirrors' orientation. Rotate for changing colors!

Weekly Scheduling with Arduino UNO
Easy
  • 1,081
  • 19

Protip

Human habits are usually different between weekdays and weekend. Therefore, smart devices should be able to switch their task based on this.

ProjectsCommunitiesContestsLiveJobsBetaFree StoreBlogAdd projectSign up / Login
Respect project