Hardware Reference
In-Depth Information
Summary
In this second chapter of the topic, we built our first application based on the Arduino Eth-
ernet shield and Ethernet client class. We did some basic measurements on the Arduino
board, sent these measurements on a local web server, and finally displayed this data in real
time on a graph.
To proceed further with this chapter, I invite you to carefully repeat all the steps of this
chapter to really understand well how the Arduino Ethernet shield communicates with the
PHP code running on your computer. You can also add more sensors to the projects and log
this data inside the database. Also, you can try to plot several variables at once on different
graphs.
These were the major takeaways from this chapter:
• First, we interfaced a digital temperature and humidity sensor to the Arduino board
so that we can send the measurements to a local web server using the Ethernet
shield. We also installed some useful software components such as a library to plot
data in a web page.
• Then, we built an Arduino sketch to send data directly to a web server running on
your computer.
• After that, we started building the server-side code by coding the file responsible
for logging data into a local database. We also tested this code with the Arduino
Ethernet shield, and made sure that the data was correctly transmitted to the server
and logged in the database.
• Finally, we built a web page to automatically plot the data as it is received on the
web server, using a JavaScript library called flot .
In the next chapter, we are going to do similar things, but using a completely different ap-
proach: instead of running a client on the Arduino board and transmitting the data on a loc-
al web server, we are going to run the server right on the Arduino board. The Arduino pro-
ject will constantly display the measurements on a web page and log the data locally on a
SD card.
Search WWH ::




Custom Search