Skip to content

Instantly share code, notes, and snippets.

View digitarhythm's full-sized avatar

おおやけハジメ digitarhythm

View GitHub Profile
# Initialize a Keyboard
kbd = Keyboard.new
kbd.split = true # This should happen before Keyboard#init_pins.
# Initialize GPIO assign
kbd.init_pins(
[ 3, 2, 6, 4 ], # row0, row1,... respectively
[ 15, 14, 10, 7, 5 ] # col0, col1,... respectively
)
#keyboard.row_pins = (board.GP3, board.GP2, board.GP6,board.GP4)
#keyboard.col_pins = (board.GP15, board.GP14, board.GP10, board.GP7)
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/coffee-script/1.7.1/coffee-script.min.js"></script>
<script type="text/coffeescript">
window.onload = ->
disp = "<pre>Su Ma Th We Tu Fr Su<br>"
days = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]