MySQL for the Internet of Things

(Steven Felgate) #1

ChApTEr 2 ■ hArdwArE for IoT SoluTIonS


a WarNING aBOUt etherNet ShIeLD VarIaNtS


You may be thinking that all Ethernet shields are created equal and work like network cards in desktop
computers. That is, any one will do; just drop it in and go. But that is far from the case. what makes an
Arduino-compatible Ethernet shield is not just that it works with your Arduino; it must also use the
built-in Ethernet library.

for example, there are a number of Arduino Ethernet shields and even some Ethernet modules
(think breakout boards) that use a different chipset such as the CC3000 or any one of several other
chipsets. Many of these are not compatible with the Ethernet library. The way you can tell is if the shield
comes with or requires you to download a library to use it.

This may not be a big deal for you for a single project, but there are at least two other concerns for IoT
developers. first, if you have many nodes in your solution, you could potentially have to write a different
sketch for each type of Ethernet shield used. Second, if you plan to use your Arduino to talk to a
MySQl server, you must have a shield that uses the Ethernet library. This is because the special library
designed to talk to MySQl (called the MySQl Connector/Arduino) is written for the Ethernet library.
using a different library that does not adhere to the Ethernet.Client class may make it incompatible with
the connector. You will learn more about the connector in Chapter 6.

Arduino WiFi Shield 101


The Arduino WiFi shield 101 is the latest shield from Arduino.cc for connecting an Arduino to the Internet
via a WiFi signal. There are older WiFi shields available, and you will see some of those in the following
sections. What makes this shield interesting and new is it has onboard crypto-authentication, making it
much easier to use on wireless networks using a more secure authentication supporting both the WEP and
WPA2 Security Enterprise protocols. Because of these features, it is marketed for IOT solutions. However,
unlike the older Arduino WiFi shield, it does not come with a MicroSD reader. Figure 2-18 shows the Arduino
WiFi shield 101.

Free download pdf