Hardware Reference
In-Depth Information
To install an Arduino library, simply unzip the content of the downloaded file into the
/libraries folder of your main Arduino folder (or create this folder if it doesn't exist
already).
You will also need a library to plot the data stored in the database. I used the flot lib-
rary, which is very convenient to use and allows real-time visualization of incoming data.
This library is included in the code of this chapter, but if you want more information on
the library you can go to http://www.flotcharts.org/ .
About the database itself, this project uses SQLite, which is a lite and easy-to-use data-
base. It is perfect for such projects, as it doesn't require a database server running on your
computer.
It comes preinstalled on many operating systems such as OS X or Linux, but if that's not
the case, go over to their website to download and install it:
http://www.sqlite.org/
If you are using Linux, the best option is to install SQLite with your Linux distribution
package manager.
Note that it is also possible to use relational databases other than SQLite, such as MySQL.
Many web servers come with the MySQL server as well, and you will only need to make
small changes in the code of this chapter to use a MySQL database. You can also use non-
relational databases such as MongoDB ( http://www.mongodb.org/ ), but this will require
more changes in the code.
Finally, you will also need to have a web server up and running to make this project work.
You can find more information about how to set up a web server in the preface of this
topic. If you don't have a web server installed yet, you can visit the following links to get
one:
• Windows: EasyPHP ( http://www.easyphp.org/ ) or WAMP ( ht-
tp://www.wampserver.com/en/ )
• OS X: MAMP ( http://www.mamp.info/ )
• Linux: LAMP ( https://help.ubuntu.com/community/ApacheMySQLPHP )
Search WWH ::




Custom Search