Chat freely about anything...

User avatar
By Srinivasan K
#85449 Hi All,

I just bought ATMEGA32U4 integrated with ESP8266. I am new to this h/w part.

I am trying to flash the ESP8266 using the Audrino tool ending up in error.

My questions are:

1. I can upload some basic codes into the chip ATMEGA32U4 and is working. But when I select the board as Generic ESP8266 or NodeMCU 1.0 and upload the program, I end up in error "serial.serialutil.SerialTimeoutException: Write timeout the selected serial port serial.serialutil.SerialTimeoutException: Write timeout does not exist or your board is not connected".

Do I need to 'code' or initialize the ESP8266 (which is WiFi part) separately? If so, what if I upload another set of code? Will it erase the existing one?

2. How do I connect to the WiFi part (ESP8266)? I tried connecting from Mobile WiFi. It is getting connected, but nothing happens.

3. The board has a Micro SD port. Can I add an SD card and upload the program/code into the card? What is the use of the slot? Will it be erased every time I upload new codes?

4. By connecting to a different board, does it mean that ATMEGA32U4 is a board and ESP8266 is another board? And, does this mean that I upload code only to that particular board, say if I choose ESP8266, this means it will not affect ATMEGA32U4?

5. How do I find the correct board in Arduino IDE? What does it mean by selecting a 'board'?

Though these questions are basic, I do not know how to proceed as I am new to this h/w part. I code in some languages. But, I am having difficulty in understanding the h/w part.

Thanks for your time.

Srinivasan K
User avatar
By Srinivasan K
#85596 After so many iterations, somehow I flashed the ESP8266 part.

I tried this video https://www.youtube.com/watch?v=G-Z2rf_AN-c

I followed the steps.

Flash ATMEGA32U4, using Step1.ino file
Flash ESP8266 using esp8266_flasher.exe and esp8266_wifi_duck_4mb.bin as bin file. Held a jumper cable to the 2 circles, pushed it to USB. Connected to the USB. Did not take the cable out. Click on Download on the flasher and uploaded and finally said 'leaving...'
Now, I can connect to the WiFi Duck with password quackquack.

But, I cannot run the script. Nothing happens.

When I checked in the Serial monitor, I saw some weird characters and also THE SCRIPT IS PRINTED INSTEAD OF GETTING EXECUTED.

Its fine now. This is what happens with you do not have any idea about what you are doing.

After spending some time in going through the files that I have, I compared the .ino files I uploaded into ATMEGA32U4 with the actual script from the site (Step1.ino), I found that what I uploaded is just a sample script which just prints whatever you send from 192.168.4.1.

Now, I uploaded the correct script and working like a charm.