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: BufferedSerial C12832 EndpointMain-rfid EthernetInterface Logger StatusReporter-df2014 mbed-rtos mbed
Fork of df-2014-workshop-rfid-case-generator-k64f by
Diff: main.cpp
- Revision:
- 19:341ce6a43a84
- Parent:
- 13:2561e3855a81
- Child:
- 20:f548e2de5b0b
--- a/main.cpp Fri Aug 29 03:23:06 2014 +0000
+++ b/main.cpp Fri Aug 29 03:39:51 2014 +0000
@@ -41,6 +41,7 @@
// announce
logger.log("ARM/DreamForce 2014 mbed Status Reporter v%s",APP_VERSION);
+ logger.turnLEDBlue();
// initialize Ethernet
logger.log("Initializing Ethernet...");
@@ -48,6 +49,7 @@
// get a DHCP address and bring the network interface up
logger.log("Getting IP Address...");
+ logger.turnLEDOrange();
if (ethernet.connect() == 0) {
// log our IP address (DHCP)
logger.log("IP Address: %s",ethernet.getIPAddress());
@@ -57,6 +59,7 @@
// entering main loop
logger.log("Entering Main Loop...\r\nScanning...");
+ logger.turnLEDGreen();
// Enter the main loop
while(true) {
@@ -69,14 +72,17 @@
}
else {
logger.log("No Network... Exiting...");
+ logger.turnLEDRed();
exit(1);
}
// disconnect
logger.log("Disconnecting...");
+ logger.turnLEDOrange();
ethernet.disconnect();
// Exit
logger.log("Exiting...");
+ logger.turnLEDBlue();
exit(1);
}
\ No newline at end of file

