'# Browser Radiomemclear time.setup(2,1) watchdog 60 f = 95.1 rx f b = 0 cssclass "body","font-family:Consolas" cssclass "select","width:120px" cssclass "button","font-family:Consolas" 'text-align: center; width:640px;color: navy;font-weight: bold;font-style: italic;font-size: 16px; tft.cls() gosub setfreq pwmfreq 32000 pwmout 38,50 'BACKLIGHT 50 name = "Station" txt = "RDS Radio Text" volume 40 VOL= 40 textbox zeit cssID htmlID(),"border:none;width:60px" textbox name cssID htmlID(),"border:none;width:80px;text-align:center;font-weight:bold;" textbox txt cssid htmlid(),"width: 400px;border:none;color:navy;font-style: italic;font-weight: bold;" html "
" textbox f 'onchange setfreq cssID htmlID(),"width:96px;font-weight:bold;text-align:center;" Button "Set f",jump html | - | Button "-",bfoDN textbox b 'onchange setfreq cssID htmlID(),"width:66px;font-weight:bold;text-align:center;" Button "+",bfoUP Button "Set Bfo",setbfo html " - " button "LSB",dolsb button "-AM-",dossb button "USB",dousb html "
" button "-",minus button "SCAN up",scan button "+",plus slider VOL,0,62 'onchange setvol button "Set Volume",setvol html "
" gosub logo meter rssi,0,75,10,20,32 html " RSSI
" meter snr,0,75,10,20,32 html " SNR
" meter audio,0,1000 html " Audio
" meter wifi,0,100,20,70,100 html " WiFi
" meter accu,26,42,29,37,42 html " Battery
" radio ST radio TP radio TA html "
" fmlist = "88.8 WDR5,95.1 WDR3,96.5 DLF K,99.2 WDR2,101.3 WDR4,102.8 DLF,103.3 Cosmo,104.2 Antenne" fmitem = "95.1 WDR3" dropdown fmitem,fmlist button " Set FM Station",fmset html |
| amlist = "5955 Veronica,6085 MiAmigo,9670 Channel292,13635 Ankara,15340,17650" amitem = "13635 Ankara" dropdown amitem,amlist button " Set AM Station",amset html |
| ssblist = "4955u Time,5505u Volmet,7200LSB Ham,4582u RTTY,7645u RTTY,11038u RTTY,9555USB Time,10081u HFDL,14075-usb FT8,14230u SSTV" ssbitem = "14075-usb FT8" dropdown ssbitem,ssblist button " Set SSB Station",ssbset '0x1100 html |
| 'fmbwlist = "0 = Auto,1 = 110 kHz,2 = 84 kHz,3 = 60 kHz,4 = 40 kHz" 'fmbwitem = "0 = Auto" 'dropdown fmbwitem,fmbwlist 'button " Set BW FM",fmbwset 'html |
| ambwlist = "0 = 6 kHz,1 = 4 kHz,2 = 3 kHz,3 = 2 kHz,4 = 1 kHz,5 = 1.8 kHz,6 = 2.5 kHz" ambwitem = "2 = 3 kHz" dropdown ambwitem,ambwlist button " Set BW AM",ambwset html |
| liste ="0 = 1.2 kHz,1 = 2.2 kHz,2 = 3.0 kHz,3 = 4.0 kHz,4 = 0.5 kHz,5 = 1.0 kHz" item = "0 = 1.2 kHz" dropdown item,liste,6 Button " Set BW SSB",[listset] html |
| ' setup html elemet page 3000 ms timer 3000,tim WAIT fmbwset: bw = 0x1102 value = val(word(fmbwitem,1)) rx.set(bw,value) wait ambwset: poke val("0x3102"),val(word(ambwitem,1)) wait [listset] poke val("0x0101"),(val("0x9010")+val(word(item,1))) 'bit 0:3 wait fmset: f = val(word(fmitem,1)) goto jump amset: f = val(word(amitem,1)) am goto jump ssbset: s = upper(word(ssbitem,1)) f = val(s) gosub setfreq if instr(s,"U")>0 then usb if instr(s,"L")>0 then lsb wait dossb: pinout 10,0 am pinout 10,1 wait dousb: If rx.AM()<>0 then usb wait dolsb: If rx.AM()<>0 then lsb wait bfoDN: b = b-10 bfo b wait bfoUP: b = b+10 bfo b wait setbfo: bfo b wait setvol: volume VOL wait jump: gosub setfreq wait tim: watchdog if rx.fm()>0 then n = rx.station() if n<>"" then name = trim(n) n = rx.text() if n<>"" then txt = trim(n) endif zeit = time("time") rssi = rx.rssi() snr=rx.snr() wifi = map(wifi.rssi(), -90, -30, 0, 100) audio = io(adc,11) accu = io(adc,4)/1023*66 'gosub wifistatus ST = rx.stereo() TP = rx.tp() TA = TP and rx.ta() ' running interval timer 500,tim wait '#define AMP_EN 10 setfreq: watchdog if (rx.am()==1 and f<109) or (rx.fm()==1 and f>109) then pinout 10,0 endif freq f 'delay 200 pinout 10,1 gosub drawfreq name="" txt="" return [drawfreq] sf = format("%5.0f ",rx.freq()) if f<109 then sf = format("%5.1f ",rx.freq()) 'sf = left(sf,5) tft.text.datum(4) tft.text.color(65535,0) tft.text.draw(sf,160,60,7) return scan: 'timercb 0 if f>109 then start = f+5 else start = f + 0.1 if f>109 then stp = 5 else stp = 0.1 for f = start to 30000 step stp if f>108 and f<150 then f = 150.000 stp = 5 endif gosub setfreq snr = rx.snr() rssi = rx.rssi() if snr>0 then 'timercb 200,[timcb] gosub setfreq 'gosub findstation wait endif next f wait plus: if f>109 then f = f+1 else f = f + 0.1 gosub setfreq 'gosub findstation 'timercb 200,[timcb] wait minus: if f>109 then f = f-1 else f = f - 0.1 gosub setfreq 'gosub findstation 'timercb 200,[timcb] wait wifistatus: 'REBOOT ON DISCONNECT if status()<>3 then reboot tft.text.cursor(4,4) tft.print(str(status())) return logo: html |
| html || html || return