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: UbloxUSBModem WebSocketClient mbed
main.cpp
00001 #include "UbloxUSBGSMModem.h" 00002 #include "UbloxUSBCDMAModem.h" 00003 #include "websocketstest.h" 00004 00005 #define MODEM_UBLOX_CDMA 00006 //#define MODEM_UBLOX_GSM 00007 00008 #if !defined(MODEM_UBLOX_GSM) && !defined(MODEM_UBLOX_CDMA) 00009 #warning No modem defined, using GSM by default 00010 #define MODEM_UBLOX_GSM 00011 #endif 00012 00013 #ifndef MODEM_APN 00014 #warning APN not specified, using "internet" 00015 #define MODEM_APN "internet" 00016 #endif 00017 00018 #ifndef MODEM_USERNAME 00019 #warning username not specified 00020 #define MODEM_USERNAME NULL 00021 #endif 00022 00023 #ifndef MODEM_PASSWORD 00024 #warning password not specified 00025 #define MODEM_PASSWORD NULL 00026 #endif 00027 00028 int main() 00029 { 00030 #ifdef MODEM_UBLOX_GSM 00031 UbloxUSBGSMModem modem; 00032 #else 00033 UbloxUSBCDMAModem modem(p18, true, 1); 00034 #endif 00035 websocketstest(modem, MODEM_APN, MODEM_USERNAME, MODEM_PASSWORD); 00036 while (true); 00037 }
Generated on Mon Jul 18 2022 10:01:18 by
