GithubHelp home page GithubHelp logo

artnet's Introduction

Top Langs github stats

artnet's People

Contributors

alfie1706 avatar hideakitai avatar japhsc avatar mr-comand avatar mrfrangipane avatar thinksilicon avatar thirstyice avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

artnet's Issues

Logo proposal

HI @hideakitai
I am a designer , i want to contribute in this project by providing a design.I just need a permission to make a logo for this projects,if you have any requirments then let me know.
thanks

max fixture number

is there any restriction regarding the maximum fixture (artnet slaves) number? I'm not able to control more than 10 devices...

thanks in advance

The sender example doesn't work

Hi, congratulations for the excellent work!
I tried running the sender.ino sample sketch in my Arduino Uno board with Ethernet Shield (W5100). Sketch freezes when streaming. The ip address ping is not responding and no udp (artnet) packet is sent to my target device.
Doing some tests I realized that the "packet.size()" function in the send() function in Artnet.h returns 0. Is this normal?
Is the project not compatible with my hardware?
Thank you.

Question: Is it save to call artnet.parse() with some delay?

Hi, thanks for your good library!
I'm using FastLED with Artnet on an ESP32 with ESP-IDF and Arduino as component.
I have a Artnet read task and a Fastled show task. The read task is filling the buffer and syncs with the fastled.show() task to let it push the data to the stripe.
To free up ressources I tried to pause the Artnet read task to start 22ms after last execution because Artnet has 44FPS max framerate. So 1000/44 ~= 22
The problem is that I get lags. It looks that some frame getting dropped sometimes. But even without delaying the task I get some drops. So I'm asking myself if the problem is the delay of the tasks(are new packets "overriding" old ones which didn't got handled by the callback yet?) , the network (losing some packets) or the syncing between the tasks (I have put everything in the same task, but it lagged anyway). Even if I think it is a problem of the network (using an Android hotspot), I'm curious about the the question if I can pause the task for some time?

use esp32 wth can't compile

Sorry my English is not very good
This text was translated by google
I try to read artnet with lan8720 on esp32-s
but when i compile i get the following error

In file included from c:\Users\lyuchan\Documents\Arduino\libraries\ArtNet/ArtnetETH.h:12,
                 from C:\Users\lyuchan\AppData\Local\Temp\.arduinoIDE-unsaved202389-17576-1tijkoz.30ua\receiver\receiver.ino:1:
c:\Users\lyuchan\Documents\Arduino\libraries\ArtNet/Artnet/ArtnetCommon.h:628:60: error: 'EthernetUDP' was not declared in this scope
         auto localIP() -> std::enable_if_t<std::is_same<T, EthernetUDP>::value, IPAddress> {
                                                            ^~~~~~~~~~~
c:\Users\lyuchan\Documents\Arduino\libraries\ArtNet/Artnet/ArtnetCommon.h:628:60: note: suggested alternative: 'EthernetClass'
         auto localIP() -> std::enable_if_t<std::is_same<T, EthernetUDP>::value, IPAddress> {
                                                            ^~~~~~~~~~~
                                                            EthernetClass
c:\Users\lyuchan\Documents\Arduino\libraries\ArtNet/Artnet/ArtnetCommon.h:628:71: error: template argument 2 is invalid
         auto localIP() -> std::enable_if_t<std::is_same<T, EthernetUDP>::value, IPAddress> {
                                                                       ^
c:\Users\lyuchan\Documents\Arduino\libraries\ArtNet/Artnet/ArtnetCommon.h:628:90: error: template argument 1 is invalid
         auto localIP() -> std::enable_if_t<std::is_same<T, EthernetUDP>::value, IPAddress> {
                                                                                          ^
c:\Users\lyuchan\Documents\Arduino\libraries\ArtNet/Artnet/ArtnetCommon.h:632:63: error: 'EthernetUDP' was not declared in this scope
         auto subnetMask() -> std::enable_if_t<std::is_same<T, EthernetUDP>::value, IPAddress> {
                                                               ^~~~~~~~~~~
c:\Users\lyuchan\Documents\Arduino\libraries\ArtNet/Artnet/ArtnetCommon.h:632:63: note: suggested alternative: 'EthernetClass'
         auto subnetMask() -> std::enable_if_t<std::is_same<T, EthernetUDP>::value, IPAddress> {
                                                               ^~~~~~~~~~~
                                                               EthernetClass
c:\Users\lyuchan\Documents\Arduino\libraries\ArtNet/Artnet/ArtnetCommon.h:632:74: error: template argument 2 is invalid
         auto subnetMask() -> std::enable_if_t<std::is_same<T, EthernetUDP>::value, IPAddress> {
                                                                          ^
c:\Users\lyuchan\Documents\Arduino\libraries\ArtNet/Artnet/ArtnetCommon.h:632:93: error: template argument 1 is invalid
         auto subnetMask() -> std::enable_if_t<std::is_same<T, EthernetUDP>::value, IPAddress> {
                                                                                             ^
c:\Users\lyuchan\Documents\Arduino\libraries\ArtNet/Artnet/ArtnetCommon.h:636:75: error: 'EthernetUDP' was not declared in this scope
         auto macAddress(uint8_t* mac) -> std::enable_if_t<std::is_same<T, EthernetUDP>::value> {
                                                                           ^~~~~~~~~~~
c:\Users\lyuchan\Documents\Arduino\libraries\ArtNet/Artnet/ArtnetCommon.h:636:75: note: suggested alternative: 'EthernetClass'
         auto macAddress(uint8_t* mac) -> std::enable_if_t<std::is_same<T, EthernetUDP>::value> {
                                                                           ^~~~~~~~~~~
                                                                           EthernetClass
c:\Users\lyuchan\Documents\Arduino\libraries\ArtNet/Artnet/ArtnetCommon.h:636:86: error: template argument 2 is invalid
         auto macAddress(uint8_t* mac) -> std::enable_if_t<std::is_same<T, EthernetUDP>::value> {
                                                                                      ^
c:\Users\lyuchan\Documents\Arduino\libraries\ArtNet/Artnet/ArtnetCommon.h:636:94: error: template argument 1 is invalid
         auto macAddress(uint8_t* mac) -> std::enable_if_t<std::is_same<T, EthernetUDP>::value> {
                                                                                              ^
c:\Users\lyuchan\Documents\Arduino\libraries\ArtNet/Artnet/ArtnetCommon.h: In member function 'void arx::artnet::Receiver_<S>::poll_reply()':
c:\Users\lyuchan\Documents\Arduino\libraries\ArtNet/Artnet/ArtnetCommon.h:533:31: error: there are no arguments to 'localIP' that depend on a template parameter, so a declaration of 'localIP' must be available [-fpermissive]
             IPAddress my_ip = localIP();
                               ^~~~~~~
c:\Users\lyuchan\Documents\Arduino\libraries\ArtNet/Artnet/ArtnetCommon.h:533:31: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
c:\Users\lyuchan\Documents\Arduino\libraries\ArtNet/Artnet/ArtnetCommon.h:534:35: error: there are no arguments to 'subnetMask' that depend on a template parameter, so a declaration of 'subnetMask' must be available [-fpermissive]
             IPAddress my_subnet = subnetMask();
                                   ^~~~~~~~~~
c:\Users\lyuchan\Documents\Arduino\libraries\ArtNet/Artnet/ArtnetCommon.h:535:13: error: there are no arguments to 'macAddress' that depend on a template parameter, so a declaration of 'macAddress' must be available [-fpermissive]
             macAddress(r.mac);
             ^~~~~~~~~~
c:\Users\lyuchan\Documents\Arduino\libraries\ArtNet/Artnet/ArtnetCommon.h: In instantiation of 'void arx::artnet::Receiver_<S>::poll_reply() [with S = WiFiUDP]':
c:\Users\lyuchan\Documents\Arduino\libraries\ArtNet/Artnet/ArtnetCommon.h:319:25:   required from 'arx::artnet::OpCode arx::artnet::Receiver_<S>::parse() [with S = WiFiUDP]'
C:\Users\lyuchan\AppData\Local\Temp\.arduinoIDE-unsaved202389-17576-1tijkoz.30ua\receiver\receiver.ino:44:18:   required from here
c:\Users\lyuchan\Documents\Arduino\libraries\ArtNet/Artnet/ArtnetCommon.h:533:38: error: 'localIP' was not declared in this scope
             IPAddress my_ip = localIP();
                               ~~~~~~~^~
c:\Users\lyuchan\Documents\Arduino\libraries\ArtNet/Artnet/ArtnetCommon.h:533:38: note: suggested alternative: 'locale_t'
             IPAddress my_ip = localIP();
                               ~~~~~~~^~
                               locale_t
c:\Users\lyuchan\Documents\Arduino\libraries\ArtNet/Artnet/ArtnetCommon.h:534:45: error: 'subnetMask' was not declared in this scope
             IPAddress my_subnet = subnetMask();
                                   ~~~~~~~~~~^~
c:\Users\lyuchan\Documents\Arduino\libraries\ArtNet/Artnet/ArtnetCommon.h:534:45: note: suggested alternative: 'subnet'
             IPAddress my_subnet = subnetMask();
                                   ~~~~~~~~~~^~
                                   subnet
c:\Users\lyuchan\Documents\Arduino\libraries\ArtNet/Artnet/ArtnetCommon.h:535:23: error: 'macAddress' was not declared in this scope
             macAddress(r.mac);
             ~~~~~~~~~~^~~~~~~
c:\Users\lyuchan\Documents\Arduino\libraries\ArtNet/Artnet/ArtnetCommon.h:535:23: note: suggested alternative: 'IPAddress'
             macAddress(r.mac);
             ~~~~~~~~~~^~~~~~~
             IPAddress
In file included from c:\users\lyuchan\appdata\local\arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\gcc8_4_0-esp-2021r2-patch5\xtensa-esp32-elf\include\c++\8.4.0\functional:59,
                 from C:\Users\lyuchan\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.6\cores\esp32/HardwareSerial.h:49,
                 from C:\Users\lyuchan\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.6\cores\esp32/Arduino.h:174,
                 from C:\Users\lyuchan\AppData\Local\Temp\arduino\sketches\22BDCCF2C1E9CBFCBE796CC6290E8E9D\sketch\receiver.ino.cpp:1:
c:\users\lyuchan\appdata\local\arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\gcc8_4_0-esp-2021r2-patch5\xtensa-esp32-elf\include\c++\8.4.0\bits\std_function.h: At global scope:
c:\users\lyuchan\appdata\local\arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\gcc8_4_0-esp-2021r2-patch5\xtensa-esp32-elf\include\c++\8.4.0\bits\std_function.h:666:7: error: 'std::function<_Res(_ArgTypes ...)>::function(_Functor) [with _Functor = setup()::<lambda(const uint8_t*, uint16_t)>; <template-parameter-2-2> = void; <template-parameter-2-3> = void; _Res = void; _ArgTypes = {const unsigned char*, short unsigned int}]', declared using local type 'setup()::<lambda(const uint8_t*, uint16_t)>', is used but never defined [-fpermissive]
       function<_Res(_ArgTypes...)>::
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

exit status 1

Compilation error: exit status 1

ESP32-Ethernet-Kit V1.2 does not work

Hi,

I have the ESP32-Ethernet-Kit V1.2 board and am trying to set it up with this library. I am using the unchanged "receiver" code. It is plugged to my laptop using the micro-usb and the LAN cable as well. The code compiles and runs, but I am unable to detect it using CMD, nor Art-Net software.

I suspect this could be due to some incorrect hard-coded pin name in the library or the Ethernet library, but I am unsure how exactly would I find out. Could it perhaps be something simpler that has an easy solution?

Thanks for any tips!

Compiling receiver example on Raspberry pi pico rp2040

Hello,
I'm trying to compile your example receiver on my rp2040, and I got this error message :

In file included from D:\Users\User\Documents\Arduino\libraries\ArtNet/ArtnetEther.h:14:0,
from D:\Users\User\AppData\Local\Temp\arduino_modified_sketch_849912\receiver.ino:3:
D:\Users\User\Documents\Arduino\libraries\ArtNet/Artnet/ArtnetCommon.h: In instantiation of 'std::enable_if_t<arx::is_callable::value> arx::artnet::Receiver_::subscribe(uint8_t, F&&) [with F = setup()::<lambda(const uint8_t*, uint16_t)>; S = EthernetUDP; std::enable_if_t<arx::is_callable::value> = void; uint8_t = unsigned char]':
D:\Users\User\AppData\Local\Temp\arduino_modified_sketch_849912\receiver.ino:39:6: required from here
D:\Users\User\Documents\Arduino\libraries\ArtNet/Artnet/ArtnetCommon.h:345:32: error: no matching function for call to 'setup()::<lambda(const uint8_t*, uint16_t)>::__lambda5(const char [19])'
Serial.println(F("too many callbacks"));
^~~~~~~~~~~~~~~~~~~~~~~
D:\Users\User\AppData\Local\Temp\arduino_modified_sketch_849912\receiver.ino:28:35: note: candidate: constexpr setup()::<lambda(const uint8_t*, uint16_t)>::(const setup()::<lambda(const uint8_t*, uint16_t)>&)
artnet.subscribe(universe1, [&](const uint8_t* data, const uint16_t size) {
^
D:\Users\User\AppData\Local\Temp\arduino_modified_sketch_849912\receiver.ino:28:35: note: no known conversion for argument 1 from 'const char [19]' to 'const setup()::<lambda(const uint8_t*, uint16_t)>&'
D:\Users\User\AppData\Local\Temp\arduino_modified_sketch_849912\receiver.ino:28:35: note: candidate: constexpr setup()::<lambda(const uint8_t*, uint16_t)>::(setup()::<lambda(const uint8_t*, uint16_t)>&&)
D:\Users\User\AppData\Local\Temp\arduino_modified_sketch_849912\receiver.ino:28:35: note: no known conversion for argument 1 from 'const char [19]' to 'setup()::<lambda(const uint8_t*, uint16_t)>&&'
In file included from D:\Users\User\Documents\Arduino\libraries\ArtNet/ArtnetEther.h:14:0,
from D:\Users\User\AppData\Local\Temp\arduino_modified_sketch_849912\receiver.ino:3:
D:\Users\User\Documents\Arduino\libraries\ArtNet/Artnet/ArtnetCommon.h:348:36: error: no matching function for call to 'setup()::<lambda(const uint8_t*, uint16_t)>::_lambda5(const char [23])'
Serial.println(F("universe out of bounds"));
^~~~~~~~~~~~~~~~~~~~~~~~~~~
D:\Users\User\AppData\Local\Temp\arduino_modified_sketch_849912\receiver.ino:28:35: note: candidate: constexpr setup()::<lambda(const uint8_t*, uint16_t)>::(const setup()::<lambda(const uint8_t*, uint16_t)>&)
artnet.subscribe(universe1, [&](const uint8_t* data, const uint16_t size) {
^
D:\Users\User\AppData\Local\Temp\arduino_modified_sketch_849912\receiver.ino:28:35: note: no known conversion for argument 1 from 'const char [23]' to 'const setup()::<lambda(const uint8_t*, uint16_t)>&'
D:\Users\User\AppData\Local\Temp\arduino_modified_sketch_849912\receiver.ino:28:35: note: candidate: constexpr setup()::<lambda(const uint8_t*, uint16_t)>::(setup()::<lambda(const uint8_t*, uint16_t)>&&)
D:\Users\User\AppData\Local\Temp\arduino_modified_sketch_849912\receiver.ino:28:35: note: no known conversion for argument 1 from 'const char [23]' to 'setup()::<lambda(const uint8_t*, uint16_t)>&&'
In file included from D:\Users\User\Documents\Arduino\libraries\ArtNet/ArtnetEther.h:14:0,
from D:\Users\User\AppData\Local\Temp\arduino_modified_sketch_849912\receiver.ino:3:
D:\Users\User\Documents\Arduino\libraries\ArtNet/Artnet/ArtnetCommon.h: In instantiation of 'std::enable_if_t<arx::is_callable::value> arx::artnet::Receiver
::subscribe(uint8_t, F*) [with F = void(const unsigned char*, short unsigned int); S = EthernetUDP; std::enable_if_t<arx::is_callable::value> = void; uint8_t = unsigned char]':
D:\Users\User\AppData\Local\Temp\arduino_modified_sketch_849912\receiver.ino:42:41: required from here
D:\Users\User\Documents\Arduino\libraries\ArtNet/Artnet/ArtnetCommon.h:360:32: error: invalid cast to function type 'void(const unsigned char*, short unsigned int)'
Serial.println(F("too many callbacks"));
^~~~~~~~~~~~~~~~~~~~~~~
D:\Users\User\Documents\Arduino\libraries\ArtNet/Artnet/ArtnetCommon.h:363:36: error: invalid cast to function type 'void(const unsigned char*, short unsigned int)'
Serial.println(F("universe out of bounds"));
^~~~~~~~~~~~~~~~~~~~~~~~~~~
exit status 1
Erreur de compilation pour la carte Raspberry Pi Pico

have you got a fix for this ?
Thanks for your work,
regards

Use with ENC28J60 ethernet shield?

Is it possible to swap out the Ethernet library used?

UIPEthernet works with the ENC28J60 chip, but the standard Ethernet lib does not.

Not sure if I'm being stupid or there's a way to override it?

What is the 'net' variable?

Some of the functions take the argument 'net':
artnet.subscribe(net, subnet, universe, function);

I'm familiar with what is meant by subnet, universe and function in the context of artnet, but what is 'net'? An IP address? Something else?

ESP32 boards with ethernet still use wifi

ArtNet/Artnet.h

Lines 13 to 19 in 2f06b64

#if defined(ESP_PLATFORM) || defined(ESP8266) || defined(ARDUINO_AVR_UNO_WIFI_REV2) || defined(ARDUINO_SAMD_MKRWIFI1010) || defined(ARDUINO_SAMD_MKRVIDOR4000) || defined(ARDUINO_SAMD_MKR1000) || defined(ARDUINO_SAMD_NANO_33_IOT)
#define ARTNET_ENABLE_WIFI
#endif
#if !defined(ARTNET_ENABLE_WIFI)
#define ARTNET_ENABLE_ETHER
#endif

When using esp32 boards with ethernet, i.e. https://github.com/Xinyuan-LilyGO/LilyGO-T-ETH-POE the library defaults to using wifi without a choice to use ethernet instead.

Is there a way to force using either the wifi or ethernet methods of this library irregardless of the libraries choice? If not currently, can the logic above be modified to allow overriding with a #define within the main sketch before the library is called?

Related is that with this specific board there are alternative ethernet libraries to use, so some further modifications would need to be made to allow this library to work with it. An example of the ethernet can be found here: https://github.com/Xinyuan-LilyGO/LilyGO-T-ETH-POE/blob/master/example/eth/eth.ino

Image of connections

Thank you for your contribution.
But can you post an image of the connections with ESP32 and RS485 to the DMX? Thank you

Olimex ESP32-EVB, ethernet and Artnet does it work?

Hi,

I have ben testing out ArtNet on the Olimex ESP32-EVB (which comes with a RJ45) using you the demo code supplied but I am getting no response. I am primarily interested Artnet over ethernet. I use external test equipment to generate Artnet packets and other equipment to to verify Artnet to verify that the packets are being received. On the same network nothing is being received by the ESP32.
I verified with the boards works using Ethernet by setting up a web client on it. The board has a LAN8720 on it. Any help you can provide would be much appreciated.

Mike Zomo

Artnet Poll Reply

How can i make the artnet poll repley send other Node Report Codes?

Stuck when more then 2 Universes are sent in network

Hey,
first of all great project.

When i'm sending signals through example madrix, the pixels work fine when i'm just sending 2 universes to the network.
Just in the moment i'm sending 3 universes through the network, the pixels are getting slower, and the images getting stuck.

In my program code i only subscribed 2 universes, but it seems to process the third, fourth ... universe.
Would it be possibe to filter it before processing it?

Receiver unsubscribe function

I would like to have a function to cancel / remove / unsubscribe callback functions, in my case for a given universe.

I will be looking into making a PR myself but that probably will be somewhere this or next week.

Unsupported OpCode: 2100

Hello,
at first, thank you, that you build up this great library.
I use your ArtNet-0.2-2.11 lib at my project as ArtNet in and out. In this project I control a media server to do a single layer transition. It’s work fine, if I use a normal ArtNet node sender to send ArtNet Data to my Arduino Mega with W5100 Ethernet shield. But if I connect it the network cable with GrandMA3 with GrandMA2 Software, so I become over the Arduino serial monitor, this error massage:
Unsupported OpCode: 2100
And my project don’t work. If I use your receiver example, the same error.

I hope someone can help me here. Thanks in advance.

I use for coding Arduino IDE 1.8.16
ArtNet send with: AVR Node - DMX Ethernet Gateway https://www.ulrichradig.de/home/index.php/dmx/alias-2
arduino mega 256 board
W5100 Mini LAN Ethernet Shield https://www.ebay.de/itm/273892669982?chn=ps&_trkparms=ispr%3D1&amdata=enc%3A1GrljCyDWTMyVKz1BQ9SeYQ40&norover=1&mkevt=1&mkrid=707-134425-41852-0&mkcid=2&itemid=273892669982&targetid=1396098981494&device=c&mktype=pla&googleloc=9041941&poi=&campaignid=14472331666&mkgroupid=125370287694&rlsatarget=pla-1396098981494&abcId=9300652&merchantid=113833088&gclid=Cj0KCQiAzMGNBhCyARIsANpUkzNOON-QHsRqEhtsnski9ZbJnvpWZB-pL_t4zC9ATVQ5muC7F3XGEUYaAiBmEALw_wcB
grandMA3 light with grandMA2 Software https://www.malighting.com/product/grandma3-light-4010502/

Can't make example files work

Hi, i tried to used two of your example files ( artnet receiver & artnet fastled ) and i've got some issue.

I used them on arduino Uno, then on Mega because i read about lack of memory from the uno.

I can ping my device form my PC so the connection seems to be ok, the orange Led is blinking and when i send Artnet from Luminet Monitor Software it goes straight orange so i think the arduino receive the artnet packet but nothing in the serial monitor when using artnet receiver and no control over my LED when using artnet fast led ( ofc when i used my LED only with fastled program it works, any hardware trouble).

Have u got any idea ? :)

Thanks a lot for this great library

Issues using the ArtnetSender

Hi hideakitai,

I'm having some problems with getting the Sender to work but I think its more my comprehension than anything else. I'm looking to send commands to Universe 0, DMX channel 1 which I want to increase the value to 255 or reduce to 0 respectively based on an If Statement. I am using a Arduino Uno and an Ethernet shield I have a few questions;

//setup Ethernet I'm guessing is setting up some other function independent from your library? This wold require me to include something else to manage the Ethernet?

I'm guessing that I want to send a "one line send" but I'm not sure what the list of parameters on the 'artnet.send' command refer to (("127.0.0.1", universe15bit, data_ptr, size);)

Thanks for any help or direction
John

Documentation concerning sending Artnet packets

Hi there !

I use the Artnet library for teensy 4.1 but I got stuck with sending packets to a Artnet device. Is there any function to format Artnet messages ?

Basically, I need to send DMX datas through Artnet but I don't get how to format header and stuff in the library.

Thanks in advance,

Blocking latency with steppers

Hi @hideakitai !

First, thank you for this great library I use a lot in my projects !

I have an issue in a current project where I use steppers and need them to move while still receiving ArtNet to update LEDs.
I'm using accelstepper library to drive the steppers, and I use TMC2208 drivers. I use an Arduino Mega 2560. The artnet is sent from MagicQ on PC to the arduino by an ethernet shield.

As a test, I've written a simple sketch where a stepper is moving constantly, So in my loop(), I only have artnet.parse(); and stepper.run(); to get it as fast as possible. For this test, my callback function is empty.

When I run the sketch, my motor is running smoothly when I don't send any artnet packet to the arduino. But when I start sending packets, I can hear/feel/see the ~40FPS of the artnet blocking the stepper. As I have my callback function empty, I can tell this issue is coming from blocking functions in artnet or ethernet libraries.

Would you have any idea how to help this being smoother?

Thank you so much for your help, and congrats again for this huge library !

esp32 + USR-ES1 W5500 Chip stoped working

Hey,

I want to build an artnet Node with 2 Universes. So I have found your libary and it looked nice :)
The first I want to do is to get Artnet on the esp32 over ehternet. So I have an Wemos d1 mini esp32 and an USR-ES1 w5500 chip.

I have used your code example to show me the artnet data from uiverse0 on serial Monitor.

It worked well, but after a while (5-30 minutes) it stoped working. There are no error messages. I cant reach the esp in network with ping.
I can´t imagine what the problem is. Maybe some failure in communication between the esp32 and the w5500?

IMG_20210211_102500

I have no Idea how to recreate this error.

Do you have some Ideas?

Receiving on ESP32 stops working

Hi,

Great work on the library!

The receive example works as expected on an ESP8266 with MadMapper sending ArtNet data to the board. However, using the same example on an ESP32 does not work as expected and it appears as if the ESP32 stops listening for ArtNet messages. The result varies between the ESP32 not receiving any messages to the board receiving a couple of messages when looking at the serial monitor on the receiver example. When messages do come through after a restart of the microcontroller between 2 and 7 messages are received and then messages stop coming in. The ESP32 does not crash and the loop appears to be running as it should.

I have tried five different ESP32 boards with the same result:

  • ESP32-DevKitC (from Espressif)
  • ESP32-PICO-KIT
  • Lolin32 Lite
  • ESPDUINO-32
  • Olimex ESP32-PoE-ISO

Problem when receiving multiple universes

Hi,

Thanks a lot for your work !

I have a problem when receiving more than 3 universes at the same time.

Every 1 universe out of 4 is missed.
e.g. if I receive at the same time universes from 0 to 15, it's always missing universes 3, 7, 11 and 15. If I receive at the same time universes from 3 to 18, it's always missing universes 6, 10, 14 and 18.

Any clue ?

When I monitor the signal out of my GrandMa 2 with Wireshark, I see every packet for every universe. But the arduino mega can't see it.

If I send universes one at a time, no problem at all, the arduino sees everything...

Really odd !!

Thank for your answer !

Best regards,

Damien Rivoal

Wifi Not Work!

Hi Hideakitai, I have a new issue:

I try to use Wifi -> Receiver to work on my nodeMCU, but the error like this:
'ArtnetWiFiReceiver' does not name a type; did you mean 'ArtnetReceiver'?

Artnet not sending when using WiFi.softAP(ssid, password) method

Hi there

I've encountered a problem with the library

I'm using ESP8266 as an access point so another ESP8266 can conect to it.
When using ESP8266 as AP turns out it does not transmit any artnet data. Same exaple works perfect as wifi client.

here my code to test:

#include <elapsedMillis.h>

#include <ESP8266WiFi.h>
#include <WiFiClient.h>

#ifndef APSSID
#define APSSID "ESPap"
#define APPSK "thereisnospoon"
#endif

/* Set these to your desired credentials. */
const char *ssid = APSSID;
const char *password = APPSK;

// Please include ArtnetWiFi.h to use Artnet on the platform
// which can use both WiFi and Ethernet
#include <ArtnetWiFi.h>
// this is also valid for other platforms which can use only WiFi
// #include <Artnet.h>

// WiFi stuff
const IPAddress ip(192, 168, 2, 2);
const IPAddress gateway(192, 168, 2, 1);
const IPAddress subnet(255, 255, 255, 0);

ArtnetWiFiSender artnet;
const String target_ip = "192.168.4.2";
uint32_t universe = 1;

const uint16_t size = 512;
uint8_t data[size];
uint8_t value = 0;

void setup() {
Serial.begin(115200);
Serial.println("\nArtnet serial test started");

setup_ap();

pinMode(2, OUTPUT);
pinMode(16, OUTPUT);

artnet.begin();
// artnet.begin(net, subnet);     // optionally you can change net and subnet

}

void setup_ap() {
Serial.print("Setting soft-AP configuration ... ");
Serial.println(WiFi.softAPConfig(ip, gateway, subnet) ? "Ready" : "Failed!");

Serial.print("Setting soft-AP ... ");
Serial.println(WiFi.softAP(ssid, password) ? "Ready" : "Failed!");

Serial.print("Soft-AP IP address = ");
Serial.println(WiFi.softAPIP());
}

void loop() {
loop_ap_info();

// Set all universe same value
int value2 = (millis() / 4) % 256;
memset(data, value2, size);

// if (data[0] != value) {
    data[0] = value;        // set first chanel equals value
    artnet.streaming_data(data, size);
    artnet.streaming(target_ip, universe);  // automatically send set data in 40fps
    // artnet.streaming(target_ip, net, subnet, univ);  // or you can set net, subnet, and universe
// }

}

int lastStationsConected = -1;
elapsedMillis checkClientsTimer;
elapsedMillis ledToggleTimer;

void loop_ap_info() {
if (checkClientsTimer > 1500) {
checkClientsTimer = 0;
int newStationsConnected = WiFi.softAPgetStationNum();
if (lastStationsConected != newStationsConnected) {
lastStationsConected = newStationsConnected;
Serial.printf("Stations connected to soft-AP = %d\n", newStationsConnected);
}
}

if (lastStationsConected > 0) {
    // blink led to signal we got client connected
    if (ledToggleTimer > 300) {
        toggleLed (2);
        toggleLed (16);
        ledToggleTimer = 0;
    }
}

}

void toggleLed (int pinLedToToggle) {
digitalWrite (pinLedToToggle, !digitalRead(pinLedToToggle));
}

ArtNet breaks with Teensy 4.1 NativeEthernet

I was unable to compile for the teensy 4.1 until I made adjustments to the Artnet.h file to use the NativeEthenet library instead of Ethernet library. Perhaps the library can use that library when it detects a teensy 4.1. Thanks

ArtNet ethernet packet receipt with huge delay

Hello, I'm using ESP32 Dev decices (used multiple different ones) and different Ethernet SPI Adapter (W5100, W5500, ENC26J60) and have the following problem:
When I send ArtNet packet to via Ethernet, I receive the packet with 20-30sec delay.
grafik
The universe is working and visible, but I have no clue what causes the delay.
The WiFi version works flawless but I need the ethernet version.
I'm using the latest recommended Ethernet lib (via the Library Manager with Version 2.0.0) and I have also tried other Ethernet Libs (Ethernet2 ...) (which caused compile errors and needed some tweaking, but came back. to the standard Ethernet Lib).
The same behavior is with a Teensy 4.1 + the W5500.
Any ideas or debugging hints?

Link status: ON
10.0.0.131
255.255.255.0
set subscriber
start
ArtNet data has come to universe: 0
artnet data (universe : 0, size = 512) :0,0,0,0,0,1,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0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,

Compile error

Not sure but i get this error when i compiled the example
'ArtnetReceiver' does not name a type
what am i doing wrong

ART-NET 32 universos.

hice unas modificaciones (muy simple) a tu librería art-net, para que pueda recibir 32 universos.
ya que no estoy familiarizado con C++ y se me complica entender el funcionamiento de tu librería.
estoy trabajando con ESP32 + w5500 transeiver ethernet + compilador Arduino.
también logre que ArtPoll devuelva los 32 universos.
funciona bien y si recibe 32 universos.
me gustaría entender mejor tu librería, si puedes brindarme una guía de el c++ que usas.
me gustaría que tu librería quedara con la opción de recibir hasta los 32 universos.

Send & Receive not working

Hi hideakitai,

I've been doing some test with the send_receive and it doesn't seem to be working as expected.

When i use Receive Sketch:
I get :
artnet data (universe : 1) =
215,149,62,159,64,0,0,0,0,0,0,0,0,0,0... etc_

But when i use send_receive
i get :
set subscriber
start

It doesn't seem to execute the function, is the implementation different from the Receive sketch?

Compile Error with Industruino

Hi,
I tried to compile the sender example for an Industruino, but I get a bunch of errors, It's a SAMD board and should be pretty similar to Arduino MKR Zero. If I compile for the MKR Zero I get no errors.
First error is: "Compiler does not support __has_include, please report a bug against the ArxTypeTraits library about this."
I guess there are some difference in the board definitions that should be possible to fix, but it's beyond my level of knowledge to figure out what.
Any suggestion what I can do?

Can't make example file run

Hi hideakitai!

I already posted a question regarding this issue in a closed issue and am now opening this new issue since that's what you told me to do. Firstl of all, here is my setup:

IDE (Arduino IDE, PlatformIO, etc.) : PlatformIO - Core: 5.2.5; Home: 3.4.1
Board/MCU: ESP32-WROOM32
Board Firmware Version: not sure
Library Version: ArtNet v0.2.12

I was trying out the Artnet Receiver + FastLED example on ArduinoIDE which did not work and it always returned the error " 'ArtnetReceiver' does not name a type ". After that I tried to add the library using the Arduino library manager, which you suggested, but it still did not work.

Because of that i now moved to the PlatformIO, also because it is nicer to work on. I tried the receive_fastled example file on PlatformIO this time and compilation was successful with the #include <ArtnetWifi.h>. But i can't receive any artnet data. Therefore i wanted to try #include <Artnet.h> instead, since my board is only Wifi compatible. But now it spits out an include error. What am I doing wrong?

Thanks in advance!

ESP32 Without ethernet

I am currently using a lolin d32 ESP32 board with just wifi, but I keep getting the error that it can't find Ethernet.h
I am already using the deep mode for the library resolving (ldf mode)
I also have an ESP8266 but that is not giving any errors, so I may be missing a library (or the library finder) or there is a platform/board support issue.
There is also no way that I see to disable ethernet or wifi currently, if enabled, there is no way to disable.

Callback not executed when adding FastLED

Update: 25-12

I started over to find out where it stops working.
First example file I used is the Ethernet receiver file.
I changed the IP settings and set Universe1 = 0
In the serial monitor I can see that all the 512 channels are changing to the right value.

Second example file I used is the Ethernet receive_fastled file.
I changed the IP settings and set Universe = 0

The FastLED library normaly use #difine DATA_PIN_6
#define is not working, it must be _const uint8_t to work with this library.

In my first post the number of leds was set to 61.
Now I started with setting the number of leds to 1.
When I use artnet.forwart it works.
But when I set the number of leds to 61, it stopt working
The maximum number of leds I was able set was 14.

I switched form artnet.forward to artnet.subscribe
This gives me a error, Error compiling for board Arduino Nano
I did change _[&](uint8_t* data, uint16_t size) _ in [&](const uint8_t* data, const uint16_t size)
Now the error is gone and it works.

In this case the maximum number of leds I was able to set was 2.

now i did add the the serial print part from the ethernet receiver file to see data on the serial monitor.
When the number off leds is bigger than 2, the serial monitor stopt printing so it looks like the callback is not executed any more.

Hope someone can tell me what goes wrong or this can be fixed

Greets Jack


Hi,

I have a little issue. I don't know if I do something wrong, try something that is not possible, or if it is a real issue. Hope someone can help me out or fix this.

I try to control my LEDs over artnet, but I don't want to contol single LEDs 1 on 1 like in the example file.
-Artnet over Ethernet working.
-FastLED working.
When I try to combine them and add FastLED to a working Artnet script, callback is not executed anymore.

I start at the top step by step.
-include FastLED.h,
-define DATA_PIN and NUM_LEDS
-define the array of leds
after every step the script is still working.

When I add FastLED.addLeds<WS2812B, DATA_PIN, GRB>(leds, NUM_LEDS); to the setup,
the callback is not executed anymore.
I have data 0 thru 3 printed out on the serial monitor to check this.

Greets,
Jack

Arduino DUE

Is it possible to use this library with the ARM chip on the Arduino Due?

can't find a way to set certain dmx channels

I can't find a way to set certain values on channels. For example to set on DMX universe 5 the channel 488 on 255 and to change on universe 7 the channel 12 to value 128.

tried to do so with
artnet.send("2.0.0.7", net, subnet, univ, ch, dmx_value);

so i have put everywhere values, but there is no change of values detected on the ArtNet networlk.
Also i could ping the network shield of the arduino correctly.

So it could not be an issue, but a lack of knowledge from my side.

best regards.
jasper

Artsync support

Could you add support to artsync in order to support multi universe sync ?

How do i send artnet command to a specific channel?

Hi,

I am new to arduino and the ethershield, i find your library very easy to understand unfortunately i can't find documentation on how to send artnet to a specifc address. Play around your library, i can only send to a group of channels via
[ const uint16_t size = 512; ]

Can you also explain what "data[size]" and "memset(data, value, size);" does?

Thanks!

Error compiling receiving example

I just started experimenting with an Arduino Ethernet board to make a Artnet to DMX converter.
When compiling the receiving example I bumped into following error. I just installed the Arduino compiler and enabled the Artnet library.... Is there something more I should do?

Arduino: 1.8.13 (Mac OS X), Board:"Arduino Ethernet"

In file included from ../Documents/Arduino/libraries/ArtNet/util/ArxTypeTraits/ArxTypeTraits/type_traits.h:407:0,
from ../Documents/Arduino/libraries/ArtNet/util/ArxTypeTraits/ArxTypeTraits.h:40,
from ../Documents/Arduino/libraries/ArtNet/Artnet.h:10,
from ../Documents/Arduino/my_receiver/my_receiver.ino:1:
../Documents/Arduino/libraries/ArtNet/util/ArxTypeTraits/ArxTypeTraits/functional.h: In instantiation of 'arx::stdx::function<R(Args ...)>::function(const Func&) [with Func = void(unsigned char*, unsigned int); dF = void ()(unsigned char, unsigned int); typename arx::stdx::enable_if<(! arx::stdx::is_same<dF, arx::stdx::function<R(Args ...)> >{})>::type* = 0; typename arx::stdx::enable_if<arx::stdx::is_convertible<typename arx::stdx::details::result_of<dF&(Args ...), void>::type, R>{}>::type* = 0; R = void; Args = {unsigned char*, unsigned int}]':
../Documents/Arduino/my_receiver/my_receiver.ino:32:41: required from here
../Documents/Arduino/libraries/ArtNet/util/ArxTypeTraits/ArxTypeTraits/functional.h:87:44: error: new cannot be applied to a function type
data = reinterpret_cast<void*>(new Func(f));
^~~~~~~~~~~
exit status 1
Fout bij het compileren voor board Arduino Ethernet

Change Artnet node name programmatically?

Hi
Apologies for a possible feature request as I know you must be inundated and your library is fantastic.
Is there way to change the node name without editing the library?
I have multiple nodes running and it would be great to be able to identify between them. If I could change the name in the sketch it would be a bit help as I can change via editing the library but I have to do it every time between programming different nodes.
Apologies if there is already a way to do this and I haven't found it
Many thanks
Tom

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.