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: C027 C027_Support mbed mbed-rtos MbedSmartRest LM75B MMA7660 C12832
Fork of MbedSmartRestTest by
Diff: program.cpp
- Revision:
- 31:912c140ee050
- Parent:
- 26:26e9899e2cbe
- Child:
- 32:56804dd00193
--- a/program.cpp Mon May 26 08:12:14 2014 +0000
+++ b/program.cpp Mon May 26 08:26:01 2014 +0000
@@ -17,6 +17,11 @@
void analogMeasurement(long deviceId, Aggregator& aggr);
void motionMeasurement(long deviceId, Aggregator& aggr);
+char cUsername[48];
+char cPassword[48];
+char cDeviceIdentifier[48];
+
+const char *srtplIdentifier = "com_u-blox_C027_REV-A_0.10_Test1233123";
StaticData srtpl(
// get device by identity
// Usage: 100,<SERIAL/NR>
@@ -51,13 +56,20 @@
);
float interval = 120.0; // send measurements every two minutes
-MbedSmartRest client("developer.cumulocity.com", 80, "vaillant/admin", "klanpi", "com_u-blox_C027_REV-A_0.10_Test1233123");
+
+MbedSmartRest client("developer.cumulocity.com", 80, cUsername, cPassword, cDeviceIdentifier);
int program(void)
{
long deviceId = 0; Timer timer;
- lcd_tenant("vaillant");
+ // copy credentials and identifier into fields
+ //TODO: implement bootstrap process
+ strcpy(cUsername, "vaillant/admin");
+ strcpy(cPassword, "klanpi");
+ strcpy(cDeviceIdentifier, srtplIdentifier);
+
+ lcd_tenant(cUsername);
puts("Hello!");
puts("Bootstrapping");
