Building Arduino Projects for the Internet of Things

(Steven Felgate) #1
CHAPTER 9 ■ IOT PATTERNS: LOCATION AWARE

Software Required


In order to develop this livestock tracking system, you need the following software:


  • Arduino IDE 1.6.4 or later

  • PHP server (installed or hosted)

  • MySQL server (installed or hosted)

  • Text editor


Circuit


In this section, you are going to build the circuit required for the livestock tracking system.
This circuit uses the NEO6MV2 GPS module for getting current latitude and longitude
data. The GPS module has a positional accuracy of 5 meters.

1. Make sure Arduino is not connected to a power source, such
as to a computer via USB or a battery.

2. Attach a WiFi shield to the top of the Arduino. All the pins
should align.

3. Use jumper cables to connect the power (3.3V) and ground
(GND) ports on Arduino to the power (+) and ground (-) ports
on the breadboard.

4. Now that your breadboard has a power source, use jumper
cables to connect the power (+) and ground (-) ports of your
breadboard to the power and ground ports of the GPS.

5. To read the GPS data, you will need to connect a jumper
cable from the RX (Receive) port of the GPS to Digital Port 3
of Arduino. Your code will use data from this port to find the
latitude and longitude information.

6. Similar to Step 5, you also need to connect a jumper cable
from the TX (Transmit) port of the GPS to Digital Port 2 of
Arduino. Your code will use data from this port to find the
latitude and longitude information.

■ Note Other GPS modules might have different power requirements and circuits. Check
the datasheet of your GPS module to confirm its requirements.

Your circuit is now complete and should look similar to Figures  9-3 and 9-4.
Free download pdf