created separate function for hex to char

Dependencies:   SDFileSystem ds3231 eeprom_Nikita mbed testUniGraphic_150217

Fork of SS_SensePOC2P0_11Dec2017_USERPID by rashmi v

Revision:
46:162ed3f051b2
Parent:
45:067673dae242
Child:
47:3716dd41dba6
--- a/main.cpp	Tue Sep 12 10:08:04 2017 +0000
+++ b/main.cpp	Wed Sep 13 06:06:41 2017 +0000
@@ -148,9 +148,10 @@
                         {
                             if (blue1.readable())         // if there is data to receive enter the loop
                             {
+                               
+                                state_t=bt_receive(state_r);
                                 timer_bt.stop();
                                 timer_bt.reset();
-                                state_t=bt_receive(state_r);
                                 if(state_t ==0)           // if state_t is zero, there is no other file to send
                                  {
                                   
@@ -177,6 +178,7 @@
                             EnableTouch();
                             main_state=1;
                             state_touch=12;
+                            sd_close();                             ///close the opened file which was used for bluetooth
                             timer_bt.stop();
                             timer_bt.reset();
                         }