- flash LED if temperature is higher than 30 degrees
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kbd = Keyboard.new | |
c1 = 29 | |
c2 = 28 | |
c3 = 27 | |
c4 = 26 | |
c5 = 22 | |
c6 = 20 | |
c7 = 23 | |
c8 = 21 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This example assumes to use "meishi2" which has 2x2 matrix circuit. | |
# | |
# If you use a larger one, let's say 40% keyboard, the code will look like: | |
# (Note that GPIO pin numbers in this example are written at random. They are fishy) | |
# ``` | |
# kbd = Keyboard.new( | |
# [ 2, 3, 4, 5 ], # row0, row1,... respectively | |
# [ 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 ] # col0, col1,... respectively | |
# ) | |
# kbd.add_layer :default, [ |
NewerOlder