BLYNK
HOME       📲 GETTING STARTED       📗 DOCS       ❓HELP CENTER       👉 SKETCH BUILDER

"device wasn't online yet", Im a newbie

Hardware model + communication: Arduino with HC-06/HC-05
Android Phone: Huawei Nova 5t
im using blynk server and using the latest version of blynk. I tried using the code generator on the blynk website, on my first try it work using hc-06 and on hc-05 not working but on the next day it no longer work either hc-05 or hc-06. I want to create a push button (virtual) controlling a dc motor but from the start,it is not communicating. how to connect arduino to the blynk server so it will not show device wasn’t online… I want to control a dc motor to simulate a ventilation of a room. there is no shield and no motor driver, Im just connecting my project to hc05/hc06.

PLEASE help me, i also want to try this bluetooth to my nodemcu

/*************************************************************
  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 <SoftwareSerial.h>
SoftwareSerial SwSerial(10, 11); // RX, TX
    
#include <BlynkSimpleSerialBLE.h>
#include <SoftwareSerial.h>

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "YourAuthToken";

SoftwareSerial SerialBLE(10, 11); // RX, TX

// 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);

  SerialBLE.begin(9600);
  Blynk.begin(SerialBLE, auth);

  Serial.println("Waiting for connections...");
}

void loop()
{
  Blynk.run();
}

First off, do NOT connect your DC motor with the direct pins to your Arduino or NodeMCU, this will break it!

Second, I’m not really sure what your hardware is. You mention both Arduino and NodeMCU, can you elaborate on that?

Ow, and welcome to the board ofcourse :slight_smile:

Im used a npn transistor in between the dc motor and the arduino :slight_smile:

Right now im using an arduino…

Which is a bit like saying “I drive a Ford”.

Pete.

1 Like

Arduino Uno Sir

So did you replace “YourAuthToken” with the Auth token that was emailed to you from Blynk?

What does your serial monitor say?

Pete.

i paste the Auth token that i receive on my email Mr. Pete :slight_smile:

Multiple includes of the SoftwareSerial library, and multiple virtual serial ports using the same pins isn’t likely to deliver good results.
When you finally figure-out which SoftwareSerial port you want to use then check that it’s wired correctly (Pin 10 to the HC0x Tx and pin 11 to the HC0x Rx) then check that both the SoftwareSerial port and the HC0x are using the same baud rate.

Pete.

Thank you for that information,I used the code generated from the sketch builder and didn’t a thing, I change it right away and check if it will work.Thank you Pete

justine

i remove the multiple serial library ang change the serialble(10,11); but still the blynk application say the device is offline :frowning:

I’d suggest that you start by setting aside some time to work on your project. Doing nothing with it for 3 months thenh expecting to pick-up where you left off isn’t likely to produce good results.

You should start by posting your latest code, along with a diagram of how your hardware is wired-up (showing which pins on the Uno are connected to which pins on the Bluetooth module).

Pete.

i was doing the same project using different code…sorry

Thank you pete for replying always :slight_smile: