Devices & Components
Arduino Uno Rev3
5 mm LED: Red
Resistor 220 ohm
Jumper wires (generic)
HC-05 Bluetooth Module
Breadboard (generic)
Software & Tools
Blynk
Project description
Code
Code
h
1/************************************************************* 2 Blynk is a platform with iOS and Android apps to control 3 Arduino, Raspberry Pi and the likes over the Internet. 4 You can easily build graphic interfaces for all your 5 projects by simply dragging and dropping widgets. 6 7 Downloads, docs, tutorials: http://www.blynk.cc 8 Sketch generator: http://examples.blynk.cc 9 Blynk community: http://community.blynk.cc 10 Social networks: http://www.fb.com/blynkapp 11 http://twitter.com/blynk_app 12 13 Blynk library is licensed under MIT license 14 This example code is in public domain. 15 16 *************************************************************/ 17 18#define BLYNK_USE_DIRECT_CONNECT 19 20// You could use a spare Hardware Serial on boards that have it (like Mega) 21#include <SoftwareSerial.h> 22SoftwareSerial DebugSerial(2, 3); // RX, TX 23 24#define BLYNK_PRINT DebugSerial 25#include <BlynkSimpleSerialBLE.h> 26 27// You should get Auth Token in the Blynk App. 28// Go to the Project Settings (nut icon). 29char auth[] = "Your Auth."; 30 31 32void setup() 33{ 34 // Debug console 35 DebugSerial.begin(9600); 36 37 DebugSerial.println("Waiting for connections..."); 38 39 // Blynk will work through Serial 40 // 9600 is for HC-06. For HC-05 default speed is 38400 41 // Do not read or write this serial manually in your sketch 42 Serial.begin(9600); 43 Blynk.begin(Serial, auth); 44 45 46} 47 48void loop() 49{ 50 Blynk.run(); 51} 52
Code
h
1/************************************************************* 2 Blynk 3 is a platform with iOS and Android apps to control 4 Arduino, Raspberry Pi and 5 the likes over the Internet. 6 You can easily build graphic interfaces for all 7 your 8 projects by simply dragging and dropping widgets. 9 10 Downloads, 11 docs, tutorials: http://www.blynk.cc 12 Sketch generator: http://examples.blynk.cc 13 14 Blynk community: http://community.blynk.cc 15 Social networks: 16 http://www.fb.com/blynkapp 17 http://twitter.com/blynk_app 18 19 20 Blynk library is licensed under MIT license 21 This example code is in public 22 domain. 23 24 *************************************************************/ 25 26#define 27 BLYNK_USE_DIRECT_CONNECT 28 29// You could use a spare Hardware Serial on boards 30 that have it (like Mega) 31#include <SoftwareSerial.h> 32SoftwareSerial DebugSerial(2, 33 3); // RX, TX 34 35#define BLYNK_PRINT DebugSerial 36#include <BlynkSimpleSerialBLE.h> 37 38// 39 You should get Auth Token in the Blynk App. 40// Go to the Project Settings (nut 41 icon). 42char auth[] = "Your Auth."; 43 44 45void setup() 46{ 47 // Debug 48 console 49 DebugSerial.begin(9600); 50 51 DebugSerial.println("Waiting for 52 connections..."); 53 54 // Blynk will work through Serial 55 // 9600 is for 56 HC-06. For HC-05 default speed is 38400 57 // Do not read or write this serial 58 manually in your sketch 59 Serial.begin(9600); 60 Blynk.begin(Serial, auth); 61 62 63 64} 65 66void loop() 67{ 68 Blynk.run(); 69} 70
Downloadable files
Final Look
Final Look

Comments
Only logged in users can leave comments