Now that we have a way to write data to our database, we can now start taking and storing readings from our Raspberry Pi to Arduino hardware.
From the command line, run the
thermostat application located in the
arduPi directory. Once this is running, the shield will start to take temperature readings.
In turn, the Arduino code references the Python script we have just written and will start to send the temperature data to it for the room you associated with the ID
Make sure that both Apache and the HTSQL server are running!
The Python script will then generate a connection to the SQLite database and execute the query inserting the temperature data, timestamp, and the room ID.
We can test that our ...