Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/halfdanj/arduino_artnet
A lightweight Art-Net library for the Arduino platform
https://github.com/halfdanj/arduino_artnet
Last synced: 24 days ago
JSON representation
A lightweight Art-Net library for the Arduino platform
- Host: GitHub
- URL: https://github.com/halfdanj/arduino_artnet
- Owner: HalfdanJ
- Created: 2015-08-14T07:41:17.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2014-04-28T09:49:13.000Z (over 10 years ago)
- Last Synced: 2024-04-14T23:51:51.322Z (7 months ago)
- Language: C++
- Size: 242 KB
- Stars: 1
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Art-Net for Arduino
==============A lightweight Art-Net library for the Arduino platform.
This fast and effective library supports up to 4 Art-Net universes. The practical number of universes depends on the transmission speed required. The standard Ethernet shield and library will only be able to receive 1 universe at 30fps. If you need more universes and/or faster framerates thare are a number of factors that can speed up the transmission.## Speeding up ArtNet
Following things can be done to speed up ArtNet reception:* Serial. Don't use Serial. Don't even write Serial.begin() anywhere in your code. It will slow down Ethernet big time.
* SPI speed. Default is quarter clock frequency, but can be set to half clock frequency (8 MHz on a standard Arduino):
```cpp
SPI.setClockDivider(SPI_CLOCK_DIV2);
```
* Memory allocation. The W5100 Ethernet chip has 16 Kb of memory (8 RX + 8 TX), which is divided between 4 sockets by default. Since ArtNet is only using one UDP socket we can re-allocate all the memory to that socket. In order to do so, it is necessary to use a different version of the standard Ethernet library: [WIZ_Ethernet_Library](https://github.com/media-architecture/WIZ_Ethernet_Library)
Once installed, it allows you to set up the memory allocation like this:
```cpp
uint16_t sizes[4] = {8192,0,0,0}; // 8 Kb memory to the first socket
W5100.setRXMemorySizes(sizes);
```
* Unicast instead of broadcast. If your software broadcasts Art-Net packets to more than one Art-Net node, they will all receive all of the packets and need to decide for them self wether to handle them or not. This is completely unnecessary and will slow down your Art-Net stream.* A better Ethernet shield. The standard Ethernet shield uses the WIZnet W5100 controller chip, which is the slowest and has the least amount of memory of all the WIZnet chips. Upgrading to a shield with the W5200 chip will increase the speed of your hardware.
* 20 MHz Arduino? Since the SPI timing is a multiple of the Arduino clock rate, it is possible to squeeze even more speed out of the Ethernet shield by running the AVR microcontroller at 20 MHz. Please note that this may mess up timings in other Arduino functions, such as delay() and delayMicroseconds(), not to mention libraries for controlling LEDs.