GPS Receiver with Ethernet PHY disabled to reduce interference noise

Dependencies:   mbed PowerControl

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "mbed.h"
00002 #include "EthernetPowerControl.h"
00003 
00004 Serial gps(p9, p10);
00005 
00006 int main() {
00007     printf("GPS Receiver (Ethernet disabled)\n");
00008     PHY_PowerDown(); // disable Ethernet connection
00009     gps.baud(9600);
00010 
00011     while (true) {
00012         if (gps.readable())
00013             putchar(gps.getc());
00014     }
00015 }