Devices & Components
Arduino Uno Rev3
9V battery (generic)
Resistor 220 ohm
Breadboard (generic)
LED (generic)
HC-06 Bluetooth Module
Software & Tools
Arduino IDE
Cover art Smart Bluetooth - Arduino Bluetooth Serial ⚡
Project description
Code
smartbluetooth_blink
c_cpp
This is the main code for this project
1/* Made by Tomas Kopunec 2 * 2.22.2019 3 * 4 * By default SMART BLUETOOTH app 5 * sends 'a' when turning ON and 'b' when turning OFF 6 * 7 * If you have any questions or issues 8 * don't hesitate and send me a message here: devkopunec@gmail.com 9 * 10 * Don't forget to leave a 5-star rating and nice feedback 11 * 12 * Thanks, Kopunec 13 */ 14 15 16const int led = 2; 17 18void setup() { 19 Serial.begin(9600); 20 pinMode(led, OUTPUT); 21} 22 23void loop() { 24 char c = Serial.read(); 25 if(c == 'a'){ 26 digitalWrite(led, HIGH); 27 } 28 else if(c == 'b'){ 29 digitalWrite(led, LOW); 30 } 31 else{ 32 33 } 34 delay(25); 35} 36
smartbluetooth_blink
c_cpp
This is the main code for this project
1/* Made by Tomas Kopunec 2 * 2.22.2019 3 * 4 * By default SMART BLUETOOTH app 5 * sends 'a' when turning ON and 'b' when turning OFF 6 * 7 * If you have any questions or issues 8 * don't hesitate and send me a message here: devkopunec@gmail.com 9 * 10 * Don't forget to leave a 5-star rating and nice feedback 11 * 12 * Thanks, Kopunec 13 */ 14 15 16const int led = 2; 17 18void setup() { 19 Serial.begin(9600); 20 pinMode(led, OUTPUT); 21} 22 23void loop() { 24 char c = Serial.read(); 25 if(c == 'a'){ 26 digitalWrite(led, HIGH); 27 } 28 else if(c == 'b'){ 29 digitalWrite(led, LOW); 30 } 31 else{ 32 33 } 34 delay(25); 35} 36
Downloadable files
Schematic EasyEDA
This is the schematic for this project made in EasyEDA
Schematic EasyEDA

Schematic EasyEDA
This is the schematic for this project made in EasyEDA
Schematic EasyEDA

Schematics Fritzing
This is the schematic for this project made in Fritzing
Schematics Fritzing

Comments
Only logged in users can leave comments