Esp8266 + Arduino uno + Blynk

You are flashing the Uno with the sketches, not the ESP, right?

Normally if the ESP is connected to the Uno you will not be able to issue AT commands to the ESP as the Uno is in the way. This is fine. You just need to ensure you can send AT commands directly to the ESP before you connect tx, rx and ground between the 2 devices.

If you can’t reliably send AT commands to the ESP (before connecting to the Uno) then baud rates are wrong, wiring is wrong, flash is wrong or ESP is faulty.

If you can send AT commands before connecting to the Uno and then it fails it will normally be incorrectly wired or incorrect baud rates. The rx and tx is confusing as some boards aren’t clear what the pins are. So it means swapping them over but bear in mind you risk blowing the ESP as the rx into the ESP doesn’t want to receive the 5V from the Uno and it has the voltage whereas the rx into the Uno doesn’t normally have a voltage divider. To be safe maybe put voltage dividers on both pins and then you can safely swap them around.

As the Uno only has 1 serial port, the one you normally use for Serial Monitor then you shoudl try and try with softserial, not hardserial.

EDIT: not a voltage divider on the Uno rx line, a voltage limiter of 3.3V incase you mix it up with the tx line.

I have found the ESP modules to be very tolerant of over voltage and some people run their’s regularly with 5V data lines, but probably not recommended.

@Costas @psoro @pietroxo @Dave1829

Time around 3am
And finally it’s time for the Announcement :loudspeaker: to be made.

Blinked my led :rotating_light: keeping the esp-01 in standalone mode.
Thanks to all the community member who had helped me reach this far.
Special thanks to costas, this wouldn’t have happened without your support.
:blush: :wink: :smile: :sunglasses:

3 Likes

Congratulations @Sahal_hash!!
Good to know you did it. Happy Blynking!! :smile:

1 Like

A small disappointment because I wasn’t able to get it working with uno. So all em left here with is 3 outputs to control,
Gpio1 was used by the led on board (it was default on when connected to network) and when I turn on the switch from blynk the led goes off.how to get this fixed.
GPIO2 was one other output I was able to control.
Which is the 3Rd port that I can control.

The 2 main ports are GPIO 0 and GPIO 2 plus as you say the on board LED on GPIO 1. If you are handy with a soldering iron you can make other ports available including the on board analogue port.

See this instructable if you need an analogue port http://www.instructables.com/id/ESP8266-ADC-Analog-Sensors/?ALLSTEPS

It should be 0.

What isn’t working with UNO? Love to try and get that working for you too :slight_smile:

@Lichtsignaal this is what em facing now

Em using esp-01 so I guess I don’t have any analogue port.
Secondly I don’t have control over GPIO 0
GPIO2 is fine and GPIO 1 do control the led but in an opposite way.(when button is off led is on & off when button is on)

I take it you didn’t look at the instructable. You can use analogue with an ESP-01 but you have to wire up a connection from the CHIP on the ESP board. You do have control of GPIO 0 too but when you are flashing it has to be grounded. Once you have flashed and you put the ESP in running mode by removing the GPIO 0 from ground you can use it in your sketches.

If you are leaving GPIO 0 grounded it will be another reason the ESP doesn’t work as a shield with the Uno i.e. you have the ESP in flashing mode not running mode. It is very messy connecting and then disconnecting the GPIO 0 and sometimes rx and tx lines but the only way to avoid it is use something like a $4 WeMos instead.

I actually did take a look at the instructable but when I saw esp-07 in the step one I thought u forgot I had esp-01. After having a complete look I feel, me doing a soldering on this micro chip would only result in frying it up. :stuck_out_tongue:
And yes I have control over all three ports in here

I noticed that when I turn off the Esp power supply and powering it on again when the Gpio ports are connected to led’s, it won’t connect to my network.
I have to disconnect the two gpio’s from led, power it on again and the Esp would connect in few seconds.

Note: when I turn on the power supply having the gpio’s connected to led’s, the led’s are in high state no matter what state it is in blynk app.

@Costas I’d love to try Wemos D1 or D1 mini, but I see that it is not available in my place. Neither on eBay or the popular stores I go to for such things.

It’s available direct from the manufacturer on Aliexpress and they provide a tracking number so you can follow it from China to your doorstep. My flight landed yesterday so hopefully I will receive my next batch in a few days.

Do you have access to Aliexpress?

I just Googled it and I guess yess. How reliable is it as I also see a chance to get scammed by the seller.

Also I’d appreciate a solution for my 51 post.
And is there any instructable for me to understand the full functionality of the widgets in the blynk app.

Chances of being scammed are pretty slim if you are using the manufacturers Aliexpress account.

With ESP’s there is a facility called Ticker that allows you to flash the onboard LED. I believe Ticker uses an interrupt system rather than the more common delay feature used to flash LED’s. ESP’s don’t like waiting around doing nothing so interrupts are the way to go. That said once your system is connected to the AP you have a bit more leeway on what you can do with the GPIO ports.

Here’s what I found, if my esp’s GPIO ports are connected to any output (led in my case), it won’t connect to the AP. instead the output just remain high.
I have to disconnect the outputs from Gpio ports and power the Esp again to connect to AP.after it’s connected to AP I have to reconnect the outputs.

I don’t think it’d be a cool thing to disconnect, and then reconnect the outputs every time the Esp is powered. Specially if it’s mounted in a room for a specific task.

So what em asking is… Is this because of some fault from my side or is it common.

It is a fault at your end. We have ESP-01’s with digital temperatures sensors connected to GPIO 2 and we don’t disconnect the sensors between reboots. The power in our town went off last night and when the power came back on the ESP’s went back to transmitting the temperature readings to the Blynk app.

How are you powering your ESP?

Em powering it from uno’s 3.3v power supply.
Maybe if we can sort this out then my error 'failed to set STA mode ’ while connecting with uno can also be sorted.

Use a real power supply not the Uno as that doesn’t have the required oomph for the ESP. Your ESP will be internally resetting itself because you are not giving it enough juice.

Ok I’ll take care of that. I tried to reflash the firmware as done earlier but there’s no response from putty or the flash tool.
Tried it a several times. The standalone sketch is still in esp.
Is there anything I shouldn’t be doing at this stage.?