> 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).
* [ArduinoOSC](https://github.com/hideakitai/ArduinoOSC) - OSC subscriber / publisher for 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.
## 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**.
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](https://www.highend.com/pub/support/controllers/documents/HTML/en/sect-osc_mappings.htm) 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.
1. This is the sACN universe to respond to.
1. Set the DMX start address for the strobe light.
###### Hog4 fixture profile:
[Import from XML](728%20Fixtures%20Wiflash%20rev%200.xml)
#### DMX Mapping
<table>
<thead>
<tr>
<th>Chan</th>
<th>Command</th>
<th>DMX Range</th>
<th>Value Range</th>
<th>Resolution</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>Intensity Coarse</td>
<tdrowspan=2>0 - 65535</td>
<tdrowspan=2>0 - 100%</td>
<tdrowspan=2>15 bit<br/>2.4kHz PWM</td>
</tr>
<tr>
<td>2</td>
<td>Intensity Fine</td>
</tr>
<tr>
<td>3</td>
<td>Duration</td>
<td>0 - 255</td>
<td>0.02 - 0.5s</td>
<td>0.004s</td>
</tr>
<tr>
<td>4</td>
<td>Rate</td>
<td>0 - 255</td>
<td>0.5 - 25Hz</td>
<td>0.1Hz</td>
</tr>
</tbody>
</table>
### 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.