PicoRuby is the smallest Ruby implementation for one-chip microcontrollers.
Presentation
Products by PicoRuby
PRK Firmware
Firmware framework for DIY keyboards.
- https://github.com/picoruby/prk_firmware
- [KBD.news] PRK firmware: PRK is a PicoRuby-based keyboard firmware running on RP2040 chips. https://kbd.news/PRK-firmware-1370.html
R2P2
Microcontroller programming framework.
Tutorial of R2P2
1-1 Getting start with R2P2
- Download the latest
R2P2-*.uf2
from the releases page of the repository - Drag and drop it into the RPI-RP2 drive
- Open a proper port in your terminal emulator
1-2 R2P2 shell has some UNIX-like commands
- Try some UNIX-like commands like
ls
,mkdir
andtouch
1-3 R2P2 has PicoIRB
- Open PicoIRB with
irb
command
2-1 LED blinking (L-chika) with PicoRuby
- Turn on the on-board LED using PicoIRB
- If you use “Pico W”, write
led = CYW43::GPIO.new(CYW43::GPIO::LED_PIN)
2-2 require "adc"
loads ADC class
- You can load pre-built libraries like “picoruby-adc” and use ADC class
3-1 PicoIRB has multi-line editor!
- That’s cool, right?
3-2 PicoRuby has Time class working with RTC in MCU
- The clock will be persistent if you connect a battery-driven RTC module. Try it :)
3-3 You can even use a Vim-like editor in R2P2
- It’s not for a serious usage but for demonstrating the viability of PicoRuby ;)
3-4 You can drag and drop your Ruby script from your laptop
- This is what you want to do in a real development
3-5 /home/app.rb automatically starts Pi Pico
- Now your Pi Pico is a stand-alone device