Some text some message..

This is a test page. The goal is to see how the different format of code can be shown

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.

CODE: DTMF.BAS
CODE: DTMF.BAS
				
					' Zim's Gasoline Injector Flow Tester/Cleaner
onhtmlchange refresh_vars
onHtmlReload menu
goto menu

menu:
cls
PIN.MODE 4, output
PWM(4) = 0
durt$ = "?"
hrts$ = "?"
mms$ = "?"
hrts2 = 0
dur = 0
bar = 0
pw = 0
i = 0
Ct1 = 10

startb$ = "background-color:lightblue;text-align:center;width:55px;height:40px;font-size:14;font-weight:bold"
butt$ = "background-color:lightblue;text-align:center;width:120px;height:65px;font-size:14;font-weight:bold"
dropd$ = "background-color:white;text-align:center;height:40px;font-size:20;font-weight:bold"
tbox$ = "background-color:lightblue;text-align:center;width:60px;height:40px;font-weight:bold"
abortb$ = "text-align:center;width:310px;height:50px;font-size:20;font-weight:bold"
barb$ = "width:310px;height:20px"

A$ = ""
A$ = A$ + |<!DOCTYPE html><html><body><style>|
A$ = A$ + |body {background-color: black;}|
A$ = A$ + |</style><center>|
A$ = A$ + |<p><font color = 'white', font size = '6'>Gasoline Injector Tester</font></p>|
A$ = A$ + |</center>|
A$ = A$ + |<table align='center' width='310' height='100' bgcolor='lightgreen' border='1' cellpadding='8'>|
A$ = A$ + |<center><th>|
A$ = A$ + BUTTON$("Automatic<br>Clean Cycle<br>250 seconds", clean, "but11")
A$ = A$ + cssid$("but11" , butt$)
A$ = A$ + |</center></th><center><th>|
A$ = A$ + BUTTON$("Automatic<br>Flow Test<br>10 seconds", flow, "but12")
A$ = A$ + cssid$("but12" , butt$)
A$ = A$ + |</center></th></center></table><center>|
A$ = A$ + meter$(bar, 0, 100, "bar1")
A$ = A$ + cssid$("bar1" , barb$)
A$ = A$ + |</center><center>|
A$ = A$ + |<table align='center' width='310' height='100' bgcolor='lightgreen' border='1' cellpadding='4'>|
A$ = A$ + |<tr><th>Manual<br>Mode</th><th>Frequency<br>Hertz</th><th>Pulse<br>mSec</th><th>Timer<br>Seconds</th></tr><td>|
A$ = A$ + BUTTON$("Start", manual, "but13")
A$ = A$ + cssid$("but13" , startb$)
A$ = A$ + |</td><td>|
A$ = A$ + listbox$(hrts$,"10, 20, 30", "lbox5")
A$ = A$ + cssid$("lbox5" , dropd$)
A$ = A$ + |</td><td>|
A$ = A$ + listbox$(mms$,"5, 10, 20, 30", "lbox6")
A$ = A$ + cssid$("lbox6" , dropd$)
A$ = A$ + |</td><td>|
A$ = A$ + listbox$(durt$,"5, 10, 60, On", "lbox7")
A$ = A$ + cssid$("lbox7" , dropd$)
A$ = A$ + |</td></table></center><center>|
A$ = A$ + BUTTON$("Stop Timer", abort, "but14")
A$ = A$ + cssid$("but14" , "background-color:red;" & abortb$)
A$ = A$ + |<br>|
A$ = A$ + BUTTON$("Exit", EXITs, "but15")
A$ = A$ + cssid$("but15" , "background-color:lightblue;" & abortb$)
A$ = A$ + |</center>|
A$ = replace$(A$, "Choose here", "?")  ' change all the "Choose here" instances with '"?"
HTML A$
refresh
wait

Flow:  'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
pause 1000
if bar > 10 then goto abort
i = 0
j = 1
Ct1 = 10
refresh

do
bar = Ct1
Ct1 = j*10
refresh
bar = Ct1
PWM(4) = 256  '25% duty cycle
OPTION.PWMFREQ 10
pause 1000
i = i + 1    ' for the loop
j = j + 1    ' for the bar
LOOP UNTIL i > 9
PWM(4) = 0
bar = 0
refresh
return


manual:  'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
i=0 ' for the loop
j=0 ' for the bar
dur = val(durt$)
if durt$ = "On" then dur = 10000
if dur * val(mms$) * val(hrts$)=0 then goto abort  'aborts if no entrys
Ct1 = 10
if durt$ = "On" then let Ct1 = 50
do
if val(hrts$)=10 then pw = val(mms$) * 1024 / 100  'calculates pw to milliseconds
if val(hrts$)=20 then pw = val(mms$) * 1024 / 50
if val(hrts$)=30 then pw = val(mms$) * 1024 / 33.3
refresh 
  if dur = 5 then let Ct1 = j*20
  if dur = 10 then let Ct1 = j*10
  if dur = 60 then let Ct1 = j*1.6
  if dur = 10000 then let Ct1 = 50
  bar = Ct1
  PWM(4) = pw
  OPTION.PWMFREQ val(hrts$)
  pause 1000
i = i + 1
j = j + 1    ' for the bar
refresh
LOOP UNTIL i > dur
PWM(4) = 0
dur = 0
bar = 0
refresh
return


Clean:  'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
f=10
i=0
j=10
bar = j
PWM(4) = 0
do
refresh
bar = j
PWM(4) = 512
OPTION.PWMFREQ f
pause 1000
f = f + 0.08    ' for the frequency
i = i + 1       ' for the loop
j = j + 0.36    ' for the bar
bar = j
refresh
LOOP UNTIL i > 249
PWM(4) = 0
bar = 0
refresh
return


refresh_vars: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
refresh
return


abort: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
i=300    'stops the do loop
refresh
PWM(4) = 0
hrts2 = 0
dur = 0
bar = 0
HZ = 0
refresh
return


abort2: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
i=300    'stops the do loop
refresh
PWM(4) = 0
hrts2 = 0
dur = 0
bar = 0
HZ = 0
Stat$ = "OFF"
refresh
return


EXITs:  'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
PWM(4) = 0
refresh
cls