TrafficLights

TrafficLights

new TrafficLights(red, amber, green, _optionsopt)

Source:
Represents a traffic light device containing red, amber, and green LEDs.
Parameters:
Name Type Attributes Description
red number The GPIO pin that the red LED is attached to.
amber number The GPIO pin that the amber LED is attached to.
green number The GPIO pin that the green LED is attached to.
_options Object <optional>
Options for device: * pwm: default: false. If true, creates PWMLED instances, else LED. * initial_value: default: false. If false, all LEDs will be off initially, if true the device will be switched on initialled.

Extends

  • LEDBoards