![](/media/cache/group/mbed-logo-square-512_3.png.50x50_q85.png)
Additional DigitalIn example
main.cpp
- Committer:
- sarahmarshy
- Date:
- 2017-06-23
- Revision:
- 1:ad8683db322a
- Parent:
- 0:10c4d3aa026e
File content as of revision 1:ad8683db322a:
#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; } }