Working with SQLite in Raspberry Pi using Python 3

Last time we did a few basic operations with SQLite in Raspberry Pi. We learned how to set up SQLite3, create the first database file and fill with data. Using SQL commands we were able to select data and print in the terminal screen. But eventually, you are going to face with more complex queries or will need to store data automatically so other routines could read it. For instance, you are going to build a simple project that would read data from the digital temperature sensor. One of the great ways of storing data into a database is to use a python script. Anyway, you are probably going to use it for GPIO operations. So let us learn how to store simple data to SQLite database using python. I am going to use Python3. Raspberry Pi comes with Python 2.7 built in so we will need to install Python3. To do so we run:

Continue reading