[UPDATED 28-04-2009] TorchButton v1.5, using camera LED for flashlight

Search This thread

NLS

Senior Member
May 27, 2005
2,496
63
Piraeus
www.ilogic.gr
well the only interesting idea is Morse code (but mostly useless idea - except if you have many friends reading Morse code)

the others are just stupid features or just marketing talk of something really simple
 
Once upon a time,Vijay has an idea to use VJCandela code for sending SOS notification via LED using Morse code. Simple ...---... cyclicaly. Maybe that can be also useful feature(example:You have an accident in dark forest evening or in night,or to calling an incoming ambulance on the road in the night to find you quickly,or to stop someone on highway when needed...). Hope,this feature we will never need in praxis,but the idea is here.
 
As my opinion> the main feature is a working LED in sleep mode (with power button)! Then this future is done, Raphael finaly do the Light function.
I think SOS, morse or bicycle features is a addon? and this features may realaised by a author of a hTorch app: http://xdaforums.com/showthread.php?t=440405
Yes,you're right. These features can be the add-ons. Just for me(my device setup) is the display-off thing not very important,because I have with AEBPlus mapped the Action button long press for display-off,so one more click will do that job. But is JUST my setup. Really,I don't want to make the developers busy with additional features,when they are preparing something different. These features can release anyone skilled in C++ or C#.
 

DeepThought

Senior Member
Jul 6, 2006
781
1
Austria, Vienna
As my opinion> the main feature is a working LED in sleep mode (with power button)! Then this future is done, Raphael finaly do the Light function.
I think SOS, morse or bicycle features is a addon? and this features may realaised by a author of a hTorch app: http://xdaforums.com/showthread.php?t=440405

I could implement both of the mentioned features into hTorch, thats right. And I probably will since others requested this as well. But I personally would like to see this blinking LED feature as a build-in function into TorchButton with a customizable interval which can be set via registry key. I'm by far not such a good programmer like NetRipper is and that would make my "job" a lot easier! ;)

I also would love to see the "working LED in sleep mode" feature. But I'm afraid that's not possible. As far as I know the LED can only be controlled via some DLL which comes with the Camera software not directly. And this DLL has some hardcoded protection which disables the LED when the device goes into sleep.
So I'm afraid the only possibility would be to prevent the device from falling into standby and to just turn of the display. I'm currently working on this for the next version of hTorch.

@NetRipper, please correct me if I said something wrong! ;)
 

NetRipper

Senior Member
Feb 27, 2006
563
42
's-Gravendeel
www.netripper.nl
I could implement both of the mentioned features into hTorch, thats right. And I probably will since others requested this as well. But I personally would like to see this blinking LED feature as a build-in function into TorchButton with a customizable interval which can be set via registry key. I'm by far not such a good programmer like NetRipper is and that would make my "job" a lot easier! ;)

I also would love to see the "working LED in sleep mode" feature. But I'm afraid that's not possible. As far as I know the LED can only be controlled via some DLL which comes with the Camera software not directly. And this DLL has some hardcoded protection which disables the LED when the device goes into sleep.
So I'm afraid the only possibility would be to prevent the device from falling into standby and to just turn of the display. I'm currently working on this for the next version of hTorch.

@NetRipper, please correct me if I said something wrong! ;)
There is a way to enable the (nonbright) flashlight with low level memory access. But even then the light is turned off when entering standby. The reason is not the HTCCamera1.dll, but the HTC-specific code that is executed when entering standby. Enabling flashlight on low level has no additional value that way, which is why I'm not using it. I know this as I've used this approach to find out where it hung when I was getting Linux to work on the Raphael (display didn't work, but led could show me that it reached some part of the code).

Anyway, I will make a new release with the 'blink' feature. And I think it's not hard to put in SOS as well, so I'll do that too.

@DeepThought, you could use my C# library to easily control the light. I made it real easy that way. ;)
 

del4

Senior Member
Jan 25, 2007
462
4
Arizona
[FR] ScreenLight feature

have yall seen this before would be interesting if some of the features in this app could be added to TorchButton
http://www.artamata.com/pocketlight/

About the only feature I'd like to see implemented from this app into TorchButton would be the following:

ScreenLight - by showing a bright white full-screen display and disabling the timeout for backlight, gives a softer light than the flashlight which can be great for reading at night.

I seem to recall someone asking if, in addition to the extra-bright option, it would be possible to have a less-bright option. I can see times where this would be a nice option to have as the default brightness is quite high and simply having a white full-brightness LCD would be more than sufficient. This could even be extended by including a slider to adjust the backlight so the user could set it to be as dim/bright as desired.

Thoughts?
 

NetRipper

Senior Member
Feb 27, 2006
563
42
's-Gravendeel
www.netripper.nl
About the only feature I'd like to see implemented from this app into TorchButton would be the following:

ScreenLight - by showing a bright white full-screen display and disabling the timeout for backlight, gives a softer light than the flashlight which can be great for reading at night.

I seem to recall someone asking if, in addition to the extra-bright option, it would be possible to have a less-bright option. I can see times where this would be a nice option to have as the default brightness is quite high and simply having a white full-brightness LCD would be more than sufficient. This could even be extended by including a slider to adjust the backlight so the user could set it to be as dim/bright as desired.

Thoughts?
This already exists in the Diamond forums, named Flashlight. That's their alternative, as they don't have a camera flashlight.
 

NLS

Senior Member
May 27, 2005
2,496
63
Piraeus
www.ilogic.gr
Indeed this is an application related to the *** LED ***.
Let's keep it like that.

The only "interaction" with the screen I would like to see, is to turn backlight (or screen) off when LED is on, so that screen light does not interfere with my vision in the dark.
 

del4

Senior Member
Jan 25, 2007
462
4
Arizona
Indeed this is an application related to the *** LED ***.
Let's keep it like that.

The only "interaction" with the screen I would like to see, is to turn backlight (or screen) off when LED is on, so that screen light does not interfere with my vision in the dark.

Actually, I don't recall a limitation to only using the *** LED ***. :p The intended purpose of this app is to provide a useful source of light using our devices. Didn't realize the source of the light wast limited... :rolleyes:

Some have asked for a light source that is either less or more intense than the standard LED light, so just thought it would be another option to add in rather than having to use yet another app. Plus, it may use less power than the LED would as well as alleviate some users' concerns about 'blowing' their LED...
 

Sideman7

Senior Member
Oct 25, 2008
66
13
Some have asked for a light source that is either less or more intense than the standard LED light, so just thought it would be another option to add in rather than having to use yet another app. Plus, it may use less power than the LED would as well as alleviate some users' concerns about 'blowing' their LED...

I am pretty sure powering the screen takes way more power than the LED. I don't recognize the LED used (Haven't looked that carefully though...) but on the lower setting, I would think that it would run for days (if not a week or more) on end. And as for burning out the LED, that's not likely given that it's not driven too hard. Modern LED's are amazingly efficient and can put out an insane amount of light if heatsinked properly.
 
Last edited:

NLS

Senior Member
May 27, 2005
2,496
63
Piraeus
www.ilogic.gr
Actually, I don't recall a limitation to only using the *** LED ***. :p The intended purpose of this app is to provide a useful source of light using our devices. Didn't realize the source of the light wast limited... :rolleyes:

Some have asked for a light source that is either less or more intense than the standard LED light, so just thought it would be another option to add in rather than having to use yet another app. Plus, it may use less power than the LED would as well as alleviate some users' concerns about 'blowing' their LED...

I can point you to at least three other solutions from the top of my head that use the screen as a pseudo-torch (and there are probably many more, I even remember seeing such, 6-7 years ago for PocketPC).

I don't see any reason at all for the developer to spend even five minutes to reinvent the wheel and not concentrate to what the program was intended to do and do whatever tweaks we can achieve in that specific area. AFAIK the NetRipper shares my view on this.
 

NetRipper

Senior Member
Feb 27, 2006
563
42
's-Gravendeel
www.netripper.nl
Updated again. Hope this fills some of your needs. Enjoy!

UPDATE 14-11-2008 v1.3:
* Added 'blink' feature. Registry configuration options:
- blinkTimeOnInMs (DWORD), default 500. Configures the time the LED is on.
- blinkTimeOffInMs (DWORD), default 500. Configures the time the LED is off.
* Added 'SOS' feature. More like a 'morse code' feature though. You can set any morse code to be signalled in the registry. Options:
- sosCode (SZ), default " ...---...". Configures the morse code to signal.
- sosDotTimeoutInMs (DWORD), default 200. Configures 200ms LED on, and 200ms LED off for ".".
- sosDashTimeoutInMs (DWORD), default 400. Configures 400ms LED on, and 400ms LED off for "-".
- sosSpaceTimeoutInMs (DWORD), default 1000. Configures 1000ms pause when processing space " ".
* New shortcuts are added for those features.
* Shortcuts are moved to a TorchButton folder within the Programs, for grouping purposes (in case you're wondering where TorchButton went!).

For next version I want to set brightness of the LCD to minimum level (not to turn LCD completely off). Still need to work on this. I'm gone the next few days but I'm aiming for an update somewhere next week.
 
Last edited:

Quake3000

Senior Member
Sep 27, 2008
55
1
Thanks alot for the usefull app.
btw have a question how safe is it for the led to be bright? and how long can it stay on for a safe notice so my led don`t die out;) ?
 

skyrunner

New member
Nov 14, 2008
1
0
Digital signature / invalid certificate

The software sounds great... But I' was'nt able to install it 'cause my glofiish M800 compalins about a missing digital signature / invalid certificate...
GRUNT!!!
Any way to get rid of this message?
Thanks a lot for your effort!

Sky


On my previous devices (Wizard, Hermes) I found it very useful to have the camera LED function as flashlight. However, all those tools that were previously available to enable the LED didn't seem to work on the Raphael.

I've just spent some time debugging and testing and got it to work on my Raphael. The cab to install is attached to this post. It'll create a shortcut in your programs menu.

Usage is currently twofold. When you start the app, the flashlight turns on. When you don't do anything for 30 secs it will turn off automatically to prevent your led from burning (heard it happen before on other devices). If you start the program again within the 30 seconds, it will manually turn the flashlight off.

I've only tested this on my Raphael so far. Please let me know if it works for everyone. :)

UPDATE 01-09-2008 v1.1:
TorchButton v1.1 now includes the ability to override the default timeout from 30 seconds to anywhere between 0 and 300 (= 5 minutes) seconds. The regkey is HKLM\Software\TorchButton\FlashlightTimeout (DWORD). When the application installs or when it starts for the first time it will create the registry setting if it doesn't exist yet.

UPDATE 09-11-2008 v1.2:
Finally a new version of TorchButton.
* Enlarged maximum timeout override from 300 seconds to 86400 seconds (a day).
* Added 'bright' feature. Note that the light may flicker almost unnoticeable every 750ms. Can't prevent that.
* For Devs: attached source code of TorchButton to this post.
* For Devs: I've created a C# library for easy control of the camera led. Also attached to this post. The .zip contains a readme which has examples on how to use it.

UPDATE 14-11-2008 v1.3:
* Added 'blink' feature. Registry configuration options:
- blinkTimeOnInMs (DWORD), default 500. Configures the time the LED is on.
- blinkTimeOffInMs (DWORD), default 500. Configures the time the LED is off.
* Added 'SOS' feature. More like a 'morse code' feature though. You can set any morse code to be signalled in the registry. Options:
- sosCode (SZ), default " ...---...". Configures the morse code to signal.
- sosDotTimeoutInMs (DWORD), default 200. Configures 200ms LED on, and 200ms LED off for ".".
- sosDashTimeoutInMs (DWORD), default 400. Configures 400ms LED on, and 400ms LED off for "-".
- sosSpaceTimeoutInMs (DWORD), default 1000. Configures 1000ms pause when processing space " ".
* New shortcuts are added for those features.
* Shortcuts are moved to a TorchButton folder within the Programs, for grouping purposes (in case you're wondering where TorchButton went!).

For next version I want to set brightness of the LCD to minimum level (not to turn LCD completely off). Still need to work on this. I'm gone the next few days but I'm aiming for an update somewhere next week.

---------------
The source code has been attached as well. The app has been written in C/CPP using VS2008. The code doesn't deserve a beauty-price, but it does its job. The 'TorchButtonBright' project is just a wrapper that calls TorchButton.exe with the /bright parameter. This is a workaround to be able to deploy two shortcuts with different icons and a parameter. If anyone decides to use this code, please rename the project. :)
---------------