A serial parser for a specific project

Dependencies:   mbed

Fork of Serial_HelloWorld_Mbed by mbed official

Revision:
5:1ba2b0e9e582
Parent:
4:178b04ae427e
Child:
6:da101b92bc2d
--- a/main.cpp	Tue Jul 14 13:11:30 2015 +0000
+++ b/main.cpp	Tue Jul 14 14:14:58 2015 +0000
@@ -1,4 +1,5 @@
 #include "mbed.h"
+// Data parser by Philip Goosen
  
  /*#define TX USBTX
  #define RX USBRX*/
@@ -21,6 +22,14 @@
     }
 }
 
+int isLetter(char let) // Only works for upper case
+{
+    if (let >= 'A' or let <= 'Z')
+    {
+        return 1;
+    }
+}
+
 int toDigit(char c)
 {
     return (c - '0');
@@ -47,7 +56,7 @@
                 
                 char c = pc.getc();// Gets a character from the computer that should be a digit from 0 - 9
                 
-                if (checkDigit(c))
+                if (check Digit(c))
                 {
                     int count = toDigit(c);
                     int x = 0;