testgsosg / Mbed 2 deprecated 04b_Taster_BusIn

Dependencies:   mbed

Revision:
0:7aa83f9f0178
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri Jul 06 07:24:23 2018 +0000
@@ -0,0 +1,15 @@
+// 04b_Taster_BusIn
+// hierbei werden die Taster auf der Multi-Functionshield-Platine genutzt
+#include "mbed.h"
+        // Achtung LSB zuerst
+BusIn taster(PA_1,PA_4,PB_0);
+Serial pc(SERIAL_TX, SERIAL_RX);
+
+int main() {
+   while (1) {
+      int tasterValue = taster.read();
+   // Kurzform:  int tasterValue = taster;
+      pc.printf("%d ",tasterValue);
+      wait(1.0);
+   }
+}