버튼스위치로 숫자 변경하기
준비물 - 7segment 1개 - 버튼스위치 2개 - 10㏀ 저항 2개 - 220Ω 저항 1개 코드 int digit = 0; byte digits[10][7] = { {1, 1, 1, 1, 1, 1, 0}, {0, 1, 1, 0, 0, 0, 0}, {1, 1, 0, 1, 1, 0, 1}, {1, 1, 1, 1, 0, 0, 1}, {0, 1, 1, 0, 0, 1, 1}, {1, 0, 1, 1, 0, 1, 1}, {0, 0, 1, 1, 1, 1, 1}, {1, 1, 1, 0, 0, 0, 0}, {1, 1, 1, 1, 1, 1, 1}, {1, 1, 1, 0, 0, 1, 1}, }; const int minusButtonPin = 2; const int plusButtonPin = 3; void setup(..
더보기