(Also read Trouble Shoot)
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😣
(Also read Trouble Shoot)
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😣
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 ] |
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) |
# | |
# 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: |
$ # | |
$ # 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` | |
$ # |
Note that RP2 (debug target) should be powered, too.
You may need to upgrade usbipd
: https://github.com/dorssel/usbipd-win/releases
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 |
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 |
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 |
kbd = Keyboard.new | |
c1 = 29 | |
c2 = 28 | |
c3 = 27 | |
c4 = 26 | |
c5 = 22 | |
c6 = 20 | |
c7 = 23 | |
c8 = 21 |