Kreuzschaltung mit 4 Schalter. KV-Diagram in Code umgesetzt.
Cross connection with 4 switches
Boolean operation table and Karnaugh-Veitch-Symmetrie-Diagramm
Output =(A۸B۸¬C۸D)۷(¬A۸B۸C۸D)۷(A۸B۸C۸¬D)۷(¬A۸B۸¬C۸¬D)۷(A۸¬B۸¬C۸¬D)۷(¬A۸¬B۸C۸¬D)۷ (A۸¬B۸C۸D)۷(¬A۸¬B۸¬C۸D)
Wiring
I know it's an Arduino but for illustration enouth :P
main.cpp@0:1b90d953ef92, 2019-11-13 (annotated)
- Committer:
- fpucher
- Date:
- Wed Nov 13 13:52:25 2019 +0000
- Revision:
- 0:1b90d953ef92
- Child:
- 1:51299916db3e
TINF, DigitalIn, BUTTON1
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
fpucher | 0:1b90d953ef92 | 1 | #define BUTTON1 p14 |
fpucher | 0:1b90d953ef92 | 2 | #include "mbed.h" |
fpucher | 0:1b90d953ef92 | 3 | // Flash an LED while a DigitalIn is true |
fpucher | 0:1b90d953ef92 | 4 | |
fpucher | 0:1b90d953ef92 | 5 | DigitalIn enable(BUTTON1); |
fpucher | 0:1b90d953ef92 | 6 | DigitalOut led(LED1); |
fpucher | 0:1b90d953ef92 | 7 | |
fpucher | 0:1b90d953ef92 | 8 | int main() { |
fpucher | 0:1b90d953ef92 | 9 | while(1) { |
fpucher | 0:1b90d953ef92 | 10 | if(enable) { |
fpucher | 0:1b90d953ef92 | 11 | led = !led; |
fpucher | 0:1b90d953ef92 | 12 | } |
fpucher | 0:1b90d953ef92 | 13 | wait(0.25); |
fpucher | 0:1b90d953ef92 | 14 | } |
fpucher | 0:1b90d953ef92 | 15 | } |