top of page

Colour Plot

This program uses a variable resistor on Port pin A1 to control the color of the USER LEDs and plot the values as well.

Program


---

Color Plot Program

Uses a variable resistor on Port pin A1 to control the

color of the USER LEDs and plot the values as well.

---


prog_vars =

d/color 0

d/xpos = 0

prog_vars.


prog_start =

pclear

ptl 50 10 ^ts=24^ "Color Program Start"


-- Setup the analog input

gvr a1 200 500

pb 50 50 ^n=Quit^p=exitprog^

prog_start.


prog_loop =

-- main program loop

print "Xpos /xpos"

inc /xpos 2

any /xpos >= 600 -> pclear|/xpos 0


-- Plot the Point

pp /xpos /a3 ^lw=2^fc=/color ^lw= /color ^


-- Set the User led colors

mapi 200 500 0 15 /a3 -> /color

l1 /color

l2 /color

l3 /color


prog_loop.

prog_stop =

ptl 200 200 ^tc=red^ts=24^ "Bye"

prog_stop.



bottom of page