Configuration in ago, see
In machine.ino:
You have to define the GPIO Pin for each channel which are wired to your relay board:
see line 50:
Configuration in ago, see
In machine.ino:
You have to define the GPIO Pin for each channel which are wired to your relay board:
see line 50:
I have modified the code as you instructed for the following GPIO: 15, 2, 4, 16, 17, 5, 18, 19.
As far as I know, when I configure the machine board, it should turn green, but this does not happen.
The relays keep clicking continuously.
Here are some videos and pictures of it
https://drive.google.com/drive/folders/1Xa1T6lodRSiidMeaFf9aScccqTKc7oos?usp=sharing
It seems like your ESP32 is restarting every little bit. Can you watch on the serial monitor to verify?
Edit: which code base are you using? The official code from aghardware, or MTZ8302 code? I might take a look when I get back to the computer.
I use this code
Why not use the MTZ8302 code? I did run the Arduino_USB_v5 code, the ESP is resetting every second or so, due to a watchdog timer.
rst:0x8 (TG1WDT_SYS_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:0x3fff0030,len:4832
load:0x40078000,len:16460
load:0x40080400,len:4
load:0x40080404,len:3504
entry 0x400805cc
But the MTZ code was made to run on an esp, so it would be better to just use it. Note that you must install the esp32 library version 2, not v3.
May you have problems caused from using a bootstrap pin.
First check out via serial monitor if esp32 reboots all the time.
Disconnect all relay channels and try one by one. For the first test, define only one channel in firmware and test it together with the relayboard. First try non Bootstrap pins like GPIO 4,15,17,18,19
Without following changes esp32 would not save configuration data in eeprom:
For ESP32 eeprom handling you have to add EEPROM.commit();
in the following lines:
edit
I forgot,
Instead using resetFunc()
add esp_restart();
I did some test and figured out that connecting GPIO 2 to relay board causes such malfunction.
So use 15,4,16,17,5,18,19,23
Here you can find the adapted firmware for usb (GPIOs: 15,4,16,17,5,18,19,23):
Machine_USB_ESPv5.zip (3,5 KB)
Don’t forget to connect your machine usb port in AGIO !!!