Advertisement
hilburn

MFR output

Jul 17th, 2014
267
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.56 KB | None | 0 0
  1. local mfr_side = "back"
  2. local colours = {white=0, orange=1, magenta=2, lightblue=3, yellow=4, lime=5, pink=6, grey=7, lightgrey=8, cyan=9, purple=10, blue=11, brown=12, green=13, red=14, black=15}
  3. local mfr_null = "black"
  4.  
  5. function mfrOutput(colour_val)
  6.     rs.setAnalogOutput(mfr_side,colours[colour_val])
  7. end
  8.  
  9. function mfrToggleOutput(colour_val)
  10.     rs.setAnalogOutput(mfr_side,colours[colour_val])
  11.     sleep(0.05) --#this is required due to how the controller works, it ensures it covers a PRC clock cycle
  12.     rs.setAnalogOutput(mfr_side,colours[mfr_togglenull])
  13. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement