This program uses a gauge to display the value
of a voltage being applied to pin A1. We scale the input voltage to be between 0 and 100.
Connect the TOP so that POT1 is across 3V and ground and the center pin goes to pin A1 on the JackBord.
Turning the pot will change the gauge reading.
Program
---
Simple Gauge Program
This program uses a gauge to display the value
of a voltage being applied to pin A1.
---
prog_vars =
d/count 0
prog_vars.
prog_start =
pclear
print "Program Start"
-- show the title
ptl 10 10 ^ts=26^ "Simple Gauge Program"
-- Add a quit button
pb 500 10 ^n=Quit^p=exitprog^
-- Setup port pin A1 to be an anaog input and scale between 0 to 100.
gvr a1 0 100
prog_start.
prog_loop =
-- main program loop
-- show the gauge
pg 50 100 /a1 ^min=0^max=100^n=Value^
inc /count
prog_loop.
prog_stop =
print "Bye"
ptl 350 50 ^ts=34^ "Bye"
prog_stop.