Skip to content

Commit 601bacd

Browse files
authored
Merge pull request #53 from pezi/ps/0.9.20
Ps/0.9.20
2 parents 08fe647 + 99b24d0 commit 601bacd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+1256
-517
lines changed

CHANGELOG.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1+
## 0.9.20
2+
* Fix problems found with the help of ChatGPT and Kiro
3+
* Update c-periphery to `2.5.0`
4+
* Update Dart Version to `3.10.4`
5+
16
## 0.9.19
2-
* Add GPS [Air530](https://github.com/pezi/dart_periphery/blob/ps/0.9.19/example/serial_air530.dart)
7+
* Add GPS [Air530](https://github.com/pezi/dart_periphery/blob/main/example/serial_air530.dart)
38
* Update Dart Version to `3.9.3`
49

510
## 0.9.18
@@ -70,7 +75,7 @@
7075

7176
## 0.9.9
7277

73-
* Add [SDC30](https://www.seeedstudio.com/Grove-CO2-Temperature-Humidity-Sensor-SCD30-p-2911.html) - CO2, temperature amd humidity sensor
78+
* Add [SCD30](https://www.seeedstudio.com/Grove-CO2-Temperature-Humidity-Sensor-SCD30-p-2911.html) - CO2, temperature amd humidity sensor
7479
* internal pre-build c-periphery libraries are compressed using the xz format
7580

7681
## 0.9.8

README.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
![alt text](https://raw.githubusercontent.com/pezi/dart_periphery_img/main/header.jpg "Title")
55

6-
[![pub package](https://img.shields.io/badge/pub-v0.9.19-orange)](https://pub.dartlang.org/packages/dart_periphery)
6+
[![pub package](https://img.shields.io/badge/pub-v0.9.20-orange)](https://pub.dartlang.org/packages/dart_periphery)
77
[![Pub Points](https://img.shields.io/pub/points/dart_periphery)](https://pub.dev/packages/dart_periphery/score)
88
[![All Contributors](https://img.shields.io/github/contributors/pezi/dart_periphery)](https://github.com/pezi/dart_periphery/graphs/contributors)
99
[![BSD License](https://img.shields.io/github/license/pezi/dart_periphery)](https://opensource.org/license/bsd-3-clause)
@@ -14,7 +14,7 @@ The repository’s [Wiki](https://github.com/pezi/dart_periphery/wiki) is now en
1414

1515
## 📖 Introduction
1616

17-
**dart_periphery** is a Dart port of the native [c-periphery library](https://github.com/vsergeev/c-periphery) (v2.4.3)
17+
**dart_periphery** is a Dart port of the native [c-periphery library](https://github.com/vsergeev/c-periphery) (v2.5.0)
1818
for Linux Peripheral I/O (GPIO, LED, PWM, SPI, I2C, MMIO and Serial peripheral I/O). This package
1919
is designed for System on Chips (SoCs) such as Raspberry Pi, NanoPi, Banana Pi, and others.
2020

@@ -115,7 +115,7 @@ import 'package:dart_periphery/dart_periphery.dart';
115115
/// low-power combined humidity, pressure, and temperature sensor.
116116
void main() {
117117
// Select the right I2C bus number /dev/i2c-?
118-
// 1 for Raspbery Pi, 0 for NanoPi (Armbian), 2 Banana Pi (Armbian)
118+
// 1 for Raspberry Pi, 0 for NanoPi (Armbian), 2 Banana Pi (Armbian)
119119
var i2c = I2C(1);
120120
try {
121121
print('I2C info:' + i2c.getI2Cinfo());
@@ -142,7 +142,7 @@ import 'package:dart_periphery/dart_periphery.dart';
142142
/// quick response and integrated temperature & humidity sensor.
143143
void main() {
144144
// Select the right I2C bus number /dev/i2c-?
145-
// 1 for Raspbery Pi, 0 for NanoPi (Armbian), 2 Banana Pi (Armbian)
145+
// 1 for Raspberry Pi, 0 for NanoPi (Armbian), 2 Banana Pi (Armbian)
146146
var i2c = I2C(1);
147147
try {
148148
var sht31 = SHT31(i2c);
@@ -420,14 +420,14 @@ cd ~
420420
### arm
421421

422422
``` bash
423-
wget https://storage.googleapis.com/dart-archive/channels/stable/release/3.9.3/sdk/dartsdk-linux-arm-release.zip
423+
wget https://storage.googleapis.com/dart-archive/channels/stable/release/3.10.4/sdk/dartsdk-linux-arm-release.zip
424424
unzip dartsdk-linux-arm-release.zip
425425
```
426426

427427
### arm64
428428

429429
``` bash
430-
wget https://storage.googleapis.com/dart-archive/channels/stable/release/3.9.3/sdk/dartsdk-linux-arm64-release.zip
430+
wget https://storage.googleapis.com/dart-archive/channels/stable/release/3.10.4/sdk/dartsdk-linux-arm64-release.zip
431431
unzip dartsdk-linux-arm64-release.zip
432432
```
433433

@@ -443,14 +443,14 @@ unzip dartsdk-linux-ia32-release.zip
443443
### X64
444444

445445
``` bash
446-
wget https://storage.googleapis.com/dart-archive/channels/stable/release/3.9.3/sdk/dartsdk-linux-x64-release.zip
446+
wget https://storage.googleapis.com/dart-archive/channels/stable/release/3.10.4/sdk/dartsdk-linux-x64-release.zip
447447
unzip dartsdk-linux-x64-release.zip
448448
```
449449

450450
### RISC-V (RV64GC)
451451

452452
``` bash
453-
wget https://storage.googleapis.com/dart-archive/channels/stable/release/3.9.3/sdk/dartsdk-linux-riscv64-release.zip
453+
wget https://storage.googleapis.com/dart-archive/channels/stable/release/3.10.4/sdk/dartsdk-linux-riscv64-release.zip
454454
unzip dartsdk-linux-riscv64-release.zip
455455
```
456456

@@ -485,7 +485,7 @@ Test the installation
485485

486486
``` bash
487487
dart --version
488-
Dart SDK version: 3.9.3 (stable) (Tue Sep 9 12:02:51 2025 -0700) on "linux_arm64"
488+
Dart SDK version: 3.10.4 (stable) (Tue Dec 9 00:01:55 2025 -0800) on "linux_arm"
489489
```
490490

491491
## 📚 Native libraries
@@ -594,6 +594,7 @@ the asset directory.
594594

595595
## 🖥 Supported devices (sensors, actuators, extensions hats and displays)
596596

597+
* [Air530](https://github.com/pezi/dart_periphery/blob/main/example/serial_air530.dart) GPS sensor
597598
* [SGP30](https://github.com/pezi/dart_periphery/blob/main/example/i2c_sgp30.dart): tVOC and eCO2 Gas Sensor
598599
* [BME280](https://github.com/pezi/dart_periphery/blob/main/example/i2c_bme280.dart): Temperature, humidity and pressure sensor.
599600
* [BME680](https://github.com/pezi/dart_periphery/blob/main/example/i2c_bme680.dart): Temperature, humidity pressure and gas (Indoor Airy Quality) sensor.
@@ -606,7 +607,7 @@ the asset directory.
606607
* [MCP9808](https://github.com/pezi/dart_periphery/blob/main/example/i2c_mcp9808.dart): high accuracy temperature sensor.
607608
* [MLX90615](https://github.com/pezi/dart_periphery/blob/main/example/i2c_mlx90615.dart): digital infrared non-contact temperature sensor.
608609
* [PCF8591](https://github.com/pezi/dart_periphery/blob/main/example/i2c_pcf8591.dart): ADC+DAC combo
609-
* [SDC30](https://github.com/pezi/dart_periphery/blob/main/example/i2c_sdc30.dart): CO₂, temperature and humidity sensor.
610+
* [SCD30](https://github.com/pezi/dart_periphery/blob/main/example/i2c_scd30.dart): CO₂, temperature and humidity sensor.
610611
* [SI1145](https://github.com/pezi/dart_periphery/blob/main/example/i2c_si1145.dart) sunlight sensor: visible & IR light, UV index
611612
* [TSL2591](https://github.com/pezi/dart_periphery/blob/main/example/i2c_tsl2591.dart) light sensor
612613
* [DS1307/DS3231](https://github.com/pezi/dart_periphery/blob/main/example/i2c_ds1307.dart) real time clock support

example/extension_hats/hat_button.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ const wait = 150;
1111

1212
/// https://wiki.friendlyelec.com/wiki/index.php/BakeBit_-_Button
1313
///
14-
/// Usage: [nano|grove|grovePlus] buttonPin ledPin
14+
/// Usage: [gpio|nano|grove|grovePlus] buttonPin ledPin
1515
void main(List<String> args) {
1616
String pinInfo = "Button pin";
17-
var tupple = checkArgs2Pins(args, "buttonPin", "ledPin");
18-
var buttonPin = tupple.$2;
19-
var ledPin = tupple.$3;
20-
var hat = tupple.$1;
17+
var tuple = checkArgs2Pins(false, args, "buttonPin", "ledPin");
18+
var buttonPin = tuple.$2;
19+
var ledPin = tuple.$3;
20+
var hat = tuple.$1;
2121
switch (hat) {
2222
case Hat.nano:
2323
var hat = NanoHatHub();

example/extension_hats/hat_button_extended.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ const holdTime = 1000;
1111

1212
/// https://wiki.friendlyelec.com/wiki/index.php/BakeBit_-_Button
1313
///
14-
/// Usage: [nano|grove|grovePlus] buttonPin ledPin
14+
/// Usage: [gpio|nano|grove|grovePlus] buttonPin ledPin
1515
void main(List<String> args) {
1616
String pinInfo = "Button pin";
17-
var tupple = checkArgs2Pins(args, "buttonPin", "ledPin");
18-
var buttonPin = tupple.$2;
19-
var ledPin = tupple.$3;
20-
var hat = tupple.$1;
17+
var tuple = checkArgs2Pins(false, args, "buttonPin", "ledPin");
18+
var buttonPin = tuple.$2;
19+
var ledPin = tuple.$3;
20+
var hat = tuple.$1;
2121

2222
const holdTime = 1000; // Time to hold the button (in ms) to toggle LED
2323

example/extension_hats/hat_light_sensor.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ const wait = 500;
1313
///
1414
/// Usage: [nano|grove|grovePlus] analogPin
1515
void main(List<String> args) {
16-
var tupple = checkArgs(args, "analogPin");
17-
var pin = tupple.$2;
18-
var hat = tupple.$1;
16+
var tuple = checkArgs(true, args, "analogPin");
17+
var pin = tuple.$2;
18+
var hat = tuple.$1;
1919
switch (hat) {
2020
case Hat.nano:
2121
{

example/extension_hats/hat_light_sensor_led.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ const threshold = 100;
1818
/// Usage: [nano|grove|grovePlus] analogPin
1919
void main(List<String> args) {
2020
String pinInfo = "Analog pin";
21-
var tupple = checkArgs2Pins(args, "analogPin", "ledPin");
22-
var analogPin = tupple.$2;
23-
var ledPin = tupple.$3;
24-
var hat = tupple.$1;
21+
var tuple = checkArgs2Pins(true, args, "analogPin", "ledPin");
22+
var analogPin = tuple.$2;
23+
var ledPin = tuple.$3;
24+
var hat = tuple.$1;
2525
switch (hat) {
2626
case Hat.nano:
2727
{

example/extension_hats/hat_magnetic_hall.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ const wait = 150;
1414
/// Usage: [gpio|nano|grove|grovePlus] hallPin ledPin
1515
void main(List<String> args) {
1616
String pinInfo = "Hall pin";
17-
var tupple = checkArgs2Pins(args, "hallPin", "ledPin");
18-
var magnetPin = tupple.$2;
19-
var ledPin = tupple.$3;
20-
var hat = tupple.$1;
17+
var tuple = checkArgs2Pins(false, args, "hallPin", "ledPin");
18+
var magnetPin = tuple.$2;
19+
var ledPin = tuple.$3;
20+
var hat = tuple.$1;
2121
switch (hat) {
2222
case Hat.nano:
2323
var hat = NanoHatHub();

example/extension_hats/hat_magnetic_switch.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ const wait = 150;
1111

1212
/// https://wiki.seeedstudio.com/Grove-Magnetic_Switch/
1313
///
14-
/// Usage: [nano|grove|grovePlus] mageneticSwitchPin ledPin
14+
/// Usage: [gpio|nano|grove|grovePlus] mageneticSwitchPin ledPin
1515
void main(List<String> args) {
1616
String pinInfo = "Magenetic switch pin";
17-
var tupple = checkArgs2Pins(args, "mageneticSwitchPin", "ledPin");
18-
var magnetPin = tupple.$2;
19-
var ledPin = tupple.$3;
20-
var hat = tupple.$1;
17+
var tuple = checkArgs2Pins(false, args, "mageneticSwitchPin", "ledPin");
18+
var magnetPin = tuple.$2;
19+
var ledPin = tuple.$3;
20+
var hat = tuple.$1;
2121
switch (hat) {
2222
case Hat.nano:
2323
var hat = NanoHatHub();

example/extension_hats/hat_pir_motion.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ const wait = 200;
1111

1212
/// https://wiki.seeedstudio.com/Grove-PIR_Motion_Sensor/
1313
///
14-
/// Usage: [nano|grove|grovePlus] pirMotionPin ledPin
14+
/// Usage: [gpio|nano|grove|grovePlus] pirMotionPin ledPin
1515
void main(List<String> args) {
1616
String pinInfo = "PIR motion pin";
17-
var tupple = checkArgs2Pins(args, "pirMotionPin", "ledPin");
18-
var pirMotionPin = tupple.$2;
19-
var ledPin = tupple.$3;
20-
var hat = tupple.$1;
17+
var tuple = checkArgs2Pins(false, args, "pirMotionPin", "ledPin");
18+
var pirMotionPin = tuple.$2;
19+
var ledPin = tuple.$3;
20+
var hat = tuple.$1;
2121
switch (hat) {
2222
case Hat.nano:
2323
var hat = NanoHatHub();

example/extension_hats/hat_vibration.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ const wait = 150;
1212
/// https://wiki.seeedstudio.com/Grove-Vibration_Sensor_SW-420/
1313
1414
///
15-
/// Usage: [nano|grove|grovePlus] vibrationPin ledPin
15+
/// Usage: [gpio|nano|grove|grovePlus] vibrationPin ledPin
1616
void main(List<String> args) {
1717
String pinInfo = "Vibration pin";
18-
var tupple = checkArgs2Pins(args, "vibrationPin", "ledPin");
19-
var vibrationPin = tupple.$2;
20-
var ledPin = tupple.$3;
21-
var hat = tupple.$1;
18+
var tuple = checkArgs2Pins(false, args, "vibrationPin", "ledPin");
19+
var vibrationPin = tuple.$2;
20+
var ledPin = tuple.$3;
21+
var hat = tuple.$1;
2222
switch (hat) {
2323
case Hat.nano:
2424
var hat = NanoHatHub();

0 commit comments

Comments
 (0)