https://github.com/capevace/433mhz
A Node module for sending data on a 433MHz transmitter via GPIO
https://github.com/capevace/433mhz
433mhz javascript nodejs raspberry-pi
Last synced: about 1 month ago
JSON representation
A Node module for sending data on a 433MHz transmitter via GPIO
- Host: GitHub
- URL: https://github.com/capevace/433mhz
- Owner: Capevace
- Created: 2016-12-25T22:47:41.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2021-11-30T18:44:17.000Z (about 4 years ago)
- Last Synced: 2025-03-17T23:41:48.682Z (11 months ago)
- Topics: 433mhz, javascript, nodejs, raspberry-pi
- Language: Python
- Homepage: https://npmjs.com/package/433mhz
- Size: 7.81 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 433MHz
> A Node package to transmit data on a Raspberry Pi using a 433MHz sender.
Note: I made this for my cheap remote outlets, I don't know if this is actually useful with other devices lol.
**Be aware of command injection: the binary code you pass to `transmitCode` is passed directly into `exec` (no sanitization)!**
## Installation
```sh
npm install 433MHz
```
## Usage
```js
const { transmitCode } = require('433MHz');
// Input the code that you want to be transmitted
transmitCode('1111111111111111111010111');
// You have multiple options to customize the transmission
transmitCode('1111111111111111111010111', {
transmitPin: 18,
shortDelay: 0.001,
longDelay: 0.005,
packetDelay: 0.05,
});
```
### Options
#### transmitPin
This is the pin, the data pin of the transmitter is connected to on the GPIO.
**Default:** 18
#### shortDelay
The short delay between pin output state changes.
**Default:** 0.00037
#### longDelay
The longer delay between pin output state changes.
**Default:** 0.00101
#### packetDelay
The delay between attempts (packets) of code data transmitted.
**Default:** 0.01102
## Changelog
### Version 2.0.0
- `transmitCode` now returns a Promise and the callback option has been removed
- `transmitCode` is no longer the exported default, use `const { transmitCode } = require('...` instead
### Version 1.1.0
- Legacy version
**Made by Lukas von Mateffy** (@Capevace)