rpi-io 2.0.0 → 2.0.2

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.
package/README.md CHANGED
@@ -303,7 +303,7 @@ import {RIO, sleep, ctrlC, } from "rpi-io"
303
303
  console.log("servo duty = 100%") // ~ 0.5 + (1.0 * (2.5 ms - 0.5 ms)) = 2.5 ms
304
304
  await sleep(2000)
305
305
  servo.pwmDuty(0)
306
- logconsole.logservo duty = 0%") // ~ 0.5 + (0.0 * (2.5 ms - 0.5 ms)) = 0.5 ms
306
+ console.log("servo duty = 0%") // ~ 0.5 + (0.0 * (2.5 ms - 0.5 ms)) = 0.5 ms
307
307
  await sleep(2000)
308
308
  servo.close()
309
309
  console.log("servo closed")
@@ -372,7 +372,7 @@ node /your-project/node_modules/rpi-io/test/line-configuration.js
372
372
 
373
373
  The **rpi-io** API is based on the class `RIO` with instance methods.
374
374
 
375
- ### RIO class and generic methods
375
+ ### RIO class and methods
376
376
 
377
377
  #### constructor RIO(line, mode, opt)
378
378
  To create instance according to parameters.
@@ -403,7 +403,7 @@ const myOutput = new RIO(17, "output")
403
403
  period: 20000,
404
404
  // pwm - dutyMin and dutyMax defines the duty cycle use range in µs
405
405
  // especially for servo-motors (See their specs!).
406
- dutyMin: 0
406
+ dutyMin: 0,
407
407
  dutyMax: 20000
408
408
  }
409
409
  ```
@@ -524,7 +524,7 @@ const servo = new RIO(13, "pwm", {
524
524
  exportTime: 100,
525
525
  period: 20000,
526
526
  dutyMin: 500,
527
- dutyMax: 2500)
527
+ dutyMax: 2500})
528
528
 
529
529
  // duty cycle = 50% between dutyMin and dutyMax
530
530
  servo.pwmDuty(50)
@@ -543,8 +543,8 @@ Function to close all instances
543
543
  ##### Example
544
544
  ```javascript
545
545
  import {RIO} from "rpi-io"
546
- const led = new RIO(line1, "output", {value: 0})
547
- const btn = new RIO(line2, "input")
546
+ const led = new RIO(17, "output", {value: 0})
547
+ const btn = new RIO(18, "input")
548
548
  RIO.closeAll()
549
549
  // led and btn are closed
550
550
  ```
@@ -593,7 +593,7 @@ import {sleep, ctrlC} from "rpi-io"
593
593
  ctrlC(() => {
594
594
  console.log("displayed on script interrupt")
595
595
  })
596
- await sleep(1000)
596
+ await sleep(10000)
597
597
  console.log("displayed after 10s")
598
598
  })()
599
599
  ```
package/binding.gyp CHANGED
@@ -19,14 +19,6 @@
19
19
  ],
20
20
  "defines": [
21
21
  "<!@(sh -c 'chmod +x script/detect-gpiod-version.sh 2>/dev/null; bash script/detect-gpiod-version.sh 2>/dev/null || echo LIBGPIOD_V2')"
22
- ],
23
- "conditions": [
24
- ["OS=='linux'", {
25
- "libraries": [
26
- "-lgpiod",
27
- "-lpthread"
28
- ]
29
- }]
30
22
  ]
31
23
  }
32
24
  ]
package/history.md CHANGED
@@ -1,3 +1,7 @@
1
+ 2.0.2 - Dec 1, 2025
2
+ ===================
3
+ * Typos
4
+ * Less restrictive binding.gyp for dev purpose
1
5
 
2
6
  2.0.0 - Nov 26, 2025
3
7
  ===================
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rpi-io",
3
- "version": "2.0.0",
3
+ "version": "2.0.2",
4
4
  "description": "Nodejs module to control Raspberry Pi GPIO",
5
5
  "keywords": [
6
6
  "raspberry",