Add support for "typing" by flashing LEDs. Set a bootup message

pull/18/head
Jesse Vincent 10 years ago
parent 58e33fde82
commit e2205ecb81

@ -269,8 +269,8 @@ void setup()
Keyboard.begin(); Keyboard.begin();
Mouse.begin(); Mouse.begin();
setup_leds(); setup_leds();
update_leds(0); led_bootup();
setup_command_mode(); setup_command_mode();
setup_matrix(); setup_matrix();
setup_pins(); setup_pins();
rightsx1509.fetchPinStates(); rightsx1509.fetchPinStates();

@ -66,7 +66,6 @@ void setup_leds() {
LED.setOutput(LED_DATA_PIN); LED.setOutput(LED_DATA_PIN);
LED.setColorOrderGRB(); // Uncomment for RGB color order LED.setColorOrderGRB(); // Uncomment for RGB color order
led_mode = LED_MODE_RAINBOW_WAVE;
} }
byte key_to_led(byte row, byte col) { byte key_to_led(byte row, byte col) {
@ -269,4 +268,34 @@ void led_effect_rainbow_wave_update() {
LED.sync(); LED.sync();
} }
void led_bootup() {
set_all_leds_to(led_off);
led_type_letter(LED_K);
led_type_letter(LED_E);
led_type_letter(LED_Y);
led_type_letter(LED_B);
led_type_letter(LED_O);
led_type_letter(LED_A);
led_type_letter(LED_R);
led_type_letter(LED_D);
led_type_letter(LED_I);
led_type_letter(LED_O);
led_type_letter(LED_SPACE);
led_type_letter(LED_0);
led_type_letter(LED_PERIOD);
led_type_letter(LED_9);
led_mode = LED_MODE_RAINBOW_WAVE;
}
void led_type_letter(int letter) {
LED.set_crgb_at(letter,led_bright_red);
LED.sync();
delay(400);
LED.set_crgb_at(letter,led_off);
LED.sync();
delay(30);
}

@ -26,6 +26,71 @@ static const int key_led_map[4][16] =
#define LED_PGDN 0
#define LED_PGUP 1
#define LED_BACKTICK 2
#define LED_LED 3
#define LED_1 4
#define LED_Q 5
#define LED_A 6
#define LED_Z 7
#define LED_X 8
#define LED_S 9
#define LED_W 10
#define LED_2 11
#define LED_3 12
#define LED_E 13
#define LED_D 14
#define LED_C 15
#define LED_V 16
#define LED_F 17
#define LED_R 18
#define LED_4 19
#define LED_5 20
#define LED_T 21
#define LED_6 22
#define LED_B 23
#define LED_ESC 24
#define LED_TAB 25
#define LED_REC 26
#define LED_L_FN 27
#define LED_L_CTRL 28
#define LED_DEL 29
#define LED_CMD 30
#define LED_L_SHIFT 31
#define LED_R_SHIFT 32
#define LED_ALT 33
#define LED_SPACE 34
#define LED_CTRL 35
#define LED_R_FN 36
#define LED_ANY 37
#define LED_RETURN 38
#define LED_BUTTERFLY 39
#define LED_N 40
#define LED_H 41
#define LED_Y 42
#define LED_6 43
#define LED_7 44
#define LED_U 45
#define LED_J 46
#define LED_M 47
#define LED_COMMA 48
#define LED_K 49
#define LED_I 50
#define LED_8 51
#define LED_9 52
#define LED_O 53
#define LED_L 54
#define LED_PERIOD 55
#define LED_SLASH 56
#define LED_SEMICOLON 57
#define LED_P 58
#define LED_0 59
#define LED_NUM 60
#define LED_EQUALS 61
#define LED_APOSTROPHE 62
#define LED_MINUS 63
void setup_leds(); void setup_leds();
void update_leds(int numlock_enabled); void update_leds(int numlock_enabled);
void set_all_leds_to(cRGB color); void set_all_leds_to(cRGB color);
@ -51,6 +116,7 @@ void led_effect_chase_update();
void led_effect_steady_update(); void led_effect_steady_update();
void led_effect_heatmap_update(); void led_effect_heatmap_update();
void led_effect_numlock_update(); void led_effect_numlock_update();
void led_bootup();
void led_type_letter(int letter);
#endif #endif

Loading…
Cancel
Save