Skip to content

Instantly share code, notes, and snippets.

@jongan69
Last active January 30, 2023 05:57
Show Gist options
  • Save jongan69/9ff1c8cba29872b34875871732768484 to your computer and use it in GitHub Desktop.
Save jongan69/9ff1c8cba29872b34875871732768484 to your computer and use it in GitHub Desktop.
GPIO Node interfacing

Blink LED

This code is used to blink an LED connected to a GPIO pin.

Requirements

This code requires the onoff package to be installed.

Setup

The LED is connected to GPIO pin 4, and is set to output mode.

Usage

The blinkLED function is called every 250ms, which turns the LED on and off. The LED blinking can be stopped by calling the endBlink function. This will stop the blinking and turn the LED off.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment