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.
Diff: main.cpp
- Revision:
- 3:56c8ab2df3aa
- Parent:
- 2:635e61271822
--- a/main.cpp Tue Oct 16 13:47:34 2018 +0000
+++ b/main.cpp Tue Oct 16 13:49:36 2018 +0000
@@ -41,7 +41,6 @@
pc.printf("Start mv: %.3f, Current mV: %.3f, difference from start mV: %.3f \n\r",mv_start, mv, mv_start-mv);
displayOnesTens(abs(rint(mv_start - mv)));
- //Ones = SegConvert(abs(rint(mv_start - mv)));
}
else{//if switch off, print degrees C
pc.printf("Start temp C: %.3f, Current temp C: %.3f, difference from start temp C: %.3f \n\r",start_tempC, tempC, start_tempC - tempC);
@@ -72,9 +71,10 @@
void displayOnesTens(int number) {
//converts number to two seperate hexnumbers for the leds
- int ones = number % 10;
- int tens = number / 10 % 10;
-
+ int ones = number % 10; //get ones digit
+ int tens = number / 10 % 10; //get tens digit
+
+ //send to respective displays
Ones = SegConvert(ones);
Tens = SegConvert(tens);