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: C12832 EthernetInterface IBMIoTClientEthernetExample LM75B MMA7660 MQTT iBMrfid mbed-rtos mbed
Fork of IBMIoTClientEthernetExample by
Diff: main.cpp
- Revision:
- 10:0b5e0dfee08e
- Parent:
- 9:58eb378727d9
- Child:
- 11:7a6df9a2dcdc
diff -r 58eb378727d9 -r 0b5e0dfee08e main.cpp
--- a/main.cpp Tue Oct 14 15:43:42 2014 +0000
+++ b/main.cpp Mon Oct 20 14:37:33 2014 +0000
@@ -14,6 +14,11 @@
* Sam Danbury - initial implementation
* Ian Craggs - refactoring to remove STL and other changes
* Sam Grove - added check for Ethernet cable.
+ * Chris Styles - Added additional menu screen for software revision
+ *
+ * To do :
+ * Add magnetometer sensor output to IoT data stream
+ *
*******************************************************************************/
#include "LM75B.h"
@@ -24,6 +29,9 @@
#include "Arial12x12.h"
#include "rtos.h"
+// Update this to the next number *before* a commit
+#define __APP_SW_REVISION__ "10"
+
// Configuration values needed to connect to IBM IoT Cloud
#define ORG "quickstart" // For a registered connection, replace with your org
#define ID "" // For a registered connection, replace with your id
@@ -132,6 +140,11 @@
lcd.locate(0,16);
lcd.printf(connected ? "Connected" : "Disconnected");
break;
+ case 4:
+ lcd.printf("App version:");
+ lcd.locate(0,16);
+ lcd.printf("%s",__APP_SW_REVISION__);
+ break;
}
}
@@ -142,7 +155,7 @@
if (Down)
{
joystickPos = "DOWN";
- if (menuItem >= 0 && menuItem < 3)
+ if (menuItem >= 0 && menuItem < 4)
printMenu(++menuItem);
}
else if (Left)
@@ -152,7 +165,7 @@
else if (Up)
{
joystickPos = "UP";
- if (menuItem <= 3 && menuItem > 0)
+ if (menuItem <= 4 && menuItem > 0)
printMenu(--menuItem);
}
else if (Right)
