Skip to main content

Site Navigation

Your Account

Choose Language

Anything programming related to the Hexbright

34 Questions View all

LED flickers instead of turning on

I've been poking at different scripts since Friday, and no matter which one I upload to the light it seems like void setup() loops over and over while the button is held down. dhiltonp tactical is what I have on there right now.

If I have a light level set in void setup() then it sometimes sticks to that level, if I don't the LED just flickers.

I'm at a loss on how I should proceed, I've tried uploading the factory defaults but that hasn't helped at all.

I am using Arduino 1.0.1, uname -a is

Linux 3.2.0-4-amd64 #1 SMP Debian 3.2.41-2 x86_64 GNU/Linux

Please ask for any other environment details that might be relevant.

Answered! View the answer I have this problem too

Is this a good question?

Score 0
Add a comment

1 Answer

Chosen Solution

First, please confirm that your original firmware functioned correctly.

Now set DEBUG to 2 in libraries/hexbright/hexbright.h, upload the code, and keep the cable connected. Open the serial monitor (upper right hand corner of Arduino).

Every time the light powers on, you should see diagnostic information printed (a flash checksum, and the amount of free ram). Make sure the flash checksum doesn't change after uploading the program a few times.

Let me know what happens!

Was this answer helpful?

Score 1



Ram available: 344/1024 bytes

Flash checksum: 20126


Ram available: 344/1024 bytes

Flash checksum: 20126


Ram available: 344/1024 bytes

Flash checksum: 20126


this is tactical with debug set to 2, it just pastes this same output each time I hit the button, uploaded a few times and still the same behaviour, the LED flickers on once and doesn't do anything else. The checksum didn't change.


I tried functional, and the lowest brightness level turns on when it's plugged in, and it reprints the debug info when I hit the button again.


Excellent! It sounds like the issue is with too much power draw. This problem should be caught by the firmware as is, unless your flashlight's battery is completely dead.

Can you leave your flashlight plugged in overnight to verify it is fully charged, and then use a multimeter to test the battery voltage? Let me know the voltage.

Also, change the brightness levels to increase by 50, starting at 1 [1,51,101,151...]. Then cycle through and see if it shuts off at a certain brightness.


I don't have a multimeter but i do have another torch. I'll charge it overnight, and if that makes no difference i'll get the second torch back from my friend I gave it to, swap the batteries, and let you know...


It is indeed the battery, I just got a couple extra in the mail today. Thank you very much for the help!


Add a comment

Add your answer

Ryan Trumpa will be eternally grateful.
View Statistics:

Past 24 Hours: 0

Past 7 Days: 0

Past 30 Days: 0

All Time: 258