Skip to content

Instantly share code, notes, and snippets.

@ChrisHinde
ChrisHinde / rgb_pwm.lua
Last active August 27, 2016 16:23
Functions to setup and control RGB LEDs/strips with Lua on NodeMCU
--[[ rgb_pwm.lua
Created by Christopher Hindefjord (ChrisHinde / chris@hindefjord.se)
CC-0 > No copyright claimed - You are free to use these snippets however, wherever, you like
These are support functions (and settings( set the PWM (Pulse Width Modulation) output to "control" standard RGB LEDs or Strips
This will not work if you have NeoPixel style LEDs (like WS2812), they requrie a different setup!
]]--
-- Configuration for the PWM/RGB output
-- If your RGB LED/strip is common anode (There's one positive lead and three negative [cathodes], which is common)

Keybase proof

I hereby claim:

  • I am ChrisHinde on github.
  • I am chrish (https://keybase.io/chrish) on keybase.
  • I have a public key whose fingerprint is 182B 518B 6422 C007 73C2 2394 4839 AB02 DF42 AD84

To claim this, I am signing this object: