keybrd library is an open source library for creating custom-keyboard firmware.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

keybrd_1_breadboard.ino 1.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /* keybrd_1_breadboard.ino
  2. | Layout | **0** | **1** |
  3. |:------:|-------|-------|
  4. | **0** | 1 | 2 |
  5. | **1** | a | b |
  6. */
  7. // ################## GLOBAL ###################
  8. // ================= INCLUDES ==================
  9. #include <Code_Sc.h>
  10. #include <Row.h>
  11. #include <Scanner_uC.h>
  12. #include <ScanDelay.h>
  13. // ============ SPEED CONFIGURATION ============
  14. ScanDelay scanDelay(9000);
  15. // ================== SCANNER ==================
  16. uint8_t readPins[] = {14, 15};
  17. uint8_t readPinCount = sizeof(readPins)/sizeof(*readPins);
  18. Scanner_uC scanner(LOW, readPins, readPinCount);
  19. // =================== CODES ===================
  20. Code_Sc s_a(KEY_A);
  21. Code_Sc s_b(KEY_B);
  22. Code_Sc s_1(KEY_1);
  23. Code_Sc s_2(KEY_2);
  24. // =================== ROWS ====================
  25. Key* ptrsKeys_0[] = { &s_1, &s_2 };
  26. uint8_t keyCount_0 = sizeof(ptrsKeys_0)/sizeof(*ptrsKeys_0);
  27. Row row_0(scanner, 0, ptrsKeys_0, keyCount_0);
  28. Key* ptrsKeys_1[] = { &s_a, &s_b };
  29. uint8_t keyCount_1 = sizeof(ptrsKeys_1)/sizeof(*ptrsKeys_1);
  30. Row row_1(scanner, 1, ptrsKeys_1, keyCount_1);
  31. // ################### MAIN ####################
  32. void setup()
  33. {
  34. }
  35. void loop()
  36. {
  37. row_0.process();
  38. row_1.process();
  39. scanDelay.delay();
  40. }