constants [[npix 64]]			; set number of pixels to 64


to runcmd
if cmd < 68 [dot cmd box1 redraw] 	; pixels 2-68 turn the color input into box1
if cmd = 68 [dot 0 box1 redraw]	; same as above but for pixel 0
if cmd = 69 [dot 1 box1 redraw]	; same as above but for pixel 1
if cmd = 70 [brightness 0]		; turn pixel off
if cmd = 71 [brightness 9]		; turn pixel max brightness
if cmd = 72 [setbox1 0]		; red
if cmd = 73 [setbox1 10]		; orange
if cmd = 74 [setbox1 20]		; yellow	
if cmd = 75 [setbox1 30]		; green
if cmd = 76 [setbox1 50]		; cyan
if cmd = 77 [setbox1 70]		; blue
if cmd = 78 [setbox1 80]		; magenta
if cmd = 79 [setbox1 90]		; pink
if cmd = 80 [setbox1 -1]		; white
if cmd = 90 [ao]			; all off
end

  
to all :n
let [addr 0]
repeat npix [dot :addr :n make "addr :addr + 1]
redraw
end

define ao [][alloff redraw]