Esp8266 + Arduino uno + Blynk

If you have lights on the ESP-01 and the AT commands are working in the minimum sketch the ESP-01 should be fine.

Let me see the minimum sketch where the AT commands work and be sure the sketch is formatted with </>.

The BareMinimum sketch.


`void setup () {
// Put your setup code here to run once:
}

void loop() {
//Put your main code here, to run repeatedly:
}
`

For command AT it responded OK
For command AT+GMR it responded
AT version: 0.21.0.0
SDK version: 0.9.5
OK

For command AT+RST (at this point my Rst pin on esp is unwired)
It responded

Hey I tried increasing the delay from 10 - 20 in the softser example.
And also changed the Serial.begin (9600) - (115200) in both places. (as while running bareMinimum example the AT command responded at 115200 baudrate.)

After uploading the sketch in serial monitor
Now it says

[53[39] Blynk v0.3.3 [539] connecting to wifi [567] Failed to set STA mode

Glad you got passed the ‘echo’ issue.
In part B of Esp8266 + Arduino uno + Blynk above I should have added that another reason we can’t talk (Uno and ESP) is that one of us is talking too fast or too slow for the other one to understand what is being said i.e. ensure the baud rates are set correctly.

The ‘STA’ issue should be one of the following:

A. You have set AP when you need STA and this is easy enough to fix with AT commands.

B. You need a different firmware version for the ESP. Reluctant to advise this becuase if it is done wrong you can fry the ESP.

C. The thethering system you want to use is not yet possible with Blynk. Are you able to try regular internet rather than a GSM network? If I have time later today I will try to check if tethering works.

Here’s what I feel is going on

1. Esp8266 responds well on AT commands when BareMinimum is uploaded on uno
So Esp and Arduino uno are both good.

**2.**Blynk softser example example compiles well hence Blynk library is also good.

**3.**Issue is when blynk softser example is uploaded, No response from Esp8266 for AT commands.
Guessing Blynk doesn’t support Esp8266 firmware which is AT version: 0.21.0.0

If my guess is right, what should I be doing.?
If flashing the firmware is the only option left then, how can I do it using arduino uno.

1 Like

In this thread [SOLVED] "Failed to disable echo" PROBLEM the Blynk guys stated that firmware version 0.22 is required and that some other later versions might work. There is also a link to the required firmware (and confirmation about setting the baud to 115200).

This instructable gives details of flashing the ESP’s with an Uno http://www.instructables.com/id/Intro-Esp-8266-firmware-update/?ALLSTEPS but I use an FTDI so I can’t confirm it works.

@Sahal_hash you’ll be glad to know that tethering does work. Or at east it does with ESP standalone (WeMos D1 Mini). Samsung S3 set up as AP on GSM and using the same phone to control the tethered ESP with the Blynk cloud server.

If you didn’t want to try a firmware update to run the ESP with the Uno you could use your ESP as standalone. The ESP8266 Arduino core has the required firmware to work with Blynk. They released something like version 2.2 last week and I haven’t moved over yet but 2.10rc2 is fine. Pretty sure 2.2 is ok too.

Do you need the Uno?

If you have chance you should look to pick up a WeMos D1 Mini. MUCH easier than Arduino with ESP.

1 Like

@Costas Very much happy to know the tethering idea worked and glad that you tried.
Let me have a look at the instructable and I’ll revert back.
Wemos D1 mini, is it the latest one in esp series…?
Talking about the need of uno, I was planning to control 5-6 led’s in the o/p of uno (which will be replaced later according to my project) , can this be done by esp as standalone…?

Not sure what o/p means but the ESP’s that have been developed over the last 12 months (not the ESP-01) can control 5 or 6 LED’s without any trouble. The WeMos D1 Mini is like a Nano but with 4MB of memory.

See http://www.wemos.cc/Products/d1_mini.html for details.

@Costas o/p - output :grin:
So can esp control an Rc car in standalone mode
It’ll have to control 2motors and any sensors if mounted on it…

Yes the decent ESP’s become Arduino’s but with a huge amount of memory and WiFi when you select the ESP from the Arduino IDE.

In the IDE select file, preference and add this to Additional Boards Manager URL’s:

http://arduino.esp8266.com/stable/package_esp8266com_index.json,http://arduino.esp8266.com/staging/package_esp8266com_index.json

This give you access to the latest Arduino for ESP8266 core and the staging versions.

Restart the IDE.
All the extra ‘Arduino’ boards will then appear in the IDE. For the ESP-01, 5 7 12, 13 etc select the Generic ESP8266 Module. The WeMos, Huzzah and NodeMCU etc all have their own board categories.

After downloading the Esp board manager files and then selecting generic esp8266 module in tools.

What’s the next step to get led’s blinking.
As esp01 has 2 Gpio ports, it can only control 2 led’s ryt.

Use Blynk’s ESP standalone sketch.

You should be able to control 3 LED’s, the builtin one plus 2 of your own.

@Costas While uploading sketch in the standalone mode does the connection between uno and esp8266 change…?
I remember u asked me to disconnect the Rx and Tx pin from uno while uploading so that the Esp is safe.
Leaving on 3.3 vcc and gnd connection on uno.
Is it the same way I have to follow when I upload in esp as standalone. And after upload does the connection change…?

In standalone mode there is no Uno just the ESP.

How is the program uploaded then…?

using a 5 dollar FT232RL FTDI USB to TTL Serial Converter,

or a 12 dollar WeMOS D1 board

Or you can use this one for just 0.58 €
I’ve got two of them and work properly

CH340G USB to TTL
http://s.aliexpress.com/7RbiUv22

1 Like

CH340G USB to TTL is used to flash the sketch on esp8266.
Can this be also used to flash the firmware of the esp8266…?

Yes, I do both things with same device. The only thing you need to add is just a LM117 3.3V to feed the ESP. The 3.3 V pin from converter is not good to feed the ESP.

You can see below my set-up:

I only use this PCB to flash the firmware and program the ESP as standalone.

1 Like