ESPEasy32

From Let's Control It
Jump to: navigation, search

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
  • I2C Clock Stretching
  • Dir info on filesystemcheck call

Getting Started

Stuff used to get things going:

WemosLolin32Lite.png

  • Exclude the following plugins from the project, these will currently not compile without errors:
  • _N002_Buzzer.ino
  • _P010_BH1750.ino
  • _P016_IR.ino
  • _P035_IRTX.ino
  • _P049_MHZ19.ino
  • _P052_SenseAir.ino


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

If you want to compile your own binary, do not use the latest Arduino ESP32 core, it has a SPIFFS bug and your ESP32 will not boot!

To go the easy route, just use the prebuild binary:

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...

Arduino ESP32 Core from 2017-12-19

ESPEasy source from 2018-03-30