Difference between revisions of "Tutorial Arduino Firmware Upload"

From Let's Control It
Jump to navigation Jump to search
Line 77: Line 77:
 
In version ESPEasy version 2 the flash size requirements have has changed because we use SPIFFS file-storage now. Also we need to have enough room left to support OTA updates. (over the air updates).
 
In version ESPEasy version 2 the flash size requirements have has changed because we use SPIFFS file-storage now. Also we need to have enough room left to support OTA updates. (over the air updates).
  
* For 512k boards (like the blue colored ESP-01 or the ESP-12 or ESP-201): Select 64k SPIFFS.
+
* For 512k boards (like the blue colored ESP-01 or the ESP-12 or ESP-201): Select 64k SPIFFS.
* For 1M boards: Select 128k SPIFFS
+
* For 1M boards: Select 128k SPIFFS
* For 4M boards: Select 1M SPIFFS.
+
* For 4M boards: Select 1M SPIFFS.
  
 
If you change these settings ESPEasy will reset to factory defaults.
 
If you change these settings ESPEasy will reset to factory defaults.
 +
 +
'''Note: If you upgrade from ESPEasy R148 or earlier to ESPEasy v2.0.0 or later, you will lose all your settings'''
  
 
[[File:Tutorial_Firmware_Easy7A.png]]
 
[[File:Tutorial_Firmware_Easy7A.png]]

Revision as of 01:04, 15 March 2017

Download and installing the Arduino IDE

Download and install Arduino 1.6.12. from https://www.arduino.cc/en/Main/Software

We will make a clean portable install to avoid conflicts with other arduino installs/libraries etc.

Rename arduino-1.6.12 to arduino-1.6.12P230

Navigate into this folder

Create folder "Portable"

Launch arduino.exe and select preferences

Tutorial Arduino IDE1.png


Enter the URL for additional boards. Currently we use the 2.3.0. stable version so you should enter:

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

Tutorial Arduino IDE2.png


Now navigate to the board manager

Tutorial Arduino IDE3.png


You should see the ESP option, select 2.3.0 version

Tutorial Arduino IDE4.png


Click install (this will take some time, be patient, it should download approx. 450 MB)

Tutorial Arduino IDE5.png

Download ESP Easy Firmware

Download the latest version at https://github.com/letscontrolit/ESPEasy/releases

The zipfile contains a folder named Source and that contains two subfolders. Unpack the zipfile to some folder of your own choice and navigate to the Source folder.

Install libraries

The lib folder has all the libraries you need. The contents look like the screenshot below and should be copied to the Arduino libraries folder:

Tutorial FirmWare Easy3.png


This is the folder structure for Arduino IDE. You can see the libraries folder in here:

Tutorial FirmWare Easy4.png


Once the additional libraries are copied to it, it should something look like this:

Tutorial FirmWare Easy5.png

Compile and upload

Inside the Source directory rename the src file to ESPEasy.

Launch Arduino IDE and navigatie to this ESPEasy folder. Open ESPEasy.ino

Tutorial FirmWare Easy6.png


It's important the select the right ESP board.

NodeMCU boards: If you have a NodeMCU V1.0 board, selection is easy:

Tutorial FirmWare Easy7.png


Selecting the correct flash size

In version ESPEasy version 2 the flash size requirements have has changed because we use SPIFFS file-storage now. Also we need to have enough room left to support OTA updates. (over the air updates).

  • For 512k boards (like the blue colored ESP-01 or the ESP-12 or ESP-201): Select 64k SPIFFS.
  • For 1M boards: Select 128k SPIFFS
  • For 4M boards: Select 1M SPIFFS.

If you change these settings ESPEasy will reset to factory defaults.

Note: If you upgrade from ESPEasy R148 or earlier to ESPEasy v2.0.0 or later, you will lose all your settings

Tutorial Firmware Easy7A.png


And select the right COM port:

Tutorial FirmWare Easy8.png


Finally, upload the sketch to your ESP board:

Please remember to set the esp module in programming mode by pushing and holding the flash button, and pushing the reset button once. (but on many recent development boards like the NodeMCU V1.0 this manual interaction is no longer needed)

Tutorial FirmWare Easy9.png


If all went well, the result in your status window should look like this:

Tutorial FirmWare Easy10.png

Updating source files

If you want to compile newer versions, download the source from github

https://github.com/ESP8266nu/ESPEasy

and copy these folders over the current ones that were obtained with the R120 zipfile.