This implements a temperature controlled relay using the nRF9160 DK:
- temperature is measured via a DHT sensor (AM2302)
- a relay is switched on, if the temperature is below a threshold
- the threshold can be increased/decreased by pressing button 2/1
- it publishes the temperature to the cloud
- read threshold from cloud
- override cloud threshold on button press
LED1
: shows relay switch state. On: relay is switched on, Off: relay is switched offLED2
: on (very shortly) during sensor readLED3
: signals cloud connectivity state. On: connected, Off: falseLED4
: not used
docker build -t sdk-nrf-tcr .
docker run --rm -v ${PWD}:/workdir/ncs/tcr sdk-nrf-tcr \
/bin/bash -c 'cd /workdir/ncs/tcr && west build -p always -b nrf9160dk_nrf9160ns'
nrfjprog -f nrf91 --program build/zephyr/merged.hex --sectoranduicrerase -r --log