'
' UVTron Example for OOPic
'
dim uvOut as new oDio1 ' flame indicator
dim uvIn as new oDio1 ' UVTron input
dim uvPEvent as new oEvent ' UV pulse event
dim uvTEvent as new oEvent ' 1-second timer event
dim uvGate1 as new oGate ' UV event buffer
dim uvGate2 as new oGate ' Timer event buffer
dim uvCt as new oByte ' user pulse ct
dim uvCtx as new oByte ' temporary pulse ct
sub main()
call inituv
uvOut.ioline=17
uvOut.direction=cvOutput
do
if (uvCt >= 4) then
uvOut=1
else
uvOut=0
end if
loop
end sub
'------------------------------------------------------
' Event-Driven UVTron Monitoring routines
' uvCt is number of UVTron pulses per second
' (4 is a good flame threshold for stock UVTron)
'
sub inituv()
uvIn.ioline=8
uvIn.direction=cvInput
uvGate1.input1.link(uvIn)
uvGate1.output.link(uvPEvent.operate)
uvGate1.operate=cvtrue
uvGate2.input1.link(oopic.hz1)
uvGate2.output.link(uvTEvent.operate)
uvGate2.operate=cvtrue
uvCtx=0
uvCt=0
end sub
sub uvPEvent_code()
uvCtx=uvCtx+1
end sub
sub uvTEvent_code()
uvCt=uvCtx
uvCtx=0
end sub
Menu atas
- Beranda
- Galeri
- Tentang saya
- Jam Digital dengan DS1307 dan Animasi 60 buah LED dengan ATMega32
- Program running text dengan 7 segment menggunakan BASCOM-AVR
- Membuat Jam Digital Menggunakan Bahasa C++
- Jam digital dengan P16F84A MCU
- Jam Digital dengan Mikrokontroler ATmega
- Digital Clock using pic18f8680, counters, external clocks
- Robot Pemadam Api (KRCI) dengan KRCI.BS2
- Robot Pemadam Api (KRCI) dengan UVTRON.OSC
- Robot line follower Dengan Fuzzy Logic
- Robot Line follower dengan Assembler
- Robot line follower menggunakan Bascom AVR
- Robot Line Follower menggunakan CodeVisionAVR
- Robot Line Follower Dengan Fuzzy Logic
Tidak ada komentar:
Posting Komentar