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:
- 0:a2bd6b5198cb
- Child:
- 1:97730fe3f608
diff -r 000000000000 -r a2bd6b5198cb main.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Thu Jun 02 12:22:03 2016 +0000
@@ -0,0 +1,20 @@
+#include "mbed.h"
+#include "KS0070B_user.h"
+
+AnalogIn c(p20);
+
+int main()
+{
+ float val;
+ lcdprint("Contrast: ");
+ lcdgoto(1, 14);
+ lcdprint("%");
+ while(1) {
+ val=1-2.42*c;
+ lcdgoto(0, 10);
+ lcdprintnb(2*(val-0.5), 1, 3);
+ lcdgoto(1, 10);
+ lcdprintnb(100*val, 3, 0);
+ wait(0.1);
+ }
+}