Forum Replies Created
-
AuthorPosts
-
usydowParticipantI have a few hardware questions?
I have tested a LAN connection.
Since I still had a board with the LAN8720, this was no problem. The drivers are already present by default. Like in the example code:
https://github.com/espressif/arduino-esp32/blob/f1b06d2a74acdef190ac16e83d48ab619f557e73/libraries/Ethernet/examples/ETH_LAN8720/ETH_LAN8720.ino
Runs without problems! (Testcode)
byte OpenSprinkler::start_network() {
lcd_print_line_clear_pgm(PSTR(“Starting…”), 1);
uint16_t httpport = (uint16_t)(iopts[IOPT_HTTPPORT_1]<<8) + (uint16_t)iopts[IOPT_HTTPPORT_0];#ifdef ENABLE_DEBUG
#if defined(ESP32)
//DEBUG_PRINTLN(F(“SPIFFS dir:”));
//SPIFFS_list_dir();
DEBUG_PRINTLN(F(“Starting network”));
useEth = false;
WiFi.onEvent(WiFiEvent);
ETH.begin(ETH_PHY_ADDR, ETH_PHY_POWER, ETH_PHY_MDC, ETH_PHY_MDIO, ETH_PHY_TYPE, ETH_CLK_MODE);
delay(1000);
#endif //ESP32
#endif#if defined(ESP8266) || defined(ESP32)
DEBUG_PRINT(“ETH enabled: “);
DEBUG_PRINTLN(useEth);
DEBUG_PRINT(“Wifi mode: “);
DEBUG_PRINTLN(( get_wifi_mode() == WIFI_MODE_STA ) ? F(“STA”) : F(“AP”));
//start_network_sta(“myssid”,”mypassword”);
// FIXME, just for testing
//::start_server_ap();
Since now relatively many GPIOs are needed for the LAN connection I would control the portexpander via I2C. Or does the 74HC595 have advantages?
What is the encoder needed for?
usydowParticipant@V1pr
I have found a workaround!
There seems to be no WIFI connection, so the start of the web server goes nowhere.DEBUG_PRINT(“ETH enabled: “);
DEBUG_PRINTLN(useEth);
DEBUG_PRINT(“Wifi mode: “);
DEBUG_PRINTLN(( get_wifi_mode() == WIFI_MODE_STA ) ? F(“STA”) : F(“AP”));
–> start_network_sta(“myssid”,”mypassword”);
// FIXME, just for testing
//::start_server_ap();
delay(500);
if((useEth || get_wifi_mode()==WIFI_MODE_STA) && otc.en>0 && otc.token.length()>=32) {
otf = new OTF::OpenThingsFramework(httpport, otc.server, otc.port, otc.token, false, ether_buffer, ETHER_BUFFER_SIZE);
DEBUG_PRINTLN(F(“Started OTF with remote connection”));
usydowParticipantok no problem I can attach a LCD-Modul tomorrow.
usydowParticipantWith me it crashes immediately when creating a network.
I have monetan but also only an esp32 devkit as a dummy at the start.
can it be that it runs only with the shift register?Attachments:
usydowParticipantsorry had not read the note!
usydowParticipantHello V1pr thanks for your work, I am also just looking for a running ESP32 -Version. Since my Rassberry had not survived a thunderstorm last summer.
Unfortunately I can not compile the version from the GIT.
What am I doing wrong?
Thanks for the supportAttachments:
-
AuthorPosts