Skip to content

Commit

Permalink
modify build for ENC28J60 to support any platform + fix readme
Browse files Browse the repository at this point in the history
  • Loading branch information
MrFrangipane committed Jan 8, 2024
1 parent 9312719 commit d89e9ec
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 12 deletions.
43 changes: 41 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -242,15 +242,54 @@ jobs:
verbose: true
build-etherenc:
name: "Build Test (EtherENC): ${{matrix.board.arch}}:${{matrix.board.name}}"
runs-on: ubuntu-latest
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
board:
- vendor: arduino
arch: avr
name: uno
- vendor: arduino
arch: megaavr
name: uno2018
- vendor: arduino
arch: samd
name: mkrvidor4000
- vendor: arduino
arch: samd
name: mkrwifi1010
- vendor: arduino
arch: samd
name: mkr1000
- vendor: arduino
arch: samd
name: nano_33_iot
- vendor: esp8266
arch: esp8266
name: generic
- vendor: esp32
arch: esp32
name: esp32
- vendor: esp32
arch: esp32
name: esp32s3
- vendor: esp32
arch: esp32
name: esp32c3
- vendor: rp2040
arch: rp2040
name: rpipico
name: rpipicow
include:
- index: https://downloads.arduino.cc/packages/package_index.json
board:
vendor: arduino
- index: https://arduino.esp8266.com/stable/package_esp8266com_index.json
board:
vendor: esp8266
- index: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
board:
vendor: esp32
- index: https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json
board:
vendor: rp2040
Expand Down
15 changes: 5 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,15 @@ If you have already installed this library, please follow:
- ESP32 (Ethernet and ETH)
- ESP8266
- Almost all platforms without WiFi
- Raspberry Pi Pico with ENC28J60 (please read following section)
- Anyplatform supported by ENC28J60 (please read following section)

<details>
<summary>Notes for Raspberry Pi Pico with ENC28J60 (click to expand)</summary>
<summary>Notes for ENC28J60 ethernet controller (click to expand)</summary>

When using the ENC28J60 controller with Raspberry Pi Pico (no wifi)
When using the ENC28J60 controller

- make sure to install the [EthernetENC](https://github.com/JAndrassy/EthernetENC) library
- simply replace `#include <Artnet.h>` with `#include <ArtnetEtherENC.h>`

Default wiring diagram provided by [@tobiasvogel](https://github.com/tobiasvogel)

![Wiring Diagram](/pi-pico-enc28j60-wiring.svg)
</details>

## Usage
Expand Down Expand Up @@ -215,12 +211,11 @@ void loop() {

- You can set Net (0-127) and Sub-Net (0-15) like `artnet.begin(net, subnet)`
- Universe (0-15) can be set in `artnet.subscribe(universe, callback)`,
- Callbacks are limited to 4 universes (depending on the spec of Art-Net)
- These universes (targets of the callbacks) are reflected to `net_sw` `sub_sw` `sw_in` in `ArtPollreply` automatically

```C++
artnet.begin(net, subnet); // net and subnet can be set only once
artnet.subscribe(univ1, callback1); // 4 callbacks can be set
artnet.subscribe(univ1, callback1); // callbacks can be set
artnet.subscribe(univ2, callback2); // these universes are reported to
artnet.subscribe(univ3, callback3); // Art-Net controller if it polls
artnet.subscribe(univ4, callback4); // Art-Net devices
Expand All @@ -229,7 +224,7 @@ artnet.subscribe(univ4, callback4); // Art-Net devices
Or you can register callbacks based on 15 bit universe. But these universes are not reflected to `ArtPollReply` automatically.

```C++
artnet.subscribe15bit(univ15bit1, callback1); // 4 callbacks can be set
artnet.subscribe15bit(univ15bit1, callback1); // callbacks can be set
artnet.subscribe15bit(univ15bit2, callback2); // these universes are NOT reported to
artnet.subscribe15bit(univ15bit3, callback3); // Art-Net controller if it polls
artnet.subscribe15bit(univ15bit4, callback4); // Art-Net devices
Expand Down

0 comments on commit d89e9ec

Please sign in to comment.