Hardware Reference
In-Depth Information
This command will create your database file. You can now again exit the database file by
typing the following command:
.exit
Note that if you are under Linux, you might have to change the permissions on the data-
base and the folder that contains the project. To do so, go the project's folder via a termin-
al and type:
chmod 777 database.db
Now, it is time to make a first test of the project. Make sure that all the files of the server
are located in a folder called
datalogger
on your web server. You can now upload the
Arduino sketch to your board and open the
Serial
monitor. You should first see that the
sketch is connecting to your network and receiving an
IP address
as follows:
IP address: 192.168.1.103
Then, it should enter the first iteration of the
loop()
function, and print out the temper-
ature and humidity measurements:
Temperature: 21
Humidity: 37
After this step, you should see that the sketch is connected to your server, and that the
server is answering with a standard
200 OK
answer:
connected
HTTP/1.1 200 OK
Date: Mon, 19 May 2014 08:09:57 GMT
Server: Apache/2.2.23 (Unix) mod_ssl/2.2.23 OpenSSL/0.9.8y
DAV/2 PHP/5.4.10
X-Powered-By: PHP/5.4.10
Content-Length: 13
Connection: close
Content-Type: text/html
Also, at the end of this answer, you should see the confirmation message that we defined
in the PHP file: