hideakitai / ArtNet

Art-Net Sender/Receiver for Arduino (Ethernet, WiFi)
MIT License
257 stars 52 forks source link

Support for WT32-ETH01 board #37

Closed burner- closed 1 year ago

burner- commented 2 years ago

These changes provide support for ESP32 framework own ETH library. Library support by default at least WT32-ETH01 board. At ESP32.

Jack079 commented 2 years ago

Hi, Do you have a working example script?

I did add line 584 - 589 to ArtnetCommon.h And add the ArtnetETH.h file.

I tried the ethernet reciever example and changed to ArtnetETH.h, now I get a 'Ethernet was not delared in this scope' error.

In the Wifi receiver example it was unable to connect to my network.

burner- commented 2 years ago

Hi, Do you have a working example script?

I did add line 584 - 589 to ArtnetCommon.h And add the ArtnetETH.h file.

I tried the ethernet reciever example and changed to ArtnetETH.h, now I get a 'Ethernet was not delared in this scope' error.

In the Wifi receiver example it was unable to connect to my network.

I cannot put full code at this point. But there is start part of my .ino file.

#define ETH_PHY_ADDR        1
#define ETH_PHY_TYPE    ETH_PHY_LAN8720
#define ETH_PHY_POWER  16
#define ETH_PHY_MDC     23
#define ETH_PHY_MDIO    18
#define ETH_CLK_MODE    ETH_CLOCK_GPIO0_IN  //  ETH_CLOCK_GPIO17_OUT
#include <ETH.h>

#include <WiFi.h>
#include <WiFiClient.h>
#include <WiFiUdp.h>

#include <time.h>
#include "FS.h"
#include "SPIFFS.h"
#include "update.h"

#include <ArtnetETH.h> // https://github.com/burner-/ArtNet
PureTek-Innovations commented 2 years ago

Hi @burner- Thank you very much for your work on this library and for this pull request. I'm using your fork of the library to send Artnet data from a WT32-ETH01 board. https://github.com/burner-/ArtNet I had to make some minor changes to get it to work.

I changed lines 57,58 and 59 in ArtnetETH.h from using ArtnetWiFi = arx::artnet::Manager; using ArtnetWiFiSender = arx::artnet::Sender; using ArtnetWiFiReceiver = arx::artnet::Receiver;

to using Artnet = arx::artnet::Manager; using ArtnetSender = arx::artnet::Sender; using ArtnetReceiver = arx::artnet::Receiver;

It now works brilliantly and is almost three times faster, on my setup, than streaming the data just over WiFi. I now stream the data to the router by Ethernet and then from the router to the nodes by WiFi. I'm currently driving 11,175 LEDs, split across 4 ESP32 WiFi nodes, at 57 frames per second and losing less than 0.1% of frames.

Again, thank you very much to everyone who has worked on this library.

Just to help other people, including @Jack079, my minimal setup code is:

include //https://github.com/burner-/ArtNet

include

define ETH_CLK_MODE ETH_CLOCK_GPIO0_IN

define ETH_POWER_PIN 16

define ETH_TYPE ETH_PHY_LAN8720

define ETH_ADDR 1

define ETH_MDC_PIN 23

define ETH_MDIO_PIN 18

Artnet artnet;

setup(){ ETH.begin(ETH_ADDR, ETH_POWER_PIN, ETH_MDC_PIN, ETH_MDIO_PIN, ETH_TYPE, ETH_CLK_MODE); artnet.begin(); }

[edits for clarity]

burner- commented 2 years ago

@PureTek-Innovations 2793led per driver? What led you use or do you use multiple channels?

PureTek-Innovations commented 2 years ago

@burner- I'm using WS2815s split over 9 pins, the maximum strip length is about 325 leds. I'm using this library to receive the data and write it to the leds. https://github.com/hpwit/artnetESP32

I have only fitted half the leds so far, there will be about 22,000 when it's done. There's an update on the project on r/FastLED here: https://www.reddit.com/r/FastLED/comments/yrorqg/spin_room_update_over_11000_ws2815s_up_and

burner- commented 2 years ago

@PureTek-Innovations nice do you have possibility to publish code? I would see that how you drive those 9 pins with same device.

PureTek-Innovations commented 2 years ago

@burner- Here's the receiving code https://gist.github.com/PureTek-Innovations/88810a96100c3ae8ce119965c521663e

hideakitai commented 1 year ago

Thank you for your contribution. Fixed by https://github.com/hideakitai/ArtNet/pull/48