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
Diff: main.cpp
- Revision:
- 0:3a42b53185b8
- Child:
- 1:fc8fd0a0c09d
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Wed Jan 09 14:59:26 2019 +0000
@@ -0,0 +1,32 @@
+#include "mbed.h"
+
+AnalogIn input(A0);
+Serial pc(SERIAL_TX, SERIAL_RX);
+
+int main() {
+
+
+uint16_t inputWert = 0x0000;
+
+
+while (1) {
+
+inputWert = input.read_u16();
+pc.printf("sample value: 0x%04X\n",inputWert);
+
+wait_ms(10);
+
+pc.printf("Spannung\n");
+if(inputWert != 0x0000) {
+ if (inputWert <= 0x5555){
+ pc.printf("<***** >\n");}
+ if(inputWert >= 0x5555 && inputWert <= 0xAAAA){
+ pc.printf("<***** ***** >\n");}
+ if(inputWert >= 0xAAAA){
+ pc.printf("<***** ***** *****>\n");}
+ } else {
+ pc.printf("< >\n");}
+pc.printf("\n");
+//wait_ms(1000);
+}
+}
\ No newline at end of file