# wittch-sense

> A KNX bus sensor module based on the Adafruit Qt Py.

- [ ] provide up to 4 1bit comm objects for Reed sensors
- [ ] each sensor should be configurable through ETS
- [ ] parameter to enable active sending of sensor state every `x` seconds
- [ ] add programming button
- [ ] use neo pixel to indicate system state (configured, programming mode, ...)
      if there is enough current available from the KNX bus
- [ ] a way to disable power from KNX bus when USB is connected, or the other
      way around
- [ ] add PCB with level switcher for UART (Qt Py 3.3 <-> KNX bus 5.0)

## Hacking

If `nix` is installed and `direnv` for this directory is enabled (`direnv
allow`) you'll be dropped into a `nix shell` with `platformio` and it will
install the `core` and library dependencies. So you should be able to simply
compile and run the project with:

``` sh
pio run
pio run --target upload
```

Once after cloning and after adding dependencies reinitializing the project is
required to create the `lsp` config (for `ccls`):

``` sh
pio init --ide emacs --board adafruit_qt_py_m0
```
