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: LM75B mbed mbedConnectorInterface mbedEndpointNetwork_Ublox
Diff: main.cpp
- Revision:
- 10:3680052f3baa
- Parent:
- 9:0370006a6988
- Child:
- 11:4ae75a76dbe5
diff -r 0370006a6988 -r 3680052f3baa main.cpp
--- a/main.cpp Sat Jul 25 07:07:48 2015 +0000
+++ b/main.cpp Mon Jul 27 02:51:14 2015 +0000
@@ -19,24 +19,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
+
// mbed Connector Interface (configuration)
#include "mbedConnectorInterface.h"
-// U-Blox Cellular Support
-#include "MBEDUbloxCellRadio.h"
-MDMSerial modem;
-MBEDUbloxCellRadio cellular((void *)&modem);
-
-// mbed Connector Endpoint includes
-#include "ConnectorEndpoint.h"
-#include "OptionsBuilder.h"
-
-// USB Serial port access for debugging/logging
-RawSerial pc(USBTX,USBRX);
-
-// Logging facility
-Logger logger(&pc);
+// mbed Endpoint Network
+#include "mbedEndpointNetwork.h"
// Static Resources
#include "StaticResource.h"
@@ -73,11 +61,10 @@
#define MY_ENDPOINT_NAME "mbed-3g-endpoint"
// My NSP Domain
-#define MY_NSP_DOMAIN "domain"
+#define MY_NSP_DOMAIN "domain"
// Customization Example: My custom NSP IPv4 address and NSP CoAP port
uint8_t my_nsp_address[NSP_IP_ADDRESS_LENGTH] = {23,99,29,171}; // connector (api.connector.mbed.org)
-
int my_nsp_coap_port = 5683;
// called from the Endpoint::start() below to create resources and the endpoint internals...
@@ -105,8 +92,8 @@
// Add my specific physical dynamic resources...
.addResource(&light)
- .addResource(&temperature,10000) // observe every 10 seconds
- .addResource(&location,10000) // observe every 10 seconds
+ .addResource(&temperature,10000) // observe every 10 seconds
+ .addResource(&location,30000) // observe every 30 seconds
// finalize the configuration...
.build();