Timed Lucidity Application

This is very similar to the thread about ‘cheapest dream goggles ever!’ except it uses your monitor instead of you having to wire up leds to the computer.
I wrote this program to replace a few scripts i had running on my computer.

This program is very simple:

Put in the length of time you want it to sleep for (seconds) [monitor off]
hint: 3600 secs = 1hour

Put in the length of time you want it to flash for (seconds)[monitor on]

Put in the duration of flashes (milliseconds) [Blink Speed]
(500ms = two times a second, 250ms = 4 times a second)

It will send a command to ‘Nircmd.exe’ which is a tool released by nirsoft.net/ (kudos dude. all respect and rights to him, i just wrote a script to run it)

The command will turn your computer off and put it in a sleep state. When the timer runs out, the monitor will turn back on, and the monitor will flash black, then red, then black, etc at the rate you determined in the ‘blink speed’.

Then it will go back to sleep and the process will start over. This is useful for people who have a computer in thier bedroom, or a laptop.

Using the timers and your own knowledge of your sleeping patterns, this is the closest i can do bar REM detection. (i may implement this in a while).

If Nerd = True then
Also, if anyone here doesnt have a computer in thier room, and is good with electronics, simply wire a power supply across some LED’s and whack a transistor in the way. If someone does that just PM me and i’ll write up a couple more lines in the program so that it chucks a data pin state high (thus flipping the transistor and turning your light on). Thus, you can extend the blinking range to however long a piece of wire you have. (anyone wanna suggest total length of wire before sinking current right off the lpt port will not work?)
End If

Have fun with the app, i’ve used it probably for 6 months or so (well, the earlier set of scripts).
If theres any serious bugs drop me a line.

Disclaimer blah blah use common sense stuff:
Do NOT enter stupid values, or text, just numbers into the three windows. Remember to enter numbers into all three boxes. Don’t enter rediculously small numbers for monitor on/off time so your monitor clicks and spazzes every 2 seconds. Don’t put a really low value for blink time unless you like epilepsy. If you be silly it will probably crash out with VB errors. Since the program is so simple i haven’t done error checking. If it crashes out (and it’s not a true bug) then you’re just being silly.
I have virus scanned it with latest free AVG but i hold no responsibility if you get one, or if this program blows your computer up, rapes your cat or sleeps with the toaster.

Download Lucidity Thingy

Good idea :happy: ! You could also do this same thing, exept with audio that says “you are dreaming” . It seems to be very effective.

I will implement a choice to play a wave file upon flashing segment in the next couple of days maybe even today after i sleep, and put it up here again.

Lol okay, so i woke up and deleted my source code. don’t ask me why, i’m insane. did an undelete and it’s not there. looks like i have to start again, im going to wait a little bit until some equipment arrives, then i’ll work on making some proper programmable glasses. (maybe even rem detection)

This program is made in Visual Basic right?
I was actually wondering what functions and/or Form properties you used to make the screen flash.

form2 on load:

its just linked to the flashing timer control, and thus executes the code at the interval (set by the textbox)

[code]private sub timer_flashscreen
if form2.backcolor = vbBlack then
form2.backcolor = vbred
goto finished
end if

if form2.backcolor = vbRed then
form2.backcolor =vbBlack
end if

end sub[/code]

or something like that.

Yeah I had something like that but it didn’t like to flash that well, but I got it now. Thanks.