Launch Week Day 1: Socket for Jira Is Now Available.Learn More
Socket
Book a DemoSign in
Socket

@iiot2k/gpio

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

@iiot2k/gpio

Raspberry Pi gpio library

unpublished
latest
npmnpm
Version
2.0.4
Version published
Maintainers
1
Created
Source

@iiot2k/gpio

Raspberry Pi GPIO library.

Installation

npm install @iiot2k/gpio

Detail

  • This library works on Raspberry Pi with 32bit or 64bit OS.
  • Works also on Raspberry Pi 5.

Functions

  • Read/Write/Toggle GPIO.
  • Watch GPIO.
  • PWM Output.
  • High Speed Counter.
  • Reads Temperature from Sensors (DS18B20).

API

All API functions are explained in dokument API.md and API.pdf

Example

// example turns output pin 20 on and after 3000ms off

"use strict";

const gpio = require("@iiot2k/gpio");

gpio.init_gpio(20, gpio.GPIO_MODE_OUTPUT, 1);

setTimeout(() => {
    gpio.set_gpio(20, 0);
    gpio.deinit_gpio(20);
}, 3000);

Examples are on examples folder.

Keywords

iot

FAQs

Package last updated on 08 Apr 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts