summaryrefslogtreecommitdiff
path: root/README.md
blob: c2db017a909910c4fb21ff0084bfe14d5014853f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# iot-contact

iot-contact is an IoT device to check if doors and windows are closed or open.

## Usage

The content of this repository can be build with CMake and Ninja.

```
cmake -Bbuild -GNinja
ninja -C build
```

The resulting firmware can be flashed via an ST-LINK debugger / programmer.

```
st-flash --connect-under-reset write build/fw/zephyr/zephyr.bin 0x8000000
```

UART shell output can be retrieved with `picocom`.

```
picocom -b 115200 /dev/ttyACM0
```

Finally the firmware can be erased from the device with the ST-LINK.

```
st-flash --connect-under-reset erase
```

[1]: https://docs.kicad.org/