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 Analog_in_TEST by
Diff: main.cpp
- Revision:
- 0:471e7471a24e
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Thu Sep 01 01:36:07 2011 +0000
@@ -0,0 +1,16 @@
+#include "mbed.h"
+
+AnalogIn ain(p20);
+DigitalOut led(LED1);
+
+int main() {
+ while (1){
+
+ printf("analog in = %f\n", ain.read());
+ if(ain > 0.3) {
+ led = 1;
+ } else {
+ led = 0;
+ }
+ }
+}
\ No newline at end of file
