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 LM75B MMA7660 MQTT mbed-rtos mbed
Fork of IBMIoTClientEthernetExample by
Revision 11:7a6df9a2dcdc, committed 2015-03-10
- Comitter:
- mazgch
- Date:
- Tue Mar 10 08:24:52 2015 +0000
- Parent:
- 10:0b5e0dfee08e
- Commit message:
- enable the C027
Changed in this revision
| C027.h | Show annotated file Show diff for this revision Revisions of this file |
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/C027.h Mon Oct 20 14:37:33 2014 +0000
+++ b/C027.h Tue Mar 10 08:24:52 2015 +0000
@@ -18,6 +18,9 @@
#define K64F_H
C12832 lcd(D11, D13, D12, D7, D10);
+PwmOut r(D5);
+PwmOut g(D9);
+PwmOut b(D8);
DigitalOut led1(LED1); DigitalOut led2(LED2); DigitalOut led3(LED3);
MMA7660 MMA(D14, D15);
LM75B sensor(D14,D15);
@@ -29,4 +32,11 @@
#define DEFAULT_TYPE_NAME "iotsample-mbed-c027"
+#include "lpc_phy.h"
+// need a wrapper since K64F and LPC1768 wont have the same name for mii read methods
+static uint32_t linkStatus(void)
+{
+ return (lpc_mii_read_data() & 1);
+}
+
#endif
\ No newline at end of file
--- a/main.cpp Mon Oct 20 14:37:33 2014 +0000
+++ b/main.cpp Tue Mar 10 08:24:52 2015 +0000
@@ -44,7 +44,10 @@
#define MQTT_MAX_PACKET_SIZE 250
-#if defined(TARGET_LPC1768)
+#if defined(TARGET_UBLOX_C027)
+#warning "Compiling for mbed C027"
+#include "C027.h"
+#elif defined(TARGET_LPC1768)
#warning "Compiling for mbed LPC1768"
#include "LPC1768.h"
#elif defined(TARGET_K64F)
@@ -194,6 +197,7 @@
char hostname[strlen(org) + strlen(iot_ibm) + 1];
sprintf(hostname, "%s%s", org, iot_ibm);
+ DEBUG("hostname is %s\n", hostname);
int rc = ipstack->connect(hostname, IBM_IOT_PORT);
if (rc != 0)
return rc;
