Skip to content

Instantly share code, notes, and snippets.

@smching
Created February 28, 2016 10:38
Show Gist options
  • Save smching/77a266b1a0f79d217f02 to your computer and use it in GitHub Desktop.
Save smching/77a266b1a0f79d217f02 to your computer and use it in GitHub Desktop.
Lua_ShiftOut: A 74HC595 Shift Register Library for Lua
#!/usr/bin/lua
require "gpio" --import gpio library
require "shiftOut" --import shiftOut library
str= os.getenv("QUERY_STRING") --gets the value from URL
parameter= string.sub(str,1) --from character one until the end
value=tonumber(parameter) --convert string to integer
update_ShiftRegister(value,LSBFIRST)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment