Albert-Jan Knevels / Mbed 2 deprecated CherryStone

Dependencies:   mbed

Revision:
6:c09f0df4123c
Parent:
5:92add1a06191
Child:
7:7a91079a5ddd
diff -r 92add1a06191 -r c09f0df4123c main.cpp
--- a/main.cpp	Fri Jul 25 13:35:41 2014 +0000
+++ b/main.cpp	Fri Jul 25 13:48:05 2014 +0000
@@ -11,9 +11,9 @@
     Serial pc (USBTX, USBRX);
     pc.baud(9600);
     char hostCommand;
-    int hostData1;
-    int hostData2;
-    int hostData3;
+    char hostData1;
+    char hostData2;
+    char hostData3;
     //Chip communication
     SPI spi(p5, p6, p7);
     spi.format(MLX90393::spi_bits,MLX90393::spi_mode);
@@ -23,12 +23,10 @@
 
     //variables
     char read_buffer[10];
-
+    //if you remove this line the program will fail
+    hostCommand = 0;
     while(1) {
-        printf("**voor*** \n\r");
         pc.scanf(" %i, %i, %i, %i", &hostCommand, &hostData1, &hostData2, &hostData3);
-        printf("**NA*** \n\r");
-        //hostCommand = 5;
         switch(hostCommand) {
             case 0: {