https://github.com/coderbyheart/nrf9160-temperature-controlled-relay
Temperature controlled relay using the nRF9160 DK
https://github.com/coderbyheart/nrf9160-temperature-controlled-relay
smartvan
Last synced: 9 months ago
JSON representation
Temperature controlled relay using the nRF9160 DK
- Host: GitHub
- URL: https://github.com/coderbyheart/nrf9160-temperature-controlled-relay
- Owner: coderbyheart
- Created: 2020-08-31T13:08:51.000Z (over 5 years ago)
- Default Branch: saga
- Last Pushed: 2020-09-12T15:01:04.000Z (over 5 years ago)
- Last Synced: 2025-02-01T11:11:10.016Z (11 months ago)
- Topics: smartvan
- Language: C
- Homepage:
- Size: 33.2 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Temperature controlled relay using the nRF9160 DK
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
## LED patterns
- `LED1`: shows relay switch state. On: relay is switched on, Off: relay is switched off
- `LED2`: on (very shortly) during sensor read
- `LED3`: signals cloud connectivity state. On: connected, Off: false
- `LED4`: not used
## Building
### Prepare the Docker image with all build dependencies
docker build -t sdk-nrf-tcr .
### Build the firmware
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'
### Flash the firmware
nrfjprog -f nrf91 --program build/zephyr/merged.hex --sectoranduicrerase -r --log