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…
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.
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!
}
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.
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
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.
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.