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
Revision 1:0260e05c8e83, committed 2017-11-28
- Comitter:
- DeanArm7
- Date:
- Tue Nov 28 16:40:36 2017 +0000
- Parent:
- 0:0302f3c057c9
- Commit message:
- Now with connected grounds and serial display;
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Tue Nov 28 00:08:45 2017 +0000
+++ b/main.cpp Tue Nov 28 16:40:36 2017 +0000
@@ -3,19 +3,26 @@
DigitalOut myled1(LED1);
DigitalOut myled2(LED2);
-AnalogIn tempin(p17);
+AnalogIn tempin(p16);
+
+Serial pc(USBTX, USBRX); // tx, rx
+
int main() {
myled1 = 0;
myled2 = 0;
+ float test=0;
while(1) {
wait(0.5);
- if(tempin > 0.34f){ //going above 1.07V
+
+ test = tempin;
+ pc.printf("%f\n\r",test);
+ if(tempin > 0.28f){ //going above max temp
myled1 = 0;
myled2 = 1;
}
- if(tempin < 0.34f){ //going below 1.07V
+ if(tempin < 0.28f){ //going below max temp
myled1 = 1;
myled2 = 0;
}