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.
Fork of ELEC351_Group_T by
SERIAL.cpp
00001 #include "SERIAL.hpp" 00002 extern bool motor_direction = 0; 00003 bool Decimal_Check(char Input[100]) //Check if there is a decimal within the Array 00004 { 00005 for(int x = 0; x < sizeof(Input); x++) 00006 { 00007 if(Input[x] == '.'){return true;} //Return true if one is found 00008 } 00009 return false; //Return false if one is not found 00010 } 00011 00012 int Decimal_Position(char Input[100]) //Check where the decimal is positioned 00013 { 00014 for(int x = 0; x < sizeof(Input); x++) 00015 { 00016 if(Input[x] == '.'){return x;} //Return the position x of the Decimal 00017 } 00018 return 0; 00019 }
Generated on Tue Jul 12 2022 22:52:51 by
