forked from pratham31299/Microcontroller-based-projects
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSmart-Home-Using-Arduino_HC05BT-module.ino
More file actions
44 lines (31 loc) · 1.06 KB
/
Copy pathSmart-Home-Using-Arduino_HC05BT-module.ino
File metadata and controls
44 lines (31 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/*************************************************************
Blynk is a platform with iOS and Android apps to control
Arduino, Raspberry Pi and the likes over the Internet.
*************************************************************/
#define BLYNK_USE_DIRECT_CONNECT
// You could use a spare Hardware Serial on boards that have it (like Mega)
#include <SoftwareSerial.h>
SoftwareSerial DebugSerial(0, 1); // RX, TX
#define BLYNK_PRINT DebugSerial
#include <BlynkSimpleSerialBLE.h>
char auth[] = "5gxYVBZ6JAkF2x1MwtfqdmBj0gTV"; // authentication code,put your own
void setup()
{
// Debug console
DebugSerial.begin(9600u);
DebugSerial.println("Waiting for connections...");
// Blynk will work through Serial
// 9600 is for HC-06. For HC-05 default speed is 38400
// Do not read or write this serial manually in your sketch
Serial.begin(9600);
Blynk.begin(Serial, auth);
// Outputs
pinMode(2, OUTPUT);
pinMode(3, OUTPUT);
pinMode(4, OUTPUT);
pinMode(5, OUTPUT);
}
void loop()
{
Blynk.run();
}