Science fair display code and cct by a74QIjce

VIEWS: 0 PAGES: 2

									;*********************************************************************************************************
; SCIENCE FAIR DISPLAY CONTROLLER MAIN PROGRAM CODE v7 - Oct 2012
;*********************************************************************************************************

start:     readadc lightin1,wb4           ; read Light Dependent Resistor to set limits
                     if wb4 < 5 then goto start      ;if dark loop until day
again:     pause 400
                     let wb2 = wb4+1                 ; set theshholds above and below last readings
                     let wb3 = wb4-1
                     readadc lightin1, wb4
                     if wb4>wb2 or wb4<wb3 then goto cycle ; has the light level now changed?
                                ;sertxd (#WB1,32,#WB2,13,10) : Diagnostic to check light sensor
                     goto again

cycle:     sound sounder,(50,50)
                    inc ww1                              ;keep a count of cycles since powerup
                    high lights
                    pause 20000
                    low lights                ; turn booth lights off

start01:   sertxd ("1.The sun heats the earth - RADIATION",RET,LFEED)
                      high Sun
                      pause 30000
                      sertxd (" Evaporating sea water which cools its surface", RET,LFEED)
                      High LED1            ;yellow from sea to atmosphere
                      pause 30000
                      low LED1
                      sertxd (" The forest sucks this vapour back - BIOTIC PUMP",RET,LFEED)
                      sertxd (" replacing river water loss - OUTFLOW",RET,LFEED,RET,LFEED)
                      High Fan
                      pause 30000
           sertxd ("2.Vapour radiates its heat out to space",RET,LFEED)
                      sertxd (" condensing to form clouds",RET,LFEED,RET,LFEED)
                      High LED2            ; red - from clouds to space
                      pause 60000
                      low LED2
                      low fan
           sertxd ("3.Tree leaves give off fine particles - AEROSOLS",RET,LFEED)
                      sertxd (" that form attractive water precipitation nuclei",RET,LFEED)
                      sertxd (" Ionisation by lightning might do that too",RET,LFEED,RET,LFEED)
                      pulsout aerosol,1000
                      pause 60000
           sertxd ("4.Droplets of rain form - PRECIPITATION",RET,LFEED)
                      sertxd (" some evaporate as they fall - RAINDROP EVAP",RET,LFEED)
                      sertxd (" some land on trees and re evaporate - DIVERSION",RET,LFEED)
                      sertxd (" some run down branches - TRUNK FLOW",RET,LFEED)

                      sertxd (" some leave catchment via streams - OUTFLOW",RET,LFEED)
                      sertxd (" the rest helps forest growth",RET,LFEED,RET,LFEED)
                      high LED3            ; Green - rain and river
                      pause 60000
                      low LED3
           sertxd ("5.Underground fungi networks pipe nutrients to trees",RET,LFEED)
                      sertxd (" Leaves capture sun energy - PHOTOSYNTHESIS",RET,LFEED)
                      sertxd (" taking in CO2 and giving out Oxygen and Water",RET,LFEED,RET,LFEED)
           sertxd ("6.Water evaporates, cooling the tree - TRANSPIRATION",RET,LFEED,RET,LFEED)
                      high LED4            ; Yellow - Forest transpiration
                      pause 60000
                      low LED4
           sertxd ("7.Human polution creates greenhouse effect",RET,LFEED)
                      sertxd (" blocking IR radiation to space",RET,LFEED,RET,LFEED)
                      pause 30000
                      sertxd (" Rains wash air clean",RET,LFEED)
                      sertxd (" Toxic fallout digested by fungi",RET,LFEED,RET,LFEED)

                      high LED5        ;blue - greenhouse gasses ;
                      pause 60000
                      low LED5
           sertxd ("8.Does UV come from Sun or South? - AURORA / OZONE HOLE",RET,LFEED,RET,LFEED)
                      high LED6        ;violet - UV Radiation
                      pause 60000
                      low LED6
                      low sun

           sertxd ("KIA ORA - OUR KURA RESEARCH PROGRAM ",#ww1,RET,LFEED)
                      sertxd ("www.whirinakirainforest.info/ecosystem_services_value",RET,LFEED,RET,LFEED)
                      high lights                   ;turn booth lights on again
                      for wb1 = 1 to 2
                      pause 60000
                      next wb1
                       low lights
                      Pause 4000                    ;approx 1 sec delay for lights off
                      goto start

								
To top