Skip to content

Instantly share code, notes, and snippets.

View hasumikin's full-sized avatar
🐕‍🦺
inu

HASUMI Hitoshi hasumikin

🐕‍🦺
inu
View GitHub Profile

Setup, general information and trouble shooting

Important Notes

(Also read Trouble Shoot)

Laptop Security Settings

If your laptop is configured to prohibit writing to USB memory devices, likely due to your company's security policy, it will not function in the workshop😣

@hasumikin
hasumikin / keymap.rb
Created April 19, 2023 23:46
PRK Firmware ADC example
require "adc"
require "mouse"
kbd = Keyboard.new
kbd.init_direct_pins( [8] )
kbd.add_layer :default, %i(BOOTSEL)
kbd.define_mode_key :BOOTSEL, [ Proc.new { kbd.bootsel! }, nil, 300, nil ]
@hasumikin
hasumikin / keymap.rb
Created April 19, 2023 23:45
PRK Firmware SPI example (Keyball44)
require "spi"
require "mouse"
require "consumer_key"
class SPI
def pmw3360dm_write(*values)
GPIO.write_at(21, 0)
write(*values)
Machine.delay_us 20
GPIO.write_at(21, 1)
@hasumikin
hasumikin / keymap.rb
Created April 19, 2023 23:45
PRK Firmware I2C example
#
# Pin assignment:
# switch matrix:
# row: 1, 2, 3, 4
# col: 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18
# RGBLED: 0
# I2C0: trackball and RTC
# sda_pin: 20
# scl_pin: 21
# SPI1:
@hasumikin
hasumikin / gist:c14a75aedc05de046cb39778145338b1
Created November 29, 2022 07:06
例のMaximum call stack size exceededのエラーメッセージ
$ #
$ # irb.wasm - IRB on CRuby on WebAssembly
$ #
$ # Source code is available at https://github.com/kateinoigakukun/irb.wasm
$ #
$ # QUICK START
$ # 1. Install gem by `gem "haml"
$ # 2. `require "haml"`
$ # 3. `Term.echo Haml::Template.new { "%h1 Haml code!" }.render`
$ #
@hasumikin
hasumikin / Picoprobe.md
Last active March 27, 2025 23:34
Debug a Pi Pico app with Picoprobe(WSL2)
@hasumikin
hasumikin / keymap.rb
Last active June 12, 2022 02:51
Sample PRK Firmware keymap for Bolt Industries Pico 87
puts "==== Pico87 ===="
kbd = Keyboard.new
kbd.init_pins(
[ 18, 19, 20, 21, 22, 26 ],
[ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 ]
)
# 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
@hasumikin
hasumikin / keymap.rb
Created May 6, 2022 02:51
Simulating "Grave Escape" feature of QMK
class Keyboard
def grave_escape
index = @keycodes.index(KEYCODE.index(:KC_ESCAPE).chr)
if index
if (@modifier & 0b00010001) > 0 # CTRL
# Do nothing so that "SHIFT+CTRL+ESCAPE" opens Task Manager
elsif (@modifier & 0b00100010) > 0 # SHIFT
@keycodes[index] = KEYCODE.index(:KC_GRAVE).chr
elsif (@modifier & 0b10001000) > 0 # GUI
@keycodes[index] = KEYCODE.index(:KC_GRAVE).chr
@hasumikin
hasumikin / keymap.rb
Created February 6, 2022 23:35
Shotgun CherryPie example keymap
kbd = Keyboard.new
kbd.init_pins(
[ 11, 12, 13, 14, 15 ], # row0, row1,... respectively
[ 9, 8, 7, 6 ] # col0, col1,... respectively
)
kbd.add_layer :default, %i[
RGB_TOG KC_ESC KC_NO KC_BSPACE
RGB_MOD KC_7 KC_8 KC_9
@hasumikin
hasumikin / keymap.rb
Last active March 2, 2022 14:39
keymap.rb of Amatelus73
kbd = Keyboard.new
c1 = 29
c2 = 28
c3 = 27
c4 = 26
c5 = 22
c6 = 20
c7 = 23
c8 = 21