Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Microcontroller and PC projects : Permission from Geoff?
Author | Message | ||||
Grogster Admin Group Joined: 31/12/2012 Location: New ZealandPosts: 9308 |
Hi all. In my on-going security system, which is menu-driven using the MM, I have elected to make use of a screensaver when no-one touches any keys for a predetirmined amount of time. To save me having to think much about it, I have used Geoff's COLOUR-1.BAS, with some modifications: [code] ScreenSaver: '99% written by Geoff Graham. settick 0,SST,3:settick 0,DAT,1:SS=0 Mode 3 Cls:Font 2 print @(50,200) +clr$(White) "SCREENSAVER - Press any key..." cx = MM.HRes/2 : cy = MM.VRes/2 Do SS=SS+1 x = Rnd * MM.HRes y = Rnd * MM.VRes Do c = Int(Rnd * 6) + 1 Loop Until Pixel(x, y) <> c d = Sqr(Abs(x-cx)^2 + Abs(y-cy)^2) r = Rnd * d/8 + 2 + d/14 Circle (x,y), r, c, f If r > Rnd*8 + 13 Then Circle (x,y), r+1, 0 If Inkey$ <> "" Then EXIT if SS=250 then goto ScreenSaver if len(net$)<>0 then goto NetAct pause 100 Loop Mode 4:settick 250,DAT,1:settick 1000,SST,3:goto start [/code] This is the modified routine, but most of it is Geoff's code. I have slowed it down a little, added a text message in the middle of the screen, and made it clear the screen and start again after X number of circles - currently 250. It also has the net$ if/then added, so that if some message comes in during the SS running, it will know to loop to the routine that processes the messages(NetAct). net$ is controlled by an interrupt, so zero length means no new message, >1 means there is a message to process. What I would like, is Geoff to give me permission to use his routine in my system. I realise that I could not have asked at all and just stolen the code, but out of respect for Geoff and what the MM is, I wanted to ask here in public. Comments? Smoke makes things work. When the smoke gets out, it stops! |
||||
greybeard Senior Member Joined: 04/01/2010 Location: AustraliaPosts: 161 |
A Zen comment If you wanted to ask Geoff something would it be more effective to ask Geoff or to ask everyone? |
||||
Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3194 |
Go for it Graeme. I don't mind at all. Geoff Geoff Graham - http://geoffg.net |
||||
Print this page |