7-Segment1 7-Segment void printDigit(int input); byte Pins[] = {9, 8, 3, 4, 5, 7, 6, 2}; byte Digit[] = { 0xFC, // 0 0x60, // 1 0xDA, // 2 0xF2, // 3 0x66, // 4 0xB6, // 5 0xBE, // 6 0xE4, // 7 0xFE, // 8 0xF6, // 9 }; byte read = 0, tmp; void (*func)(byte); void setup(){ Serial.begin(9600); for(int i=0; i 0){ tmp = read; read = Serial.read(); switch(read){ case 'a': case 'A': func = mode1; mode1(true); read = 0; br.. 아두이노 2022. 1. 18. 이전 1 다음