top of page

Moving Circle

Use the TOP to connect the POT1 to pin A1 and POT2 to pin A2.
The LEFT POT will control the balls position on the X-axis and the RIGHT POT will control the balls position on the Y-axis.

Program


---

Moving Circle Program

Use the TOP to connect the POT1 to pin A1 and POT2 to pin A2.

The LEFT POT will control the balls position on the Xaxis

and the RIGHT POT will control the balls position on the Yaxis.

---


prog_vars =

d/count 0

d/display_width 874

d/display_height 630

prog_vars.


prog_start =

pclear

print "Moving Circle Program"

gvr a1 0 /display_width -- Y-axis up and Down

gvr a2 0 /display_height -- Xaxis left and right

prog_start.


prog_loop =

-- main program loop

-- Display the X and Y values

ptl 10 10 "X /a1 Y /a2"

-- Display the orange ball on the Show page at the position

-- set by the values of A1 and A2.

pcr /a1 /a2 50 ^id=cat^fc=orange^

prog_loop.

prog_stop =

print "Bye"

prog_stop.



bottom of page