The modified Erfamap script is available on the [`spaceapimap` branch of the erfamap repository](https://git.kabelsalat.ch/s3lph/erfamap/src/branch/spaceapimap). Unfortunately, I did not preserve the command used to generate this exact map, but here's an example to get you started:
> Pins 1 and 4 of the OUT pin header are swapped - this can be easily worked around by swapping wires number 1 and 4 in the JST connector plugged into this header.
- I recommend you order a mix of 100mm, 200mm and 300mm cables, as you'll be facing a variety of distances, and having shorter cables available makes for much easier troubleshooting.
- You can plug a voltage divider with a LDR (photoresistor) into the `IN` pin header on the PCB with the ESP32 on it, with the voltage divider's center tap connected to the `Din` pin.
- This feature is configurable, see `platformio.ini` on how to disable it or change the pin to use.
- It is enabled by default. If you aren't using an LDR, disabled the feature flag, as otherwise your LEDs may flicker or not turn on at all, because the LDR pin is floating by default.
-<spanstyle="color: #00ff00;">⬤</span>**Green**: The hackerspace is open.
-<spanstyle="color: #ff0000;">⬤</span>**Red**: The hackerspace is closed.
-<spanstyle="color: #ff7f00;">⬤</span>**Orange**: The SpaceAPI aggregator service reported the endpoint to be invalid. This can either mean that the endpoint is unreachable, or that it did not validate against any of the SpaceAPI schema versions that it claims to be compliant with.
-<spanstyle="color: #0000ff;">⬤</span>**Blue**: The SpaceAPI aggregator service reported the endpoint was last reachable more than 24h ago.
-<spanstyle="color: #000000;">⬤</span>**Blank**: The URL of this hackerspace was not contained in the aggregator's response. Likely the URL has changed. Please check the contents of https://api.spaceapi.io, or the recently closed PRs on https://github.com/SpaceApi/directory/ for the correct endpoint and update the ESP's program accordingly.
Apart from these per-space states, error states of the SpaceAPI map itself are reported as follows:
-<spanstyle="color: #000000;">⬤</span>**LED 0 flashes every 10s**: The last update of the map has failed, most likely due to network issues. If this issue persists, please connect to the ESP's serial console and check the output.
-<spanstyle="color: #ff00ff;">⬤</span>**Purple LED 0**: The ESP has just started, and has not yet contacted the SpaceAPI aggregator service. If this is shown for more than a few seconds, the ESP most likely failed to connect to the configured WiFi network. If this issue persists, check whether there is a `spaceapimap` WiFi AP in your vicinity, and connect to it to verify the WiFi configuration, or connect to the ESP's serial console and check the output.
To the best of my knowledge, the contents of `erfamap-output/` and `esp32/src/spacemap.h` are not covered by Swiss copyright law and are therefore in the public domain.