Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- manual cable switch by elektrobom1---
- local cable = "back"
- local cables = {
- colors.white,
- colors.orange,
- colors.yellow
- }
- -----------------------------------------
- local b = require("button")
- local ffs = {}
- for i = 1, #cables do
- ffs[i] = false
- end
- local function ff(num)
- ffs[num] = not ffs[num]
- end
- while true do
- local rec = tonumber(read())
- if type(rec) == "number" and rec <= #cables then
- ff(rec)
- b.bundle(side, cables[rec], ffs[rec])
- end
- end
Add Comment
Please, Sign In to add comment