# 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](assets/wiflash_schem.png) ## Flashing The WiFlash firmware needs to be initially flashed onto the ESP32. ### Arduino IDE Requirements * [Arduino IDE](https://www.arduino.cc/en/software) > Refer to the [Getting Started](https://www.arduino.cc/en/Guide/) page for Installation instructions. * [Arduino core for ESP32](https://github.com/espressif/arduino-esp32) > - 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). * [Arduino ESP32 Plugin](https://github.com/me-no-dev/arduino-esp32fs-plugin) - Arduino plugin which packs sketch data folder into SPIFFS filesystem image. > Follow the install instructions in the link. * [ArduinoOSC](https://github.com/hideakitai/ArduinoOSC) - OSC subscriber / publisher for Arduino * [NeoPixelBus](https://github.com/Makuna/NeoPixelBus) - A library to control one wire protocol RGB and RGBW leds. * [ESPAsyncWebServer](https://github.com/me-no-dev/ESPAsyncWebServer) - Async HTTP and WebSocket Server for ESP Arduino. > Install from the Arduino library manager. * [WiFlash for ESP32](https://git.company235.com/kevin/wiflash) > - Unzip the downloaded file. - Open `wiflash_esp32.ino` in Arduino. - Select your ESP32 board from the `Tools > Board` menu. ### Uploading 1. Use the upload button in Arduino to compile your changes and upload the software to your ESP32 device. 1. Use `Tools > Esp32 Sketch Data Upload` to build and upload the SPIFFS partition. ### Troubleshooting | Problem | Try | | :- | :- | | Arduino shows compiler errors. | Make sure you have the correct board type selected in the `Tools > Board` menu. | | Errors during upload. | Make sure that you have the correct port selected in the `Tools > Port` menu. | | Unable to upload SPIFFS | Make sure the serial monitor window is closed. | ## Configuring 1. Connect to the default access point: * SSID: WiFlash * Password: technologyismagic 1. Open a web browser and navigate to [http://wiflash.local](http://wiflash.local) ### Status Here you can observe the current state of the device. ### Configuration This tab lets you configure the device settings. > __Reset your configuration to defaults by connecting pin A1 to GND during boot-up.__ #### WiFi Change these to enter your own SSID and WEP/WPA2 password. #### Network Enter your own IP configuration. #### OSC Button Set the value of `host` to be the IP address of the OSC server. Change the pressed and released values 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](https://www.highend.com/pub/support/controllers/documents/HTML/en/sect-osc_mappings.htm) manual page for additional inspiration. #### Strobe Set the sACN Universe and DMX Address for the strobe device. #### LED Pixel Strip Set the sACN Universe and DMX Address for the LED pixels. ### Hardware These values on this tab need to match the hardware setup. ## Reference ###### Hog4 fixture profile: [Import from XML](728%20Fixtures%20Wiflash%20rev%200.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 |