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

Basic usage instructions

esp8266
#6

Sorry you are right I didn’t mentioned any hardware.
So I upload the AT firmware on the ESP8266 and set it at 9600, I connect it trough UART, on Blynk I set Arduino nano and Serial software, I upload my sketch including the Blynk parts.

On the smartphone I will pair; for example, the led to my physical DO where it is connected the LED itself, in case of graph I associate to the tace the variable and so away…

Correct?

0 Likes

#7

Do I have to connect the Esp8266 to the WiFi using AT commands before starting?

0 Likes

#8

I think you should work through the getting started information at
https://docs.blynk.cc/#getting-started-getting-started-with-the-blynk-app

then when you have mastered the fundamentals, start adding your own sensors and code etc.

0 Likes

#9

No, that’s the purpose of the Blynk.begin command.

As @DaleSchultz says, doing some reading would be a good thing.

Pete.

0 Likes

#10

Sorry but Blynking.begin doesn’t know about SID and Password.
I tried to connect only ESP8266 and it is fine, I have been able to switch a led on and off.
But for me is not clear how to do with my hardware, I’m reading here for two days long, but sorry, I didn’t found any starting explanation with example.
Of course I don’t want a ready made thing, but just a simple way to start

ESP8266 connected to Arduino Nano trough UART, two sensors connected to the Nano trough I2C, a LCD display and a SD card for logging.
I would like to see the datas from remote just to monitor the sensors.

Tonight I connected ESP with AT Fw to Nano and the serial monitor is always showing XXXXXconnecting… row by row scrolling down.

0 Likes

#11

http://help.blynk.cc/how-to-connect-different-hardware-with-blynk/arduino/esp8266-with-at-firmware

The ESP is flashed with AT firmware and becomes a simple Serial to WiFi transceiver.

You set your App and IDE for the Arduino device… and that it the device you program, not the ESP.

0 Likes

#12

Good morning and thanks for answering.

I tried to send SSID and PASSWORD by at command and I got OK CONNECTED from esp, but this is just a test.

Now following the steps, I wonder where I specify the SSID and PW, without them I don’t think the device is able to get connected.

0 Likes

#13

In your arduino sketch, as part of Blynk.begin()

Blynk.begin(auth, wifi, ssid, pass);

https://examples.blynk.cc/?board=Arduino%20Uno&shield=ESP8266%20WiFi%20Shield&example=GettingStarted%2FBlynkBlink

0 Likes

#14

Sorry but nothing is clear…

Have a look at the sample sketch from Blynk and tell me where is getting SSID and PASSWORD and how is possible to get connected to the network without them parameters!!!


/*************************************************************
  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.

 *************************************************************
  =>
  =>          USB HOWTO: http://tiny.cc/BlynkUSB
  =>

  You’ll need:
   - Blynk App (download from AppStore or Google Play)
   - Arduino Nano board
   - Decide how to connect to Blynk
     (USB, Ethernet, Wi-Fi, Bluetooth, ...)

  There is a bunch of great example sketches included to show you how to get
  started. Think of them as LEGO bricks  and combine them as you wish.
  For example, take the Ethernet Shield sketch and combine it with the
  Servo example, or choose a USB sketch and add a code from SendData
  example.
 *************************************************************/

/* Comment this out to disable prints and save space */
#define BLYNK_PRINT Serial


#include <BlynkSimpleStream.h>
#include <SoftwareSerial.h>

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

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

void setup()
{
  // Debug console
  Serial.begin(9600);

  // Blynk will work through SoftwareSerial
  // Do not read or write this serial manually in your sketch
  SwSerial.begin(9600);
  Blynk.begin(SwSerial, auth);
}

void loop()
{
  Blynk.run();
  // You can inject your own code or combine it with other sketches.
  // Check other examples on how to communicate with Blynk. Remember
  // to avoid delay() function!
}
0 Likes

#15

So as to beat others to saying it before you enter code hit 3 back ticks on my keyboard it is just beside the #1 ``` .
Enter your network credentials in the sketch builder as highlighted in pic.

0 Likes

#16

I see this, but I’m using NANO with ESP8266-01 and if I do what you showing me, i get compiling error abou “Serial1 not defined in this scope”

0 Likes

#17

I think that at this stage it’s worth pointing out that your hardware combination is rather unusual, so you wont find an out of the box solution. Some experimentation will be required, and if you read the code comments, and research the Uno and Mega boards, you’ll see that the Uno has one UART and the Mega has three.
The code says…

// Hardware Serial on Mega, Leonardo, Micro...
#define EspSerial Serial1

// or Software Serial on Uno, Nano...
//#include <SoftwareSerial.h>
//SoftwareSerial EspSerial(2, 3); // RX, TX

in other words, this is universal code that can be used on a variety of different Arduino boards by commenting/deleting some lines of code and removing the code for other lines.

Your initial; post indicated a degree of familiarity with C++ programming and devices, so several of us have made the mistake of signposting you in the right direction without actually going into much detail. Part of the reason for that was probably that we’ve never come across this hardware combination before, but we have no reason to think that it wouldn’t work - with some tweaking of code and experimentation.

If you’re new to coding in general, or to IoT projects, then you might be better looking at a different solution. Personally, I’d be basing this project around a Wemos D1 Mini rather than a Nano + ESP-01

Pete.

0 Likes

#18

There is no such thing as SSID/Password needed for a USB link type of connection :stuck_out_tongue_winking_eye: You are using the wrong example.

I already showed you one with ESP as shield.

Because the Nano, just like the UNO, requires the use of SoftSerial for the ESP link since they do not have a 2nd hardware serial port (AKA Serial1)

0 Likes

#19

Hi, but I didn’t say to do trough USB, I need to see some signal from wifi.

0 Likes

#20

Then don’t use that example and then ask us why it wouldn’t work with WiFi :wink:

0 Likes

#21

@Gunner ok, I apologize, but I’m getting crazy, so if you have something to suggest, kindly do it! :wink:

0 Likes

#22

That is what he did. He said that you are using the sample sketch for USB connection, not WIFI.

Maybe try this one. https://examples.blynk.cc/?board=Arduino%20Uno&shield=ESP8266%20WiFi%20Shield&example=GettingStarted%2FBlynkBlink

Although I dont think I have heard of connecting an esp for wifi through i2c.

0 Likes

#23

The whole USB connection thing is my fault. I signposted @attiliovolpe towards the the Arduino Nano section of the sketch builder and USB just happened to be the option that was selected at the time.

I’d assumed from his first couple of posts that @attiliovolpe had more skills and experience in the area than he apparently has and that all he needed was pointing in the right direction. I explained some of this in post #17, but we still seem to be stuck on the USB connection thing.

I really do think that given the skill levels involved, a switch to a NodeMCU or Wemos D1 Mini instead of the Nano/ESP-01 combo would be by far the simplest way of moving this forward.

Pete.

0 Likes

#24

If you insist on the Arduino with ESP as shield thing, then start looking here, as I previously linked to…

http://help.blynk.cc/how-to-connect-different-hardware-with-blynk/arduino/esp8266-with-at-firmware

Otherwise pick up a standalone ESP development board as @PeteKnight suggested and save some dual-device connectivity efforts.

http://help.blynk.cc/how-to-connect-different-hardware-with-blynk/arduino/esp8266-standalone

0 Likes

#25

In my life I’m used to never give up!
Now all is fine and connected, apart from some syntax error, I had wrong fw on the ESP, I discovered changing the ESP with another one.

Thanks to everyody you, we will see with all the rest.

2 Likes