diff --git a/index.md b/index.md index 1ed2cf0..b87b3a6 100644 --- a/index.md +++ b/index.md @@ -26,45 +26,68 @@ Microcontroller programming framework. - [https://github.com/picoruby/R2P2](https://github.com/picoruby/R2P2) -#### Quick demos +### Tutorial of R2P2 -##### 1-1 Getting start with 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 +#### 1-2 R2P2 shell has some UNIX-like commands + +- Try some UNIX-like commands like `ls`, `mkdir` and `touch` -##### 1-3 R2P2 has PicoIRB +#### 1-3 R2P2 has PicoIRB + +- Open PicoIRB with `irb` command -##### 2-1 LED blinking (L-chika) with PicoRuby +#### 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 +#### 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! +#### 3-1 PicoIRB has multi-line editor! + +- That's cool, right? -##### 3-2 PicoRuby has Time class working with RTC in MCU +#### 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 +#### 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 +#### 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 +#### 3-5 /home/app.rb automatically starts Pi Pico + +- Now your Pi Pico is a stand-alone device