![](/media/cache/group/mbed-logo-square-512_3.png.50x50_q85.png)
Additional DigitalIn example
Diff: main.cpp
- Revision:
- 0:10c4d3aa026e
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Thu Jan 19 14:21:24 2017 -0600 @@ -0,0 +1,17 @@ +#include "mbed.h" + +DigitalIn a(D0); +DigitalIn b(D1); +DigitalOut z_not(LED1); +DigitalOut z_and(LED2); +DigitalOut z_or(LED3); +DigitalOut z_xor(LED4); + +int main() { + while(1) { + z_not = !a; + z_and = a && b; + z_or = a || b; + z_xor = a ^ b; + } +}