This simple program enable LPC11U24 MBED board to act as a simple integer calculator. Just type the operation you want to execute from the serial terminal. Admitted operations: +, -, * /, ^ (only positive exponent). Multiple operations in raw are supported as well as negative integer.

Dependencies:   mbed

Fork of Serial_HelloWorld_Mbed by mbed official

Revision:
4:235e50314809
Parent:
3:3bef1c4e42d4
Child:
5:8bb67df511a3
--- a/main.cpp	Mon Sep 22 06:23:35 2014 +0000
+++ b/main.cpp	Mon Sep 22 06:27:25 2014 +0000
@@ -120,7 +120,7 @@
                             pc.printf("%s", buf);
                         }
                         pc.printf("\n\n");
-                        pc.printf("Please enter a new operation\n");
+                        pc.printf("Please enter a new operation:\n");
                         first = TRUE;
                         error = FALSE;
                     }
@@ -151,5 +151,6 @@
     pc.attach(&callback,Serial::RxIrq);
 
     pc.printf("LPC Integer Calculator!\n");
+    pc.printf("Please enter a new operation:\n");
     while (1) {}
 }
\ No newline at end of file