NSWI170, 2025, Labs 04
Jáchym Bártík
for cyklechloop
setup a loop
| DP | G | F | E | D | C | B | A |
| 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 |
255 - 4 - 2 - 1 = 248
shiftOut(data_pin, clock_pin, MSBFIRST, 248); // Display digit 7 (11111000) ...
shiftOut(data_pin, clock_pin, MSBFIRST, 5); // ... on positions 1 and 3 (0101)
digitalWrite(latch_pin, LOW); // Trigger the latch
digitalWrite(latch_pin, HIGH);funshield.h
OUTPUT
digits )MSBFIRST určuje pořadí bitů
LSBFIRST
displayDigit(int digit, int position)
digit je od 0 do 9position je od 0 do 3