OpenSprinkler › Forums › OpenSprinkler Unified Firmware › ESP32 port of 2.1.9 firmware › Reply To: ESP32 port of 2.1.9 firmware
Corinake
Hi.
First of all, Ja.carer and V1pr’s congratulations for the work done.
I use this version of the motherboard with relays:
https://werner.rothschopf.net/microcontroller/202208_esp32_relay_x8_en.htm
I tested the 2.1.9 version of Ja.carr and everything is functional, 8 relays, display, buttons, and both sensors.
I also tested version 2.2.0 of V1pr’s and is functionally almost everything, except sensor 2.
Also in the console I am constantly appearing an error: gpio: gpio_set_level(226): GPIO output gpio_num error
In ESP32.H I changed the pin number from sensor 1 to sensor 2 and then the sensor 1 did not work and the sensor 2 worked.
To check the operation of the sensors, simply connect the cable from the sensor to the common grounding.
With the last option of ESP32H that you have loaded in reposis, where you commented those definitions in the last part, I cannot compile.
If I remove the comments as in the previous version, it works
I also attached my log in the console, as well as the functions of the pins.
In version 2.1.9 it did not work to use pins with the “input_only” function.
In version 2.2.0 I did not try, but I tried with pins 18 and 17. Sensor 2 did not work
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:2
load:0x3fff0030,len:1184
load:0x40078000,len:13192
load:0x40080400,len:3028
entry 0x400805e4
[ 45][E][Y.���\�����5
hw_type = 172 hw_rev = 0
E (46) gpio: gpio_set_level(226): GPIO output gpio_num error
Starting sensors – INPUT_PULLUP
Sensor1 PIN: 19
Sensor2 PIN: 5
Starting RFTX pins
RFTX PIN: 255
LCD SSD1306 init
Init file system…
Flash size: 4194304 bytes
Listing directory: /
FILE: done.dat SIZE: 1
FILE: iopts.dat SIZE: 64
FILE: nvcon.dat SIZE: 16
FILE: prog.dat SIZE: 1
FILE: sopts.dat SIZE: 1920
FILE: stns.dat SIZE: 17856
Done.
Detecting RTC…done.
[ 1836][E][WiFiAP.cpp:141] softAP(): SSID missing!
Starting AP with SSID
— Setting up options
— PD init
— Time setup
FILE: done.dat
FILE: iopts.dat
FILE: nvcon.dat
FILE: prog.dat
FILE: sopts.dat
FILE: stns.dat
Starting network
ETH enabled: 0
Wifi mode: STA
OTF start with http_port 80
Started OTF with just local connection
DNSServer start
Setting update server
Started update server
— MQTT Init
2106-02-07 01:28:29 – MQTT Init
2106-02-07 01:28:29 – MQTT Init: ClientId OS-94E68689BCB4
E (13105) gpio: gpio_set_level(226): GPIO output gpio_num error
Setting up WiFi client
Connecting in STA to WiFi network Deea
E (13193) gpio: gpio_set_level(226): GPIO output gpio_num error
E (13979) gpio: gpio_set_level(226): GPIO output gpio_num error
This is a part from esp32.h:
#define E0_PIN_BUTTON_1 18 // button 1
#define E0_PIN_BUTTON_2 17 // button 2
#define E0_PIN_BUTTON_3 16 // button 3
#define E0_PIN_RFRX 255
#define E0_PIN_RFTX 255
#define E0_PIN_BOOST 255// special HW needed
#define E0_PIN_BOOST_EN 255// special HW needed
#define E0_PIN_LATCH_COM 255// not needed for ESP32
#define E0_PIN_SENSOR1 19 // sensor 1
#define E0_PIN_SENSOR2 5 // sensor 2
#define E0_PIN_IOEXP_INT 255// not needed for ESP32
#define PIN_ETHER_CS 255 // ENC28J60 CS (chip select pin) is 16 on OS 3.2.
#define USE_IOEXP_SR 0 // use Shift-register as station setting – uncomment this to use built-in gpio style
#define ON_BOARD_GPIN_LIST {13,12,14,27,26,25,33,32} // ESP32 on board gpins to be usead as sections, 255 – pin not defined
#define PIN_FREE_LIST {} // no free GPIO pin at the moment
//#define PIN_FREE_LIST {01,03,04,02,15,00} // no free GPIO pin at the moment
// if set to a real ADC pin, than it means the board has current sensor capabilities
#define PIN_CURR_SENSE 39 // not used on v1pr’s board, so 255
#define STATION_LOGIC 1 // Zone output logic for relays – 1 => HIGH in ON, 0 => LOW is ON – v1pr board: 1
// Rotary Encoder instead of buttons – not used for now
//#define USE_ROTARY_ENCODER
#define ROTARY_ENCODER_A_PIN 255 //35
#define ROTARY_ENCODER_B_PIN 255 //34
#define ROTARY_ENCODER_BUTTON_PIN 255 //36 // this should be same, as one of the BUTTON_PINS
#define ROTARY_ENCODER_VCC_PIN -1
#define BOOT_MENU_V2
#define SEPARATE_MASTER_VALVE 255
// 74HC595 shift reg
// #define IOEXP_SR_OE_PIN // output enable pin, not used now
#define IOEXP_SR_DATA_PIN 255 //25
#define IOEXP_SR_CLK_PIN 255 //27
#define IOEXP_SR_LATCH_PIN 255 //32
#define SYS_STATUS_LED_PIN 23