You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
1.0 KiB

4 years ago
# Temperature Logger
This is a little program I wrote to talk to an Arduino over USB serial to read
4 years ago
temperature and relative humidity values using a DHT11 sensor, and put then in a SQLite database.
![arduino and screen listing temperature and humidity readings](image.jpg)
4 years ago
`main.c` is the PC program that does the logging (printing to stdout).
It just reads printed messages from the serial port `USB0`, and writes them back
into a SQLite3 database. It automatically creates the database and tables
if they don't exist (making it do that was 90% of the work).
4 years ago
`arduino.ino` is the Arduino IDE project that reads from the hardware using the
Adafruit sensors library.
The arduino code is very arduino which isn't too nice since sine its such a tiny
project pulling a lot of dependencies but I guess that's fine. Re-writing the
DHT11 library would probably be interesting to do.
### Compiling
For `main.c` run `make`
For the `arduino.ino` track down the Adafruit DHT11/DHT22 library, import it and build the project in the Arduino IDE.