O'Reilly logo

Arduino: Building exciting LED based projects and espionage devices by Marco Schwartz, Utsav Shah, Samarth Shah, Adith Jagdish Boloor

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Testing the FONA shield

Now that our hardware is ready, we are going to test the FONA shield to see whether it is correctly connected and can connect to the network. As a test, we will send an SMS to the shield and also read all the messages present in the SIM card.

This is the complete Arduino sketch for this part, minus some helper functions that won't be detailed here:

// Include library #include "Adafruit_FONA.h" #include <SoftwareSerial.h> // Pins #define FONA_RX 2 #define FONA_TX 3 #define FONA_RST 4 // Buffer for replies char replybuffer[255]; // Software serial SoftwareSerial fonaSS = SoftwareSerial(FONA_TX, FONA_RX); SoftwareSerial *fonaSerial = &fonaSS; // Fona Adafruit_FONA fona = Adafruit_FONA(FONA_RST); // Readline function uint8_t ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required