     for(int i = 0; i < LED_NUM; i++){
         pinMode(led_pins[i], OUTPUT);
         digitalWrite(led_pins[i], LOW);
+        led_states[i] = 0;
     }
 
 }

            case 0x01:
                led_num = read_buffer[9];
                led_num = led_num % LED_NUM;
                current_led_state = digitalRead(led_pins[led_num]);
                current_led_state = !current_led_state;
                digitalWrite(led_pins[led_num], current_led_state);
                write_buffer[0] = 0x00;
                write_buffer[9] = current_led_state;
                break;
            case 0x02:
                led_num = read_buffer[9];
                led_num = led_num % LED_NUM;
                digitalWrite(led_pins[led_num], HIGH);
                write_buffer[0] = 0x00;
                break;
            case 0x03:
                led_num = read_buffer[9];
                led_num = led_num % LED_NUM;
                digitalWrite(led_pins[led_num], LOW);
                write_buffer[0] = 0x00;
                break;
            case 0x04:
                write_buffer[9] = digitalRead(led_pins[3]);
                write_buffer[8] = digitalRead(led_pins[2]);
                write_buffer[7] = digitalRead(led_pins[1]);
                write_buffer[6] = digitalRead(led_pins[0]);
                break;
            default:
                write_buffer[0] = 0xFF;


const uint8_t not_supported[10] = {0xFF, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};

const uint8_t led_pins[LED_NUM] = {3,5,6,9};
uint8_t led_states[LED_NUM] = {0,0,0,0};

//adresy pouzity v openReadingPipe 1 - 5 by se mely
//lisit jen v prvnim bytu
