※和文はページ下部にあります
Previous sections:
- Setup + LED: https://tinyurl.com/picoruby-2025
- Microphone: https://tinyurl.com/picoruby-mic
- Buzzer: https://tinyurl.com/picoruby-buzzer
- Useful gems: https://tinyurl.com/picoruby-gems
※和文はページ下部にあります
Previous sections:
※和文はページ下部にあります
Previous sections:
So far we've learned the fundamental peripherals: GPIO, ADC, and PWM. These are the building blocks of all microcontroller programming. Now let's explore how PicoRuby's gem system makes working with complex sensors much easier!
※和文はページ下部にあります
Previous sections:
In this section, we'll learn about PWM (Pulse Width Modulation) - a powerful technique that allows us to simulate analog signals using digital outputs. We'll use PWM to create sounds with a buzzer and control LED brightness smoothly.
※和文はページ下部にあります
Previous sections:
In this section, we'll learn about analog-to-digital conversion (ADC) and explore how to read analog sensors. We'll use a microphone to detect sound levels and also explore the RP2350's built-in temperature sensor.
※和文はページ下部にあります
Before starting, please check the following resources:
R2P2-PICORUBY-PICO2_W-*.uf2 (PICO2_W is the point)| # frozen_string_literal: true | |
| namespace :db do | |
| namespace :structure do | |
| STRUCTURE_PATH = 'db/structure.sql' | |
| def clean_structure_file | |
| original = File.read(STRUCTURE_PATH) | |
| cleaned = original.dup |
It's a common misconception that [William Shakespeare][1] and [Miguel de Cervantes][2] died on the same day in history - so much so that UNESCO named April 23 as [World Book Day because of this fact][3]. However because England hadn't yet adopted [Gregorian Calendar Reform][4] (and wouldn't until [1752][5]) their deaths are actually 10 days apart. Since Ruby's Time class implements a [proleptic Gregorian calendar][6] and has no concept of calendar reform then there's no way to express this. This is where DateTime steps in:
>> shakespeare = DateTime.iso8601('1616-04-23', Date::ENGLAND)
=> Tue, 23 Apr 1616 00:00:00 +0000
>> cervantes = DateTime.iso8601('1616-04-23', Date::ITALY)
=> Sat, 23 Apr 1616 00:00:00 +0000
Here's what I did to get things working.
Yep, over at: https://developer.apple.com
| #To Get List of Hardware | |
| sudo networksetup -listallhardwareports | |
| #To Disable IPv6 on Wifi Adapter | |
| sudo networksetup -setv6off wi-fi | |
| #To Disable IPv6 on Built-in Ethernet Adapter | |
| sudo networksetup -setv6off Ethernet |
| -- show running queries (pre 9.2) | |
| SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
| FROM pg_stat_activity | |
| WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
| ORDER BY query_start desc; | |
| -- show running queries (9.2) | |
| SELECT pid, age(clock_timestamp(), query_start), usename, query | |
| FROM pg_stat_activity | |
| WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |