I flashed the code to esp8266 using Arduino UNO board. Now i want to use Arduino pro mini, i don't know how to flash the code to esp8266 using arduino pro mini, because arduino pro mini has its own reset button and it should be pressed when uploading code similarly esp8266 reset should be connected to gnd to flash the code to esp8266. Please help me how i can do that?
Your story doesn't make much sense (to me).
I suppose you mean a bare ESP8266-??
Yes, you can use the USB<>Serial chip of an Uno/Mega to upload a sketch to a bare ESP8266-xx with the right supporting parts.
I do that by first loading a blank (empty setup and loop) sketch to the UNO (with IDE set to UNO).
Then the Uno/Mega MCU will stay out of the picture (no reset etc. needed).
Read this: A Beginner's Guide to the ESP8266
The ProMini does not have a USB<>Serial chip, so you can't use it to upload a sketch to the ESP.
Leo..
You didn't got my point. I want to flash a firmware to esp8266. in simple words i just wanna use esp library
izj99:
You didn't got my point. I want to flash a firmware to esp8266. in simple words i just wanna use esp library
You can't use a Pro Mini for that. You need a USB-to-Serial adapter to flash the ESP8266, but the Pro Mini doesn't have this on-board (like most other Arduinos do).
You'll either need to use an Arduino that does have a USB-to-Serial adapter, like Wawa explained, or you'll have to use a separate USB-to-Serial adapter. I personally like this FT232RL module, it breaks out RTS and DTR (for automatic uploading, very useful, read Wawa's link for more information) and you can use them for 3.3V and 5V boards:
You can find them all over Ebay.
Pieter
You can use the same USB to Serial adapter you use to program your Pro Mini to program your ESP8266 module - I'm doing just that - works great.
Even easier: set up OTA updates for your ESP8266. Add it to your sketch once, upload over USB, after that you can upload over WiFi. Very convenient. It's well described in the link in #1.
wvmarle:
You can use the same USB to Serial adapter you use to program your Pro Mini to program your ESP8266 module - I'm doing just that - works great.Even easier: set up OTA updates for your ESP8266. Add it to your sketch once, upload over USB, after that you can upload over WiFi. Very convenient. It's well described in the link in #1.
I'm using TTL to program arduino pro mini. To flash ESP8266, is it necessary to press reset button of arduino pro mini while uploading code? and the reset pin of ESP8266 should be grounded or not?
Wire up your ESP8266 like this (it's also in the link provided in #1 - did you read that already?)
Then: TX/RX of the ESP to RX/TX of the TTL and connect the GND of the TTL and the ESP; connect GPIO0 to GND when powering up to get the ESP in program mode; upload your sketch. Don't ground the reset pin unless you want to perform a reset.
Make sure your TTL is at 3.3V levels or you may kill the ESP.
That's all.
Disconnect the Pro Mini and forgot about it, you don't need it, and it has nothing to do with the ESP8266.
Then read the link posted above, it contains all information you need on how to program the ESP.
Pieter
I understood i have read the above link carefully. I cannot forget arduino pro mini because sensors are attached directly to pro mini and esp is also attached with pro mini.
if i remove pro mini then flashing esp is useless for me. Sensors are attached to pro mini and by using ESP library (which needs esp to be flashed) i want to send sensor values to server so pro mini is important for me as well.
For flashing the ESP you don't need the Pro Mini or any other Arduino. You can re-connect them later if you like, but that's not related to the actual flashing of the ESP which is what you asked for.
Forget about using the Pro Mini to flash your ESP. Do it independently. Also if you don't have too many sensors, why not connect those to the ESP as well? Then you can really do without your Pro Mini.
wvmarle:
For flashing the ESP you don't need the Pro Mini or any other Arduino. You can re-connect them later if you like, but that's not related to the actual flashing of the ESP which is what you asked for.Forget about using the Pro Mini to flash your ESP. Do it independently. Also if you don't have too many sensors, why not connect those to the ESP as well? Then you can really do without your Pro Mini.
Is it possible to flash ESP independently and then upload sensor code (sketch) to pro mini and then re attach the ESP to pro mini? will it work?
izj99:
Is it possible to flash ESP independently and then upload sensor code (sketch) to pro mini and then re attach the ESP to pro mini? will it work?
Yes.
What ESP. There are many.
How many sensors.
If you have the ESP8266**-12**, then you might not need the ProMini at all.
Because the -12 has more I/O pins broken out than e.g. the -01.
An ESP8266-xx module is not just WiFi.
It can also be a much more powerful and faster Arduino then the ProMini.
With more memory, and buildin flash memory (can be used as SD card).
Give us the full picture. There might be other solutions that you haven't thought about.
Maybe you just want an ESP8266 Arduino with buildin USB<>serial, like the Wemos D1 mini.
Leo..
Wawa:
What ESP. There are many.
How many sensors.
If you have the ESP8266**-12**, then you might not need the ProMini at all.
Because the -12 has more I/O pins broken out than e.g. the -01.
An ESP8266-xx module is not just WiFi.
Little correction as you're mixing up numbering patterns.
There's two chips around: the ESP8266 (though in a few versions with varying amounts of flash), and the newer ESP32. I'm quite sure OP is talking about the ESP8266 in general, indeed they're ambiguous about the module.
The suffixes you use are for the modules which are called ESP-xx, with xx being the type number. That are mostly breakout boards, like the ESP-01 which is a common one for folk that just want to use it for WiFi connectivity.
The ESP-12 (not ESP8266-12 - most common variety ESP-12E and ESP-12F) are barebones modules, basically just the chip on small PCB with built-in WiFi antenna. Those have all pins available (including the rather useless GPIO pins that are used for internal flash). There are again breakout boards available for this module, as it's a 2 mm pitch SMD type which is meant for soldering on a PCB rather than for development use.
The programming part however applies for ALL different modules of the ESP8266: they all have TX, RX, GPIO0, RST, Vcc and GND broken out, so they can all be programmed using TTL.
True.
The modules are known as ESP-01, ESP-07, ESP-12E/F, etc.
Adding the chipset (ESP8266EX) number to it could make it easier to understand for newbies.
The ESP32 (with BT) has a different chipset.
Leo..
Creating your own names for products is usually not the best way to make yourself understood, especially not for newbies who likely have even less idea of what you're saying.