Adafruit Fona library with Photon

@hbierau, I compiled the FONA library using CLI to simplify things. Here are the steps I used:

  1. Create a new directory (that you will later compile with CLI)
  2. Copy the FONA files from the github repo and remove everything but the includes folder and the two FONA library files (.cpp and .h).
  3. Copy the FONAtest.ino file, from the examples\FONAtest\ folder, to the folder you created above
  4. Edit the Adafruit_FONA.h file and add #include "Arduino.h" before the other includes
  5. Edit the FONAPlatStd.h file in the \includes\platform\ folder and comment out #include <NewSoftSerial.h> on line 36
  6. Edit FONAtest.ino and add #include "Arduino.h" before the other include. Also comment out lines 40-42 and add a new line as shown below:
//#include <SoftwareSerial.h>
//SoftwareSerial fonaSS = SoftwareSerial(FONA_TX, FONA_RX);
//SoftwareSerial *fonaSerial = &fonaSS;
USARTSerial *fonaSerial = &Serial1;  // NEW LINE

Now compile with a Photon target and test. Good luck!

3 Likes