usbipd list
to find the Picoprobe's BUSID- If the BUSID is
2-2
, usbipd wsl attach --busid 2-2
openocd
gdb-pico [project].elf
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 |
$ # | |
$ # 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` | |
$ # |
# | |
# 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: |
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) |
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 ] |
# Make sure you installed reline 0.4.0+ | |
Reline::Face.config(:completion_dialog) do |conf| | |
conf.define :default, foreground: :white, background: :blue | |
# ^^^^^ :cyan by default | |
conf.define :enhanced, foreground: :white, background: :magenta | |
conf.define :scrollbar, foreground: :white, background: :blue | |
end |