Uses a GPIO to control a lighting console over OSC, whilst also controlling an LED strobe light with DMX data received over sACN. This software is designed for the ESP32, but will probably be usable on other Espressif platforms,
Go to file
Kevin Matz 6f4c3e3357 initial commit 2020-12-03 09:55:53 -05:00
assets initial commit 2020-12-03 09:55:53 -05:00
wiflash_esp32 initial commit 2020-12-03 09:55:53 -05:00
LICENSE initial commit 2020-12-03 09:55:53 -05:00
README.md initial commit 2020-12-03 09:55:53 -05:00

README.md

WiFlash

Uses a GPIO to control a lighting console over OSC, whilst also controlling an LED strobe light with DMX data received over sACN.

This software is designed for the ESP32, but will probably be usable on other Espressif platforms,

example

Requirements

  • Start Arduino and open Preferences window.
  • Enter https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json into Additional Board Manager URLs field. You can add multiple URLs, separating them with commas.
  • Open Boards Manager from Tools > Board menu and install esp32 platform (and don't forget to select your ESP32 board from Tools > Board menu after installation).
  • Unzip the downloaded file.
  • Open wiflash_esp32.ino in Arduino.
  • Select your ESP32 board from the Tools > Board menu.

Configuring

WiFi

// -----------------------------------
//   Configure the WiFi network
// -----------------------------------
const char ssid[] = "WiFi NETWORK";
const char pwd[] = "PASSWORD";

Change these lines to enter your own SSID and WEP/WPA2 password.

IPv4

// -----------------------------------
//   Configure the IPv4 network
// -----------------------------------
const IPAddress ip(127, 0, 0, 1);
const IPAddress gateway(0, 0, 0, 0);
const IPAddress subnet(255, 255, 255, 255);

Enter your own IP configuration. Note the commas between bytes in the address.

OSC

// -----------------------------------
//   Configure OSC
// -----------------------------------
const String host = "2.0.0.1";
const uint16_t port = 7001;

Set the value of host to be the IP address of the OSC server. Here, the IP address bytes are separated by a period.

const String pressed_addr = "/hog/playback/go/0";
const String pressed_value = "99.1";
const String released_addr = "/hog/playback/go/0";
const String released_value = "99.2";

Change these lines to suit your setup. These examples will send GOTO LIST 99 CUE 1 when the button is pressed, and GOTO LIST 99 CUE 2 when the button is released. Check the Hog 4 OSC mappings manual page for additional inspiration.

E1.31 sACN

// -----------------------------------
//   Configure E1.31 sACN
// -----------------------------------
Strobe strobe(E131_MULTICAST, 1, 001);

Set these 3 arguments to configure sACN.

  1. Change this to E131_MULTICAST to receive multicast sACN, or E131_UNICAST to receive unicast sACN.
  2. This is the sACN universe to respond to.
  3. Set the DMX start address for the strobe light.
Hog4 fixture profile:

Import from XML

DMX Mapping

Chan Command DMX Range Value Range Resolution
1 Intensity Coarse 0 - 65535 0 - 100% 15 bit
2.4kHz PWM
2 Intensity Fine
3 Duration 0 - 255 0.02 - 0.5s 0.004s
4 Rate 0 - 255 0.5 - 25Hz 0.1Hz

Hardware

/*
 * This section to be configured by the Fixtures Dept.
 */
const int button = A0;
const int led = LED_BUILTIN;

These values need to match the hardware setup.

Finishing

Use the upload button in Arduino to compile your changes and upload the software to your ESP32 device.

Credits

While not the first device of this class to be constructed, this version is credited to:

  • Concept & electronics: Phil Abeyta
  • System design & firmware: Kevin Matz

Copying

This Software is released under the MIT License.

Copyright © 2020, Kevin Matz

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.