MySQL for the Internet of Things

(Steven Felgate) #1

Chapter 6 ■ Building low-Cost MysQl data nodes


Installing Connector/Arduino


There are two ways to get and install Connector/Arduino. The first and the recommended method is to use
the Library Manager to search for and install the library. From any sketch, click the Sketch ➤ Include Library
➤ Manage Libraries menu. This opens the Library Manager. In the filter search box, enter MySQL, then
choose the connector, and finally click Install. In seconds, the new library is installed and ready for use. Cool,
eh? Figure 6-12 shows the Library Manager dialog with the MySQL Connector/Arduino library selected for
installation.


Figure 6-12. Arduino Library Manager dialog


If you do not want to use Library Manager or cannot use it because you’re using a different IDE or editor,
you can download it from the GitHub site (https://github.com/ChuckBell/MySQL_Connector_Arduino).
To manually install the connector, begin by navigating to the Connector/Arduino page on GitHub
(https://github.com/ChuckBell/MySQL_Connector_Arduino). The latest version is always the one available
for download. The file is named MySQL_Connector_Arduino-master.zip. Look on the right side of the page
and click the button to download and save it to your computer. Once it is downloaded, uncompress the file.
You will see a new folder in the location where you extracted the file.
You need to copy or move the folder to your Arduino/Libraries folder. Place the folder and its
contents renamed to MySQL_Connector_Arduino in your Arduino library folder. You can find where this is by
examining the preferences for the Arduino environment, as shown in Figure 6-13.

Free download pdf