2.0.0-0 • Published 7 years ago

minnow-gpio v2.0.0-0

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

minnow-gpio

A GPIO helper library for the minnowboard max

Build Status npm version

Overview

Note: Probably need to run as root as it needs access to sysfs (/sys/class/gpio)

  var minnow = require('minnow-gpio');
  
  // Setup the GPIO pins before using them
  // Only needs to be called once
  minnow.setup(minnow.pin.GPIO_1, minnow.direction.OUT);

  // Make the pin output HIGH
  minnow.set(minnow.pin.GPIO_1, minnow.value.HIGH);
  // or 
  minnow.set(minnow.pin.GPIO_1, 1);
  // or 
  minnow.set(minnow.pin.GPIO_1, true);