Arduino nano every + Esp8266 01 + Blynk!

Hello! my name is Diego and I am 26 years old.
i would use blynk with an arduino nano every but i can’t.
at this moment blynk communicates perfectly with an esp8266 01 which then sends the data via serial to the arduino nano every which returns the processed values ​​… everything is not very stable and the serial communication between esp and nano every is not the best ( I’m still a beginner) I would like to use the Esp8266 01 as a shield for the nano every but I can’t … trying to use the example blynk-wifi-esp8266_shield I have an error during the compilation … if I try to select another arduino board (one, nano …) the compilation is successful … I have to have some special precautions with my nano every?

Sorry for my bad English!! It’s google traslate!! :grin::grin::grin:

If you are using a nano then you need to choose nano.

Once you get the code to compile, it won’t work unless you install AT firmware on your ESP-01.

Why don’t you simply use a NodeMCU?

Pete.

thank you so much for the quick reply !!! my project would be ready but now i would like to complete it with blynk and i thought about buying some esp8266 boards. i used an arduino nano EVERY not an arduino nano …
I do not know the ModeMcu I could evaluate the replacement with the nano every that I use now but I would like to succeed using the esp8266 … in the compilation I have an error concerning a certain “atoll” variable I have no idea what it is …

It doesn’t appear to be in the list of supported hardware:

Pete.

1 Like

there is no problem with Nano Every with Blynk. what sketch you compile and what error exactly do you get?

1 Like

hello !!! I tried the example: blynk - board wifi - esp8266shield …

The error is: long long asLong () const {return atoll (buffer);}
plus it tells me: error ‘atoll’ was not declared in this scope.

I wanted to post a picture of the entire code c error but I can’t

if I select arduino uno or arduino nano among the cards the compilation is successful … selecting arduino nano every gives me the error

Copy and paste between triple backticks (```) rather than posting pictures.

Pete.

from C:\Users\Marchese\Documents\Arduino\libraries\Blynk\src/BlynkApiArduino.h:14,
from C:\Users\Marchese\Documents\Arduino\libraries\Blynk\src/BlynkSimpleShieldEsp8266.h:29,
from C:\Users\Marchese\Documents\Arduino\QuichShifter_v8.00_BLYNK_UNICO_CODICE___\QuichShifter_v8.00_BLYNK_UNICO_CODICE___.ino:37:
C:\Users\Marchese\Documents\Arduino\libraries\Blynk\src/Blynk/BlynkParam.h: In member function 'long long int BlynkParam::iterator::asLongLong() const':
C:\Users\Marchese\Documents\Arduino\libraries\Blynk\src/Blynk/BlynkParam.h:48:50: error: 'atoll' was not declared in this scope
long long asLongLong() const { return atoll(ptr); }
^~~~~
C:\Users\Marchese\Documents\Arduino\libraries\Blynk\src/Blynk/BlynkParam.h:48:50: note: suggested alternative: 'atol'
long long asLongLong() const { return atoll(ptr); }
^~~~~
atol
C:\Users\Marchese\Documents\Arduino\libraries\Blynk\src/Blynk/BlynkParam.h: In member function 'long long int BlynkParam::asLongLong() const':
C:\Users\Marchese\Documents\Arduino\libraries\Blynk\src/Blynk/BlynkParam.h:89:46: error: 'atoll' was not declared in this scope
long long asLongLong() const { return atoll(buff); }
^~~~~
C:\Users\Marchese\Documents\Arduino\libraries\Blynk\src/Blynk/BlynkParam.h:89:46: note: suggested alternative: 'atol'
long long asLongLong() const { return atoll(buff); }
^~~~~
atol
exit status 1
Errore durante la compilazione per la scheda Arduino Nano Every. ```

I gave you triple backticks to copy/paste, but you’ve used different characters.

Pete.

Sorry… now it’s OK!!

the project will be installed on a motorcycle … in addition to being able to use my nano every with the esp8266 cone shield I would like to be able to use it in direct connect as I do not have a home wifi network available since it is precisely the movement … I have iniltre of an arduino nano 33 Iot and if I wanted I could replace it with the nano every and use the ble but from the examples I can’t figure out which one to use !!! please help me !!! thanks in advance … (now I have given a more general picture of the project)

Well, good luck with that.
You’ll probably want to start by looking at one of the libraries written by @khoih that allow simultaneous WiFi/BLE connection and use that as a method of switching between the two. There are many limitations to the functionality when using BLE with Blynk, so you may wish to test that out with a suitable board before you go much further. I’m not familiar with the newer Arduino boards, so cant say which (if any) of them would be suitable for this, but I’d probably start with an ESP32 as it does WiFi/BLE without any additional hardware.

Pete.

the project at the moment works with the Esp8266 as a master connected to blynk (with the wifi at home) and to arduino nano every as slave … the esp driven by the app sends the data via serial line to arduino which sets them in the program and saves them on its eeprom … it works fine but since arduino has to return a variable to all esp and therefore in blynk I have some problems with this … if I could use the esp8266 as a shield in direct connect it would be great !! the ble could be an alternative if there is no hope to make it work as said before … the library that you kindly advised me would be interesting but what I would like it should be: arduino nano every with esp8266 as shield with blynk in direct connect … I would set the variables and I would save them on the arduino eeprom and therefore I would not need the blynk server to save the values ​​… thanks again !!!

There is no such thing as direct connection via WiFi. The only time direct connection is possible is via BLE, and then some functionality doesn’t work.

Wow, that’s complicated!
And a good way to kill the EEPROM on your Arduino if you’re reading/writing to it on a regular basis. EEPROM normally has an expected lifespan of 100,000 read/write operations.
The better solution is to use SPIFFS or LittleFS on an ESP8266 or ESP32.

Pete.

this is a real shame !! does the example blynk-directconnect-esp8266 not work? I haven’t tried yet …

the app will be used to set the variables only at the first use in the configuration phase … after which the app will only serve to display other parameters … the arduino will write the parameters during the configuration phase for the first use and then will only have to read them at every start …

I’ve no idea, I never knew it existed.

Pete.

because the flash has only 10000 writes?

Because these file systems act as true file systems and spread the data across the allocated partition and uses error checking and redundancy, whereas eeprom.write just keeps hammering the same memory location until if fails.

Pete.

Is there no way with arduino nanoevery and esp8266 shield? The error code is here …Please help me!!!

The Nano Every should be 100% compatible with the standard Nano.