rpi-io 2.0.6 → 2.0.7

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.
Files changed (2) hide show
  1. package/README.md +6 -16
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -4,6 +4,8 @@
4
4
 
5
5
  **rpi-io** is a lite [ESM](https://nodejs.org/api/esm.html#modules-ecmascript-modules) module for **Node.js** to control **Raspberry Pi** GPIO: access (in, out), input event detection and [PWM](https://en.wikipedia.org/wiki/Pulse-width_modulation) peripheral control.
6
6
 
7
+ **rpi-io** is built on a high performance hybrid architecture based on Node.js + C addon.
8
+
7
9
  **rpi-io** is designed for recent versions of Raspberry and related OS and middlewares. It has been tested in the following environments:
8
10
 
9
11
  - Raspberry Pi models: *RPi 5,* *RPi 4B* and *RPi Zero 2.*
@@ -12,24 +14,12 @@
12
14
  - Input/Output - [libgpiod](https://libgpiod.readthedocs.io/en/stable/) v1.6.3 (*Bookworm*) and v2.2.1 (*Trixie*)
13
15
  - PWM - [sysfs](https://en.wikipedia.org/wiki/Sysfs) interface.
14
16
 
15
-
16
-
17
- ## What's new with version 2
18
-
19
- | | version 1 | version 2 |
20
- | ------------ | ------------ | ------------------------ |
21
- | Architecture | Full Node.js | Hybrid Node.js + C addon |
22
- | Performance | Low | High |
23
-
24
- ⚠️ Given the new architecture, the v2 API is not compatible with the v1 one.
25
-
26
-
27
-
17
+
28
18
  ## Prerequisites
29
19
 
30
20
  ### libgpiod
31
21
 
32
- By default *libgpiod* is available with the latest Raspberry Pi OS distributions. If you want to install **rpi-io** with older - not tested - distributions, be sure it is installed.
22
+ By default, *libgpiod* is available with the latest Raspberry Pi OS distributions. If you want to install **rpi-io** with older - not tested - distributions, be sure it is installed.
33
23
 
34
24
  ```bash
35
25
  sudo apt-get update
@@ -250,7 +240,7 @@ const btn = new RIO(18, "input", {bias: "pull-up"})
250
240
 
251
241
  #### Servo motor
252
242
 
253
- REMINDER: PWM peripherals used in hardware mode need some specific [configuration](#Configuration).
243
+ REMINDER: PWM peripherals used in hardware mode need some specific [configuration](## Configuration for PWM-based peripherals).
254
244
 
255
245
  ##### Diagram for servo-motor *SG90*
256
246
  ```
@@ -488,7 +478,7 @@ myButton.monitoringStart(callback, "both", 30)
488
478
 
489
479
  - **callback** *{Function}* Function triggered by input events where parameter is *edge* that can be either "rising" (input change from 0 to 1) or "falling" (input change from 1 to 0).
490
480
  - **edge** *{String}* Filter of monitored events: "rising", "falling", "both" (default value).
491
- - **bounce** *{Number}* Set thresold in ms to filter consecutive events of same type. Default value is 0.
481
+ - **bounce** *{Number}* Set threshold in ms to filter consecutive events of same type. Default value is 0.
492
482
 
493
483
 
494
484
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rpi-io",
3
- "version": "2.0.6",
3
+ "version": "2.0.7",
4
4
  "description": "Nodejs module to control Raspberry Pi GPIO",
5
5
  "keywords": [
6
6
  "raspberry",