BusIn HelloWorld

Dependencies:   mbed

For more information read the BusIn handbook page.

mbed 2 and mbed OS 5

This is an mbed 2 example. For an mbed-os example, please see:

Import programBusIn_HelloWorld

BusIn HelloWorld

main.cpp

Committer:
mbed_official
Date:
2013-02-11
Revision:
0:5e474ece410b

File content as of revision 0:5e474ece410b:

#include "mbed.h"

BusIn nibble(p5, p6, p18, p11);

int main() {
    while(1) {
        switch(nibble) {
            case 0x3: printf("Hello!\n"); break; // p5 and p6 are 1
            case 0x8: printf("World!\n"); break; // p11 is 1
        }
    }
}