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.
Dependencies: mbed
Fork of Lab_6_WaG by
Diff: main.cpp
- Revision:
- 7:161fe3793ddb
- Parent:
- 6:749a691e2abf
- Child:
- 8:d8bc78bda829
--- a/main.cpp Thu Feb 22 02:03:30 2018 +0000
+++ b/main.cpp Thu Feb 22 02:06:07 2018 +0000
@@ -109,44 +109,4 @@
spi.write(0x0100); //set digit 0 to 0
SS = 1;
*/
-}
-
-bool num_range(char input[5]) {
- bool result = true;
- for (int i = 0; i < 5; i++) {
- if (i > 3)
- if (input[i] != 0) //checks for number larger than 9999
- result = false;
- if (input[i] < 48 or input[i] > 57) //checks for digits outside 0-9
- result = false;
- }
- return result;
-}
-
-void mod_bcd(int num) {
- int size = 4;
- int dec_arr[size];
- int place = 0;
- while (num != 0) { //converts decimal input to decimal array using %mod
- int val = num % 10;
- dec_arr[place] = val;
- num = num/10;
- place++;
- }
- for (int i = 0; i < size; i++) { //converts decimal array to binary array
- bcd[i] = convert(dec_arr[i]);
- }
-}
-
-
-char to_command(char input, int place) {
-
-}
-
-int convert(int dec) {//convert decimal to binary
- if (dec == 0) //function complete
- return 0;
- else //recursive call until converted
- return (dec % 2 + 10 * convert(dec / 2));
-}
-
\ No newline at end of file
+}
\ No newline at end of file
