Skip to content

HineshMandalia/GPIO-C.H.I.P

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 

Repository files navigation

GPIO-C.H.I.P

How to use

var GPIO = require('gpio-c.h.i.p');

GPIO.exportAll();

GPIO.unexportAll();

Object new GPIO.Gpio(gpio_port, direction)

var led = new Gpio(4, GPIO.OUT);
led.off(); // Value = 0;
led.on(); // Value = 1;
if(led.read() == 0){
	led.on();
}

var btn = new Gpio(4, GPIO.IN);
btn.rising((value) => {
	console.log("RISING...");
});

btn.falling((value) => {
	console.log("FALLING...");
});
btn.both((type, value) => {
	console.log(type,"...");
});

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%