[APP] hTorch v3.2 | using camera LED as flashlight [updated: 2008-11-20]

Search This thread

DeepThought

Senior Member
Jul 6, 2006
781
1
Austria, Vienna
hTorch is a small application with a graphical user interface that enables you to use your Xperia X1 as flashlight.

hTorch is built for the HTC Raphael (aka HTC Touch Pro) and has only been tested on this device. Although users reported that it works on Sony Ericsson Xperia X1 as well. PLEASE NOTE: Use this application at your own risk! I’ve done as much testing as possible, and will try to fix every bug which will be reported but it's my first Windows Mobile application and I can not guarantee that it is free of bugs. NetRipper deserves most of the credit because my application uses his TorchButtonLibrary v1.0 to control the LED itself.


Usage:

The program installs itself into "%ProgramFiles%\hTorch" and also creates a shortcut into %StartMenu%\Programs\Accessories. The further usage is as simple as possible. Start hTorch using the shortcut. On program start the LED will automatically be turned on and you will see the programs main screen.
On the main screen you can:

  • enable and disable the standard LED mode using the upper left bulb button.
  • enable and disable the bright LED mode using the upper right bulb button.
  • disable the display using the lower left button (The display can be turned on again using the power button)
  • exit the application using the lower right button.
  • enable and disable the standard LED mode using the D-Pad Action hardware button.
  • enable and disable the bright LED mode using the D-Pad UP hardware button.
  • disable the display using the D-Pad DOWN hardware button.

PLEASE NOTE: The flashlight will stay on forever - there is no timeout programmed. So the only timeout is the capacity of your battery. Burning the LED should not be very likely as this posting explains but please take care anyway. Please also note that the LED can not be left turned on while the device is in standby. So if you want to use the torch for an extended period please use the display off button but be aware that the hardware buttons will still function!
pRequirements:

Version History:
v3.2:
  • Added AppToDate support.
  • Some minor code optimizations.
v3.1:
  • Fixed several minor bugs
  • Fixed one huge bug preventing the device from standby even after hTorch was already closed.
  • Added a special error handling in case a user terminated hTorch instead of using the quit-button.
v3.0 (unreleased private beta):

  • Source again completely rewritten. I'm now using the TorchButtonLib v1.0 to control the LED. Which now also means that hTorch and TorchButton can be installed at the same time.
  • Action button mapped with LED on/off function.
  • "UP"-button mapped with LED bright on/off function.
  • "DOWN"-button mapped with build-in display off function (display can be turned on using the power button).
  • Changed right softkey to menu with sub menu items: "Quit", "Bright LED On/Off", "Display Off", "About".
  • Changed normal LED on/off button. (Artwork was done by obsidian73 - Thank You!)
  • Added bright LED on/off button. (Artwork was done by obsidian73 - Thank You!)
  • Added display off button. (Artwork was done by obsidian73 - Thank You!)
  • Changed the program window not to maximize (so that now the status bar is visible).
  • Added function to prevent ideling into standby (AndyZap - Once again thank you for your help!)

v2.2:
  • Updated TorchButton to v1.2 which enlarged the maximum timeout from 300 seconds to 86400 seconds (a day) - Thank you NetRipper!
v2.1:
  • Completely replaced all graphics to give the program a much more professional look and feel. (Artwork was done by obsidian73 - Thank You!)
  • Replaced the exe-file icon with a more diamond-like one
v2.0 (unreleased private beta):
  • Completely rewritten source so that hTorch can now detect the LED state
  • Tightened the program as much as possible (exe-file lost about a bit more than 25% of its size)
  • Automatically turn off the LED on program exit
  • Changed auto-off timer to 5 minutes (hard coded)
  • Added SoftKey functions
  • Added About Dialog
v1.1:
  • Fixed Bug when installing to Storage Card
  • Start LED on program start
v1.0b:
  • Initial version
On the picture you can see the programs
main screen with usage information:

htckovs100cn9.jpg


Downloads so far (counting since v3.2):
counter.png


AppToDate Users:
counter.png.php


Do you like my work? Please consider donating:

Thank you for your support!
 
Last edited:

DeepThought

Senior Member
Jul 6, 2006
781
1
Austria, Vienna
X1 no longer supported

Due to the ongoing reports of damaged LEDs I now officially remove the X1 from the supported devices list!

If you still want to use hTorch you can find it in the raphael software forum but be warned: Sony Ericsson has not heat sinked the LED at all. It has been reported that using the bright led mode for just about 30 seconds already damaged a LED. Other users even reported problems after "just" using the standard LED (which is the same as in the camera software). I can not verify all this isues but I don't want to be sued for any damaged device. So if you are using hTorch on the X1, than you are doing it on your own risk!

:-(
A very disappointed
DeepThought

Do you like my work? Please consider donating:

Thank you for your support!
 
Last edited:

DeepThought

Senior Member
Jul 6, 2006
781
1
Austria, Vienna
Once more:
Due to the ongoing reports of damaged LEDs I now officially remove the X1 from the supported devices list!

If you still want to use hTorch you can find it in the raphael software forum but be warned: Sony Ericsson has not heat sinked the LED at all. It has been reported that using the bright led mode for just about 30 seconds already damaged a LED. Other users even reported problems after "just" using the standard LED (which is the same as in the camera software). I can not verify all this isues but I don't want to be sued for any damaged device. So if you are using hTorch on the X1, than you are doing it on your own risk!

:-(
A very disappointed
DeepThought

Do you like my work? Please consider donating:

Thank you for your support!
 
Last edited:

nap007

Senior Member
Sep 28, 2008
477
20
nice app, however is it possible to automatically use the brighter led light from the start of the app?

thank you.
 

DeepThought

Senior Member
Jul 6, 2006
781
1
Austria, Vienna
nice app, however is it possible to automatically use the brighter led light from the start of the app?

thank you.

Thanks! ;)
Unfortunately that's not possible at the moment but it's a planned feature for the next version of hTorch.

In the original thread I have provided a todo list of features which will be added in future versions. It can be found HERE.
 

chenjeru

Member
Nov 24, 2008
7
0
Feature request

Maybe this is is already possible, but if not - please include the option to add a 'today panel' button. I'd like to be able to launch this app with as few steps as possible!
 

yodafone

Senior Member
Dec 15, 2004
106
5
PLEASE READ! POSSIBLE LED DAMAGE on X1 in Bright mode!

Please read this carefully!

My friend was using hTorch on his X1. He had it on Bright mode for 1 minute... and then noticed the light was getting dimmer.

When he switched back to Normal mode, the flash LED became so dim it was barely visible, and the area around the LED was very hot. What has happened now is:
- The flash LED is still very dim, even after the phone has been off for a few hours, meaning that the LED is possibly damaged.
- The LED has moved from its original position in the centre of the round lens, and the light beam is no longer a perfectly round circle. Probably, some glue that is holding the LED in position has melted from the heat.

In other words:
HTC/Sony Ericsson has probably not designed the X1's flash LED to be used for long periods of time at its full brightness, i.e. as a torch. The LED in the X1 is probably designed without a proper heatsink, and will be damaged if it overheats.


Obviously I can't ask anyone to risk their X1 to verify what has happened to my friend, but I would suggest that X1 users not use hTorch in Bright mode at all, or at most for only about a few seconds. Maybe the developer could incorporate a safety timer in Bright mode?


And before the flames start, PLEASE DON'T GET ME WRONG: This is a true story and it is NOT a complaint against hTorch or its developer. This is simply a warning, based on personal experience, to fellow X1 users to be careful when using this application.
 
Last edited:

DeepThought

Senior Member
Jul 6, 2006
781
1
Austria, Vienna
I am very sorry to hear that yodafone and I really take your post very serious!

But since hTorch is now available for quite some time and also had many X1 users before my posting in this forum and no such outage yet I think it was probably a faulty LED in first place.

Unfortunately I don't own a X1 otherwise I would take the risk of testing the bright LED for a couple of minutes. But I own a Touch Pro and I use the bright LED every night for about 5 minutes. The longest period I've used it was about 10 minutes but than I switched it off because the device was getting very hot.

I would try to RMA the device if I where you. Maybe the LED was not probably heatsinked in your friends phone because of some production fault?
 

DeepThought

Senior Member
Jul 6, 2006
781
1
Austria, Vienna
There are two very valuable posts in the TorchButton Thread which address the risk of using the LED:

I just wanted to comment on this. I am also a candlepowerforum member and know about the uses of LED's. I think that there is still the possibility of burning out these LED's inside the phones if they are high powered LED's which i believe they are. LED's have a very long life expectancy if they are properly driven and have proper heatsinking if they produce large amounts of heat. Given the light output of these phone LED's and being used as camera flash's I would assume that they are sufficiently high powered LED's drawing much more than the typical 25mA of 5mm LED's. And combining that with the probably nonexistant heatsinking of the LED's due to size constraints of the phone, I would believe that these LED's would definitely die or degrade dramatically if they were left on in high powered mode. If these LED's draw anywhere near 1W (~350ma at 3.7V) in high power, I wouldn't leave it on for too long.

With the LED running at a constant 100-150mA, I would think that this would be fine for short periods of time. I would not however let it run for over 5 minutes. Heat buildup can happen very very quick and with almost no heatsink for the LED's, it would build up even quicker. LED's typically change color output when it is overheating or overdriven. Usually overdriven or overheating white LED's appear really bluish when this is happening. So if you notice a change in color output, I would definitely turn it off and let it cool.
 

DeepThought

Senior Member
Jul 6, 2006
781
1
Austria, Vienna
Bright LED mode could cause damage?

Just to bring this to everyones attention: I just added this warning to the second posting:

x1warningoj8.png

Because of the possible damage of a X1 caused by hTorch as posted here: http://xdaforums.com/showthread.php?t=456477&page=3

I did extended tests with the bright LED mode on my Touch Pro and can confirm that there was no problem even after 15 minutes of usage. But since I don't own a X1 I can not rule out that the LED in the X1 is not as good or is not as good heatsinked as the one in TP. As long as this is not clear, please be careful!
 
Last edited:

Nocturnal310

Senior Member
Dec 8, 2008
396
6
Singapore
hi man..guess what ..yesterday only i was thinking of how i missed the torch feature of my W800i ..

btw my W800i also had a feature to blink the LED for 'SOS' in morse codes

can u program a button to transmit 'SOS' in morse codes?

u know..it blinks in morse code?
 

nap007

Senior Member
Sep 28, 2008
477
20
wha...? I never knew W series can do that? in fact, I'm surprised any phone could 'transmit' SOS signal using LED that been intended as camera flash.