Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thrsouza/cheesecake
Cheesecake is the best option for Raspberry Pi with Nodejs!
https://github.com/thrsouza/cheesecake
cheesecake gpio io iot pi raspberry raspi rpi
Last synced: 2 months ago
JSON representation
Cheesecake is the best option for Raspberry Pi with Nodejs!
- Host: GitHub
- URL: https://github.com/thrsouza/cheesecake
- Owner: thrsouza
- License: mit
- Created: 2020-07-14T04:53:24.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-01-07T20:05:15.000Z (about 2 years ago)
- Last Synced: 2024-10-31T19:45:16.606Z (3 months ago)
- Topics: cheesecake, gpio, io, iot, pi, raspberry, raspi, rpi
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/cheesecakejs
- Size: 646 KB
- Stars: 10
- Watchers: 1
- Forks: 0
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
Cheesecake is the best option for Raspberry Pi with Nodejs!## 📖 Overview
This package was created to help Nodejs developers create projects to work with the Raspberry PI GPIO pins in a simple way. Why did I choose this name? Because I ❤️ cheesecake and that's enough! :D
## 🚀 Installation
Just add cheesecake to your Nodejs project for Raspberry Pi:
```sh
$ npm i cheesecakejs --save
```## 👨🏽💻 Example
```js
const { Gpio, GpioValue, GpioDirection } = require('cheesecakejs');const gpio4 = new Gpio(4, GpioDirection.OUT);
gpio4.onValueChanged((data) => {
const dateTime = new Date().toJSON();
console.log(`${dateTime} - Gpio${gpio4.gpio}: new value => ${data}`);
});setInterval(() => {
const value = gpio4.getValue();
gpio4.setValue(Boolean(value) ? GpioValue.LOW : GpioValue.HIGH);
}, 1000);process.on('SIGINT', () => {
console.log('Please, await...');
gpio4.dispose();
process.exit();
});
```## 📕 GPIO Pins Diagram
A powerful feature of the Raspberry Pi is the row of GPIO pins along the top edge of the board.
REFERENCE: https://www.raspberrypi.org/documentation/usage/gpio/## 📃 Contributing
Thanks for your interest on our project. Take a moment to read our guidelines:
- [Contributing](./.github/CONTRIBUTING.md)
- [Code of Conduct](./.github/CODE_OF_CONDUCT.md)## 📮 Contact
We have a few channels for contact:
- Email: [[email protected]](mailto:[email protected])
- [GitHub Issues](https://github.com/thiagodesouza/cheesecake/issues)## 📃 License
MIT © [Cheesecake](https://github.com/thiagodesouza/cheesecake/)