Presentation is loading. Please wait.

Presentation is loading. Please wait.

Shields and GSM with Arduino

Similar presentations


Presentation on theme: "Shields and GSM with Arduino"— Presentation transcript:

1 Shields and GSM with Arduino
A Microcontroller

2 Shields Shields as they are called are PCB (printed circuit boards) that extend the functionality of Arduino’. Some examples:

3 What are they? PCB’s with circuits, sensors and various components pre-installed Attach via pins that match an Arduino PCB, no soldering required (Uno-compatible header configuration) Such as: WiFi, RFID, SD Card memory, Blue Tooth, LCD’s, GSM, motor control, Audio, GPS, datalogging… You have already used one: LCD in lesson 17 They can also be used for prototyping

4 Breakouts Typically small PCB’s built around an integrated circuit for a specific function Such as: Adafruit GPS breakout, a Keypad, or an LED status indicator Usually require soldering More flexible than shields (can be used with other products/devices)

5 Datasheets Shields and breakouts have data sheets which detail their configuration and use gps.pdf

6 Some examples Sensor shield LCD shield Motor shield
Stepper motor shield

7 Arduino site Details on pins can be found at:
o97mhw3euzr

8 Make your own phone…. ~$105NZD

9 Major Problems If you are going to do this:
The code provided by Adafruit is rubbish Please use the code we have fixed The Adafruit METRO 328 is of a low quality build, use an Arduino Uno instead. Libraries are tricky as the Adafruit instructions are weak and don’t clearly explain what to do Power in the way Bendy pins Why is it rubbish? The touch screen fields don’t line up well in the code Disabled items include: The adafruit Metro board required a restart and a press of the rest button to start taking 4 seconds to power up. The Arduino started in ~0.5 seconds with no reset or any other steps required. Text field Call not ending ICSP pins in the way Poor start on boot up (bootloader issues)

10 So the parts for GSM phone (Not GPRS)
Arduino Uno ($13 on trademe, full ATmega 16U2chip) Speaker ($1.60 see here) Vibrating motor ($2.50 see here or $3.25 for 5 on Aliexpress) Antenna ($5 see here or ~$2.50 on Aliexpress) Microphone ($1 see here) Adafruit FONA 800 GSM shield 2G ($40USD = $55NZD on Adafruit - see here) Consider the FONA 808 3G (for $50USD = $70NZD) TFT screen ($65 or $11 on Aliexpress) LiPo ($10 see here) 2 Degrees SIM ($5) Cheapest Total ~$105, best with the 808 at ~$116NZD 2 Degrees and Spark still support 2G Vodafone does not support 2G The FONA 800 GSM shield only supports 2G They have a 3G board, which also has GPS for $50USD:

11 Code & Libraries The code is in the online code summary book (copy and paste, compile, upload. Then search the name ‘John’ and change it on the splash screen to match what you want) Problems – libraries that you need to have loaded:

12 The libraries you need are:
#include <Adafruit_ILI9341.h> #include <Adafruit_GFX.h> #include <gfxfont.h> #include <Adafruit_FONA.h> #include <SPI.h> #include <Wire.h> // this is needed even tho we aren't using it #include <Adafruit_STMPE610.h> #include <SoftwareSerial.h>

13 Notes on libraries Place the Adafruit_FONA library folder in the folder arduinosketchfolder/libraries/ folder (usually mydocuments) You may need to create the libraries subfolder if its your first library. Restart the IDE

14 Current sensors in a phone:

15 Sensors 2018?

16 Another shield option; For your sumobot:
Consider a joystick controller? Project can be found at: By CHaleBrown in Arduino


Download ppt "Shields and GSM with Arduino"

Similar presentations


Ads by Google