Analogspannung, Balkenanzeige, Serielle Schnittstelle

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
heseg
Date:
Sat Nov 23 07:56:04 2019 +0000
Commit message:
Analogspannung, LED Balkenanzeige, Serielle Schnittstelle

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r cd5a90a3eafd main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sat Nov 23 07:56:04 2019 +0000
@@ -0,0 +1,17 @@
+#include "mbed.h"
+Serial pc(SERIAL_TX, SERIAL_RX);        // TxD, RxD Definition der Portleitung
+/* ******************** Variablendefinitionen ***************************** */
+
+AnalogIn poti(A3);
+
+float analogwert;
+BusOut vpoti(D2,D3,D6,D9,D11,D12,A6,D13);
+
+int main() 
+{   pc.baud(9600);
+    while(1) 
+    {
+       pc.printf("Spannung=%fV\n",(poti.read())*3.3);
+       vpoti=poti.read_u16()>>8;
+    }
+}
diff -r 000000000000 -r cd5a90a3eafd mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sat Nov 23 07:56:04 2019 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400
\ No newline at end of file