testgsosg / Mbed 2 deprecated 04b_Taster_BusIn

Dependencies:   mbed

main.cpp

Committer:
Ben51
Date:
2018-07-06
Revision:
0:7aa83f9f0178

File content as of revision 0:7aa83f9f0178:

// 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);
   }
}