Difference between revisions of "ESPEasy32"

From Let's Control It
Jump to navigation Jump to search
Line 53: Line 53:
 
* Webserver library: https://github.com/nhatuan84/esp32-webserver
 
* Webserver library: https://github.com/nhatuan84/esp32-webserver
 
* Copied DNS server library from ESP8266 Arduino core
 
* Copied DNS server library from ESP8266 Arduino core
 +
* Copied core_version.h from Arduino ESP8266 core
 
* Copied libraries from ESP Easy github
 
* Copied libraries from ESP Easy github
 
* Latest ESP Easy source: https://github.com/letscontrolit/ESPEasy/commits/mega
 
* Latest ESP Easy source: https://github.com/letscontrolit/ESPEasy/commits/mega

Revision as of 08:29, 12 February 2018

WIP.gifYou may hear some construction noise in the background...

Experimental !

Introduction

Although the ESP32 Arduino Core isn't mature yet, we're just checking how far we get when we try to run ESP Easy Mega on this module.

One could argue that the ESP32 module (running on RTOS with a dual core) would rather deserve a total rebuild from scratch, but that would require a new github project and some developers with a lot of spare time. As my spare time is limited, this experiment is just about getting the existing ESP Easy code to work on ESP32 Arduino Core without too much effort.

The good news: Some basic stuff already seems to work:

ESPEasy32Sample.png

Project Scope

Current focus is to get the ESP Easy Mega framework working as development target for the V2.1 branch. Framework means all code without plugins. But as we can't really verify some parts of the framework without any plugins, a few basic plugins are included in the testbed. So the scope is to get these parts working:

  • ESP Easy Mega Framework
  • Controller plugin C001 (Domoticz)
  • P001 - basic IO stuff
  • P002 - basic Analog readings
  • P003 - counting, to verify ISR workings
  • P014 - to verify I2C workings

Status

Verified to work

  • Webserver GUI
  • SPIFFS filesystem
  • Wifi connection
  • HTTP client
  • Basic IO: GPIO, PWM, Pulse
  • Analog inputs
  • Rules engine
  • I2C
  • OTA (using espota tool)

Todo

  • SSDP
  • RTC
  • Some UDP calls (syslog, sendtoUDP)
  • I2C Clock Stretching
  • Dir info on filesystemcheck call


Getting Started

Stuff used to get things going:

WemosLolin32Lite.png


Boot log on first upload to ESP32 module:

INIT : Booting version: (custom)
INIT : Cold Boot
FS   : Mounting...
E (41) SPIFFS: mount failed, -10025
FS   : Mount failed
FS   : Mount failed
RESET: Resetting factory defaults...
RESET: Cold boot
RESET: formatting...
RESET: formatting done...
FILE : Saved /config.dat
FILE : Saved /security.dat
RESET: Succesful, rebooting. (you might need to press the reset button if you've justed flashed the firmware)
ets Jun  8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0010,len:4
load:0x3fff0014,len:812
load:0x40078000,len:0
load:0x40078000,len:10164
entry 0x400789f8
⸮U


INIT : Booting version: (custom)
INIT : Cold Boot
FS   : Mounting...
INIT : Free RAM:162772
INIT : I2C
INIT : SPI not enabled
WIFI : AP Mode disabled
WIFI : AP Mode ssid will be ESP_Easy_0 with address 192.168.4.1
WIFI : Could not connect to AP!
WIFI : AP Mode enabled
WD   : Uptime 0 ConnectFailures 0 FreeMem 109764

Firmware

Download this zip package and unpack to your local drive (windows only)

Two cmd files are available, one to flash using serial and one to flash using OTA. For fresh units, you need to flashserial first...

This firmware was build on Wemos Lolin32. It may work on other modules but this has not been tested...

ESPEasy source from 2017-11-05, Arduino ESP32 Core from 2017-10-22:

ESPEasy source from 2018-02-11, Arduino ESP32 Core from 2017-12-19:

(do not use the latest Arduino ESP32 core, it has a SPIFFS bug and your ESP32 will not boot!)