-->
Page 1 of 2

Programing esp8266-01 for the first time

PostPosted: Thu Apr 30, 2020 12:18 pm
by MoJRiM
Hi, I'm a newbie to arduino in general, but I have a good understanding in programing and electronics in general. I recently bought the esp8266-01 which I connected using a nano board, following this video:



After fixing some dumb wiring issues, I managed to flash the board successfully ? at least that's how it looks like:
esptool.py v2.8
Serial port COM7
Connecting....
Chip is ESP8266EX
Features: WiFi
Crystal is 26MHz
MAC: b4:e6:2d:6b:54:a5
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Auto-detected Flash size: 1MB
Compressed 260464 bytes to 190653...

Writing at 0x00000000... (8 %)
Writing at 0x00004000... (16 %)
Writing at 0x00008000... (25 %)
Writing at 0x0000c000... (33 %)
Writing at 0x00010000... (41 %)
Writing at 0x00014000... (50 %)
Writing at 0x00018000... (58 %)
Writing at 0x0001c000... (66 %)
Writing at 0x00020000... (75 %)
Writing at 0x00024000... (83 %)
Writing at 0x00028000... (91 %)
Writing at 0x0002c000... (100 %)
Wrote 260464 bytes (190653 compressed) at 0x00000000 in 20.3 seconds (effective 102.7 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...

For the board setting everything is set to default. I tried uploading the blink program for esp8266 board, but no matter how much I wait, the esp8266 led doesn't blink. I also tried changing the value of "Builtin Led", still nothing.
For the wiring I have, refer to the youtube link above. Am I missing something stupid ? Please help.

Re: Programing esp8266-01 for the first time

PostPosted: Fri May 01, 2020 4:32 am
by QuickFix
Get yourself a cheap USB -> UART convertor and save yourself the trouble of following bad advice from YouTube (bad as in: yes, it is possible if you're familiar with the subject so you know what to look for and what to expect, just don't use the approach if you're new).

It would be even better to start off with a NodeMCU (also shown in the video) so you can have a careless and flying start, but that's upto you.

Re: Programing esp8266-01 for the first time

PostPosted: Fri May 01, 2020 7:51 am
by AcmeUK
I agree with QuickFix, get a NodeMCU or Wemos D1 mini.
It will save you time and headache. It did for me!

Re: Programing esp8266-01 for the first time

PostPosted: Sun May 03, 2020 2:17 am
by lotus49
ESP-01s can be a good choice for a small project as they are physically small, very cheap and don't have any parts that would be superfluous in a production environment. However, they are not that easy to use as a beginner as they need a separate power supply, separate USB <-> UART convertor and you have to faff around with the CH_PD pin to ensure they correctly boot up normally or in flash mode. They are also not breadboard friendly.

When I started playing around with ESP8266s I bought several without fully understanding what they were. Now, I experiment with a NodeMCU or a Wemos D1 Mini and then make a few tweaks to my code once I am satisfied and then use an ESP-01 in the final device assuming I don't need more than 4 GPIOs.

There are two types of ESP-01. Blue ones with only 512KB of memory and black ones with 1MB. The latter have their LED on Pin 1 and you will have to change this in the Arduino IDE (remember to pick Generic ESP8266 as the board type). The advice above to buy a USB -> UART adaptor is sound but make sure you get one with a switch between programming mode and normal UART mode. They are extremely cheap on Aliexpress although of course you have to wait for ages for them to get from China.

Have fun.