I am waiting for the kc868-A16 to be delivered. My goal is to make a complete program in Arduino to support my own smart elements - the superior system is Domoticz/HomeAssistant. Are there any examples in Arduino that show how to implement access to all PCF and other in/out ports (pins, addresses) as well as the LAN module (pins, addresses) in the Arduino environment? If so, where can I find them. I know that you can do reverse engineering and laboriously check and test everything - but if someone has already figured it out - maybe they could share a few source files.
11-14-2024, 10:29 AM (This post was last modified: 11-14-2024, 11:08 AM by boe666.)
When I try to compile the example I get the messagerc/WebServer_WT32_ETH01.h:63:4: error: #error This code is designed to run on ESP32 platform! Please check your Tools->Board setting.
Espressif ESP32 installed (boards). Selected board ESP32 S3 Box or WT32-ETH1. Regardless of which board variant I choose - I get the same message. Any tips?
but which one exactly, because there are many types of ESP32 boards in Espressif. There is no regular ESP32.
In the thread https://www.kincony.com/forum/showthread.php?tid=1613 it says to choose NodeMCU-32S - that's the name of the board but no changes - the same message.
I have the WebServer_WT32_ETH01 library installed, the problem lies in the STM32 definition in the code of this library. Just change the line #if ESP32 to #if !ESP32 and the compiler goes on. However, there is another problem with the PCF8547 library.. in the second picture.
11-14-2024, 12:18 PM (This post was last modified: 11-14-2024, 12:43 PM by boe666.)
Probably you have to use Renzo Mischianti's PCF8574 library. Now the problem is the ETH.h library - which one to use? I have installed https://docs.arduino.cc/libraries/ethernet/ in newest version but I see that the esp32 library has its own ETH.h (so I uninstalled my) libraries. It says that constants should be defined, for example:
#ifndef ETH_PHY_TYPE
#define ETH_PHY_TYPE ETH_PHY_LAN8720
#define ETH_PHY_ADDR 0
#define ETH_PHY_MDC 23
#define ETH_PHY_MDIO 18
#define ETH_PHY_POWER -1
#define ETH_CLK_MODE ETH_CLOCK_GPIO0_IN
#endif
The compiler reports as follows:
PHP Code:
C:\Users\mkapski\Documents\Arduino\testy_kicony_v2_demo1\testy_kicony_v2_demo1.ino: In function 'void setup()': C:\Users\mkapski\Documents\Arduino\testy_kicony_v2_demo1\testy_kicony_v2_demo1.ino:288:12: error: no matching function for call to 'ETHClass::begin(int, int)' 288 | ETH.begin(ETH_PHY_ADDR, ETH_PHY_POWER); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from c:\Users\mkapski\Documents\Arduino\libraries\WebServer_WT32_ETH01\src/WebServer_WT32_ETH01.hpp:76, from c:\Users\mkapski\Documents\Arduino\libraries\WebServer_WT32_ETH0 1\src/WebServer_WT32_ETH01.h:72, from C:\Users\mkapski\Documents\Arduino\testy_kicony_v2_demo1\testy_kicony_v2_demo1.ino:23: C:\Users\mkapski\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\libraries\Ethernet\src/ETH.h:126:8: note: candidate: 'bool ETHClass::begin(eth_phy_type_t, int32_t, int, int, int, eth_clock_mode_t)' 126 | bool begin(eth_phy_type_t type, int32_t phy_addr, int mdc, int mdio, int power, eth_clock_mode_t clk_mode); | ^~~~~ C:\Users\mkapski\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\libraries\Ethernet\src/ETH.h:126:8: note: candidate expects 6 arguments, 2 provided C:\Users\mkapski\AppData\Local\Arduino15\packages\esp32\hard ware\esp32\3.0.7\libraries\Ethernet\src/ETH.h:129:8: note: candidate: 'bool ETHClass::begin(eth_phy_type_t, int32_t, int, int, int, SPIClass&, uint8_t)' 129 | bool begin(eth_phy_type_t type, int32_t phy_addr, int cs, int irq, int rst, SPIClass &spi, uint8_t spi_freq_mhz = ETH_PHY_SPI_FREQ_MHZ); | ^~~~~ C:\Users\mkapski\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\libraries\Ethernet\src/ETH.h:129:8: note: candidate expects 7 arguments, 2 provided C:\Users\mkapski\AppData\Local\Arduino15\packages\esp32\hard ware\esp32\3.0.7\libraries\Ethernet\src/ETH.h:131:8: note: candidate: 'bool ETHClass::begin(eth_phy_type_t, int32_t, int, int, int, spi_host_device_t, int, int, int, uint8_t)' 131 | bool begin( | ^~~~~ C:\Users\mkapski\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\libraries\Ethernet\src/ETH.h:131:8: note: candidate expects 10 arguments, 2 provided C:\Users\mkapski\AppData\Local\Arduino15\packages\ esp32\hardware\esp32\3.0.7\libraries\Ethernet\src/ETH.h:136:8: note: candidate: 'bool ETHClass::begin()' 136 | bool begin() { | ^~~~~ C:\Users\mkapski\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\libraries\Ethernet\src/ETH.h:136:8: note: candidate expects 0 arguments, 2 provided exit status 1 Compilation error: no matching function for call to 'ETHClass::begin(int, int)'
11-14-2024, 01:03 PM (This post was last modified: 11-14-2024, 01:39 PM by boe666.)
(11-14-2024, 12:36 PM)admin Wrote: here is PCF8574 arduino library we are using.
PCF problem solved. What about ETH.h library and compiler errors? Which library should I use? Currently the one built into the esp32 library is used, which can be seen in the error logs.
Interestingly, the example from the esp32 / Ethernet library called ETH_LAN8720 compiles without errors in the same Arduino environment. Request for support. Ultimately, I would like to use the MYSENSORS library, but I have to start with the network first.