/*************************************************************
Download latest Blynk library here:
https://github.com/blynkkk/blynk-library/releases/latest
Blynk is a platform with iOS and Android apps to control
Arduino, Raspberry Pi and the likes over the Internet.
You can easily build graphic interfaces for all your
projects by simply dragging and dropping widgets.
Downloads, docs, tutorials: http://www.blynk.cc
Sketch generator: http://examples.blynk.cc
Blynk community: http://community.blynk.cc
Follow us: http://www.fb.com/blynkapp
http://twitter.com/blynk_app
Blynk library is licensed under MIT license
This example code is in public domain.
*************************************************************
Note: This only works on Android!
iOS does not support Bluetooth 2.0 Serial Port Profile
You may need to pair the module with your smartphone
via Bluetooth settings. Default pairing password is 1234
Feel free to apply it to any other example. It's simple!
NOTE: Bluetooth support is in beta!
You can use this sketch as a debug tool that prints all incoming values
sent by a widget connected to a Virtual Pin 1 in the Blynk App.
App project setup:
Slider widget (0...100) on V1
*************************************************************/
/* Comment this out to disable prints and save space */
#define BLYNK_PRINT Serial
#include <BlynkSimpleSerialBLE.h>
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "-----------------";
// This function will be called every time Slider Widget
// in Blynk app writes values to the Virtual Pin 1
BLYNK_WRITE(V1)
{
int pinValue = param.asInt(); // assigning incoming value from pin V1 to a variable
// You can also use:
// String i = param.asStr();
// double d = param.asDouble();
Serial.print("V1 Slider value is: ");
Serial.println(pinValue);
}
void setup()
{
// Debug console
Serial.begin(9600);
Serial2.begin(9600);
Blynk.begin(Serial2, auth);
Serial.println("Waiting for connections...");
}
void loop()
{
Blynk.run();
}
this shows up in serial monitor π
[0]
/ )/ /_ / /_
/ / / // / \/ '/
///_, /////_\
/___/ v0.6.1 on Arduino Mega
[90] Connecting...
[3191] Login timeout
it never gets connected
it compiles without problems
Sketch uses 9658 bytes (3%) of program storage space. Maximum is 253952 bytes.
Global variables use 483 bytes (5%) of dynamic memory, leaving 7709 bytes for local variables. Maximum is 8192 bytes.
can anyone help me out
thanks in advance
ππππππ
When i run this code
this shows up in serial monitor π
it never gets connected it compiles without problems
Sketch uses 9658 bytes (3%) of program storage space. Maximum is 253952 bytes.
Global variables use 483 bytes (5%) of dynamic memory, leaving 7709 bytes for local variables. Maximum is 8192 bytes.
can anyone help me out thanks in advance ππππππ
sorry for taking your time
Daanish