Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pimterry/rpi-backlight
A node library to control the backlight of the official Raspberry Pi 7" touch display
https://github.com/pimterry/rpi-backlight
Last synced: about 1 month ago
JSON representation
A node library to control the backlight of the official Raspberry Pi 7" touch display
- Host: GitHub
- URL: https://github.com/pimterry/rpi-backlight
- Owner: pimterry
- License: mit
- Created: 2017-03-25T21:05:23.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-03-17T11:42:07.000Z (over 2 years ago)
- Last Synced: 2024-09-15T02:45:56.979Z (about 2 months ago)
- Language: JavaScript
- Size: 13.7 KB
- Stars: 8
- Watchers: 6
- Forks: 3
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# rpi-backlight
A node library to control the backlight of the [official Raspberry Pi 7" touch display](https://www.raspberrypi.org/products/raspberry-pi-touch-display/)## Installation
```bash
npm install --save rpi-backlight
```## Usage
```javascript
var backlight = require('rpi-backlight');// Check if the device supports backlight
var isSupported = backlight.isSupported();// All methods return promises.
backlight.powerOn();
backlight.powerOff();
backlight.isPoweredOn();
backlight.getBrightness();
backlight.setBrightness(value); // The screen goes Off at <= 9 brightness value
backlight.getMaxBrightness();
```## Coming soon
- [Brightness control](https://github.com/pimterry/rpi-backlight/issues/3)
- [Power status querying](https://github.com/pimterry/rpi-backlight/issues/1)
- [Idiot-proofing](https://github.com/pimterry/rpi-backlight/issues/2)
- ...[your feature here](https://github.com/pimterry/rpi-backlight/issues/new)?