rgpio 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +30 -2
- data/README.md +33 -891
- data/examples/rotary_encoder.rb +48 -0
- data/examples/ruby_stack.rb +169 -0
- data/examples/tft.rb +65 -0
- data/examples/touch_calibration.rb +61 -0
- data/examples/touch_paint.rb +67 -0
- data/lib/rgpio/devices/adt7410.rb +1 -1
- data/lib/rgpio/devices/font5x7.rb +209 -0
- data/lib/rgpio/devices/ili9341.rb +338 -0
- data/lib/rgpio/devices/rgb565.rb +61 -0
- data/lib/rgpio/devices/rotary_encoder.rb +202 -0
- data/lib/rgpio/devices/xpt2046.rb +294 -0
- data/lib/rgpio/i2c.rb +1 -1
- data/lib/rgpio/pwm.rb +7 -3
- data/lib/rgpio/spi.rb +39 -1
- data/lib/rgpio/version.rb +1 -1
- data/lib/rgpio.rb +5 -0
- metadata +17 -7
- data/PLAN.md +0 -347
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f1ab8a466bac9f5b9fe42d1fe8cd6d8a20696dfc93bde55277764080d0f8f598
|
|
4
|
+
data.tar.gz: 4593b9382c6345eb98245984ef264180ddbef3af07924fe3c7b3f707db09a7e5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 485dd4024ebeb9985bf503d6260fa369774c7d3e9b88a33cc1fe8e09393afef7e4918867c751d8ee6ac7174228f99550589ff87896bf7691ba620d1770144a8b
|
|
7
|
+
data.tar.gz: ef65f567ed8a90b1f6ccead21d08bebe8d28692af350c972f16d0727b307637731d0301ddd8a84688feabd7a975b3499e47ef0372ac7a7c9601553d12bfd9bbd
|
data/CHANGELOG.md
CHANGED
|
@@ -7,7 +7,34 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
## [0.1.1] - 2026-10-23
|
|
11
|
+
|
|
12
|
+
New devices for the Pi 5 round: a rotary encoder, and an SPI colour TFT with
|
|
13
|
+
its touch panel. All of them are verified on Pi 5.
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
|
|
17
|
+
- `Rgpio::RotaryEncoder` for quadrature encoders such as the KY-040:
|
|
18
|
+
`steps` / `steps=` / `value`, `max_steps:` with optional `wrap:`, and
|
|
19
|
+
`when_rotated` / `when_rotated_clockwise` / `when_rotated_counter_clockwise`
|
|
20
|
+
callbacks, with `examples/rotary_encoder.rb`. Verified on Pi 5 with a bare
|
|
21
|
+
three-pin encoder, no debounce needed.
|
|
22
|
+
- `Rgpio::ILI9341` for 240x320 SPI colour TFTs: `fill` / `fill_rect` /
|
|
23
|
+
`pixel`, `blit` of raw RGB565, `text` in a built-in 5x7 font with `scale:`
|
|
24
|
+
and optional background, `rotation=`, `invert=`, and an on/off or PWM
|
|
25
|
+
`backlight=`. Drawing is clipped to the screen and safe from several threads.
|
|
26
|
+
The SPI clock defaults to 24 MHz (20 MHz on a Pi 5; a full-screen fill takes
|
|
27
|
+
about 65 ms). With `examples/tft.rb`. Verified on Pi 5.
|
|
28
|
+
- `Rgpio::XPT2046` for the resistive touch panel on the same modules: `raw`,
|
|
29
|
+
`touched?`, `position`, `when_touched` / `when_released` (T_IRQ optional),
|
|
30
|
+
and `XPT2046.calibration_from` to fit screen coordinates from a few touches.
|
|
31
|
+
A reading taken while the pen lands or lifts is discarded. With
|
|
32
|
+
`examples/touch_paint.rb` and `examples/ruby_stack.rb` (tap to drop rubies
|
|
33
|
+
that pile up, in landscape). Verified on Pi 5.
|
|
34
|
+
- `Rgpio::RGB565` (colour names, `[r, g, b]` and RGB565 integers) and
|
|
35
|
+
`Rgpio::Font5x7`, shared by the display classes.
|
|
36
|
+
- `SPI#send_bytes` sends a block of any length tx-only, split at
|
|
37
|
+
`SPI.max_transfer_size` (spidev's `bufsiz`), without unpacking a reply.
|
|
11
38
|
|
|
12
39
|
## [0.1.0] - 2026-09-29
|
|
13
40
|
|
|
@@ -99,5 +126,6 @@ waiting on hardware (Pi Zero / Pi 1, and `MotionSensor`).
|
|
|
99
126
|
and reports `Rgpio.available? == false` rather than raising, so the sysfs-only
|
|
100
127
|
`HardwarePWM` and the `ioctl`-only `I2C` and `SPI` stay usable there.
|
|
101
128
|
|
|
102
|
-
[Unreleased]: https://github.com/lumbermill/rgpio/compare/v0.1.
|
|
129
|
+
[Unreleased]: https://github.com/lumbermill/rgpio/compare/v0.1.1...HEAD
|
|
130
|
+
[0.1.1]: https://github.com/lumbermill/rgpio/compare/v0.1.0...v0.1.1
|
|
103
131
|
[0.1.0]: https://github.com/lumbermill/rgpio/releases/tag/v0.1.0
|