Hello all,
I recently purchased and HC06 Bluetooth Module. My first Blynk project was a simple Wifi Controlled RGB LED with a Leonardo. Now, I intend to implement the same simple project via Bluetooth.
I have the HC06 Vcc pin to 3.3V, Gnd of HC06 connected to the minus of my source. I have the 3.3V TX and RX lines of the HC06 hooked to a level shifter to give me 5V signals going to my Arduino Uno in this case.
I am trying to follow the example given in the blynk app when you click on the bluetooth widget. I tried to compile my code and I get an error on the Blynk.begin line saying that there is no matching function call to Blynk.begin. Any help would be greatly appreciated.
BTW: I just supplied power to the HC06 earlier and hit the Bluetooth button in my project and was able to find and connect to my device according to my phone. So I really believe I just need to finish my code for the serial TX and RX.
//This program is wrote to control and RGB LED via Bluetooth
//Using HC06 Bluetooth Module and the Blynk app to control the Arduino Uno
/*Includes*/
// or Software Serial on Uno, Nano...
#include <SoftwareSerial.h>
#include <BlynkSimpleSerialBLE.h>
/*Defines*/
//IO PINS
#define RED_LED_PIN 2
#define GREEN_LED_PIN 3
#define BLUE_LED_PIN 4
#define BLYNK_PRINT DebugSerial // Comment this out to disable prints and save space
#define BLYNK_USE_DIRECT_CONNECT
/*Prototypes*/
/*Global Variables*/
SoftwareSerial DebugSerial(8, 9); // RX, TX
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "xxx";
//*****************************************************************************************************************************************************************************************//
void setup()
{
// put your setup code here, to run once:
pinMode(RED_LED_PIN, OUTPUT);
pinMode(GREEN_LED_PIN, OUTPUT);
pinMode(BLUE_LED_PIN, OUTPUT);
//Debug Console
DebugSerial.begin(9600);
// Set console baud rate
Serial.begin(9600);
delay(10);
Blynk.begin(Serial,auth);
}
//*****************************************************************************************************************************************************************************************//
void loop() {
Blynk.run();
}
```