UNPKG

pigpio

Version:

Fast GPIO, PWM, servo control, state change notification, and interrupt handling on the Raspberry Pi

12 lines (7 loc) 185 B
'use strict'; const Gpio = require('../').Gpio; const led = new Gpio(18, {mode: Gpio.OUTPUT}); led.hardwarePwmWrite(10, 500000); setTimeout(() => { led.digitalWrite(0); }, 2000);