Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ npm-debug.log
node_modules

.vscode/
*.tgz
8 changes: 8 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,13 @@ A simple node.js module for reading temperature and relative humidity using a co
$ npm install node-dht-sensor
```

Please note that differently from versions 0.0.x there's no need to pre-install the BCM2835 library [2].
For use with the Raspberry Pi 5, creating dependency on libgpiod, installation is as follows:

```shell session
$ npm install node-dht-sensor --use_libgpiod=true
```

The above accounts for the architectural changes in the Raspberry Pi 5 which are incompatible with the BCM2835 library.

## Usage

Expand Down
12 changes: 10 additions & 2 deletions binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@
"targets": [
{
"variables": {
"dht_verbose%": "false"
"dht_verbose%": "false",
"use_libgpiod%" : "false"
},
"target_name": "node_dht_sensor",
"sources": [
"src/bcm2835/bcm2835.c",
"src/node-dht-sensor.cpp",
"src/dht-sensor.cpp",
"src/util.cpp"
"src/util.cpp",
"src/abstract-gpio.cpp",
],
"include_dirs": [
"<!@(node -p \"require('node-addon-api').include\")"
Expand All @@ -21,6 +23,12 @@
"conditions": [
["dht_verbose=='true'", {
"defines": [ "VERBOSE" ]
}],
["use_libgpiod=='true'", {
"defines": [ "USE_LIBGPIOD" ],
'libraries': [
'-lgpiod'
]
}]
]
}
Expand Down
Loading