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 BinaryCount by
Diff: main.cpp
- Revision:
- 1:4647b43d61ef
- Parent:
- 0:8ed2f4a2a2fe
- Child:
- 2:5682a72277ed
- Child:
- 3:7448a1637704
--- a/main.cpp Mon Mar 27 12:49:02 2017 +0000
+++ b/main.cpp Mon Mar 27 14:29:20 2017 +0000
@@ -5,7 +5,7 @@
Reads from analog input, streams ASCII text to std serial using printf, and
lights onboard LED. Also demonstrates use of floating point literal sufix to
eliminate warning and int constants for HIGH and LOW. This version uses
- overloaded operators.
+ overloaded operators and sends LED state read from DigitalOut object.
Written by: Dr. C. S. Tritt
Created: 3/26/17 (v. 1.0)
@@ -34,6 +34,7 @@
else {
led = LOW;
}
+ printf("LED = %d\n", (int) led); // Send LED state as serial text.
wait(0.25); // 250 ms
}
}
