Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: GPSLibrary GSM mbed-modifed Storage_Library Temp_Library Wakeup pH_Sensor
main.cpp
- Committer:
- ptcrews
- Date:
- 2015-11-02
- Revision:
- 1:83d3982f32d5
- Child:
- 2:8de680cf7a19
File content as of revision 1:83d3982f32d5:
#include "Adafruit_FONA.h"
#include "mbed.h"
#define FONA_TX D8
#define FONA_RX D2
#define FONA_RST D3
#define FONA_RI D4
#define FONA_KEY D5
Adafruit_FONA fona(FONA_TX, FONA_RX, FONA_RST, FONA_RI);
Serial pcSerial(USBTX, USBRX);
DigitalOut key(FONA_KEY);
void pullKey()
{
key.write(0);
wait(2);
key.write(1);
}
int main()
{
pcSerial.baud(9600);
pullKey();
printf("Starting FONA\n");
while(!fona.begin(9600)) {
printf("Cannot find FONA\n");
wait(1);
}
fona.begin(9600);
pcSerial.printf("On for 2 seconds\n");
wait(2);
pcSerial.printf("Turning off\n");
pullKey();
return 0;
}