Upload temperature data to a SQL database

0

Hello!

I have a small project to upload temperature data to a database from a raspberry pi 3.

I have seen several tutorials, but none of them have worked for me until now or the libraries that I download do not work. What should I do to get started?

Greetings and have a great day

Edit: I would only like to be able to send data from my RPi to the database, where it has 3 columns with these names: Date, time and temperature.

The code to read the temperature data I have, also the date and time ... however, I do not know how to start, what I need to download and what procedure I have to do to upload that temperature data to the base of data. I tried to download the apache and the php with this command:

sudo apt-get install apache2 php5 libapache2-mod-php5

However, I get an error that certain files could not be obtained.

"Unable to fetch some files. Maybe run apt-get update or try with -fix-missing?

PS: Thanks for the recommendation, Kenny

    
asked by Eduardo Garza 31.07.2017 в 23:37
source

1 answer

0

To solve the error that you get when you install the apache, as the error says, you should first update your system:

sudo apt-get update && sudo apt-get upgrade

To send the data depends on which language you want to do it. Here I'll give you a very simple tutorial on how to do it from the command line (with curl) and receive the data from a PHP.

I hope it serves you.

    
answered by 31.08.2017 в 15:29