Senses an earthquake with MPU6050 and gets time, coordenates and other details of the event with an Adafruit GPS. All the info is sent to an HTTP server
Dependencies: MPU6050 mbed-http MBed_Adafruit-GPS-Library
Diff: source/network-helper.h
- Branch:
- mbed-os-5.10
- Revision:
- 31:66704f6f17c5
- Parent:
- 30:4825e4f38844
- Child:
- 35:4b847971db1b
diff -r 4825e4f38844 -r 66704f6f17c5 source/network-helper.h --- a/source/network-helper.h Mon Oct 29 14:34:43 2018 +0800 +++ b/source/network-helper.h Tue Oct 30 11:07:10 2018 +0800 @@ -2,6 +2,9 @@ #define _MBED_HTTP_EXAMPLE_H_ #include "mbed.h" +#ifdef TARGET_SIMULATOR +#include "EthernetInterface.h" +#endif /** * Connect to the network using the default networking interface, @@ -11,7 +14,11 @@ NetworkInterface *connect_to_default_network_interface() { printf("[NWKH] Connecting to network...\n"); +#ifdef TARGET_SIMULATOR + NetworkInterface* network = new EthernetInterface(); +#else NetworkInterface* network = NetworkInterface::get_default_instance(); +#endif nsapi_error_t connect_status = network->connect();