Flashlight Firmware Repository

After flashing, it defaults to mode group 0. It needs one trip through the config menu to set the mode group to the one you changed.

If it always goes to the config menu on its own, without a bunch of fast-taps first, something is probably broken. But I’m not sure if that is what you meant.

[quote=ToyKeeper]

Yep :frowning:
I tried to do the project again without change, and the same thing.

It sounds like it could be corrupted downloads. The ones you compiled worked (ish), but the ones you downloaded in hex form failed? Sometimes text-like files get translated during the download, changing line endings and sometimes character encodings, and that might have caused problems.

About the short clicks doing nothing, it’s possible you might need to do even shorter taps. There is no OTC, so the timing depends entirely on how long the MCU can keep its SRAM contents after power is disconnected. I find that this is usually somewhere between 0.3s and 0.6s, so it needs to be a pretty quick tap.

But if the issue persists, if the MCU can’t hold its memory long enough to tap the button, you might need to switch to something which uses on-time instead of off-time for mode changes. You should be able to find a list of ontime-compatible firmwares in the INDEX file under “ontime”.

Thank you very much for your quick reply! :-)

I guess you might be right about the corrupted hexfiles. I'll make sure that the content matches what is shown on the site and reflash as soon as I get home.

About the tap timing: I'm not sure whether that is the real issue, because the original FW worked (3 mode / 5 mode) and luxdrv030 worked. Let's just hope, I messed up my "own" FW and downloaded a corrupted hex file. I'll test with a correct hexfile and report back.

Thanks again!

The stock nanjg 3/5-mode firmware and luxdrv both use ontime for mode changes. So they don’t care how long the button was pressed, only how long the light was on previously.

Biscotti uses offtime (SRAM decay method). It doesn’t care how long the light was on, and instead picks a mode based on whether the power was off for a short time or a longer time. If you press the button far enough to make it click, it’s probably too long. I’m pretty quick, but if I click it off then click it on as fast as I can, it’s still usually too long to count as a “short” press. The RAM contents can fade very quickly.

Ah, I see. I have a lot to learn here. :-)

I tried to simulate a short press by reattaching the wire fairly quickly. I also tried a "vibrating" motion which made the light flicker but brightness didn't change. I hope it's just a problem with my FW and the corrupted hex I downloaded. So I'll try again tonight as soon as I have time.

Thanks and best regards

Ah, sounds like it’s genuinely not working. I’ve had that happen (same symptoms) with a corrupted hex file or a bad flash. I usually ask avrdude to do a verify step after flashing, to make sure that didn’t happen.

the problem was with the microcontroller. I took the other drivers all ok

No need. I played with it last night and I’m totally happy with the control I have over the different outputs. I just wish the emitters would get here so I can show off all the time I’ve put into the thing. :weary:

Dear OP,

I have been following your thread for a while and have tried some of the firmware collections. Great work btw!
I have a question though for the “biscotti” firwmare. To my knowledge the new driver from Convoy uses your “biscotti” firmware but do you happens to know if it was stock condition or they change any of the settings?
I’d like to change just the mode groups but didn’t want to tamper with the low voltage warning and etc.

Any help would be appreciated.
Thanks!

Hi all,

The problems I had didn't have anything to do with the electronics, the FW I compiled, or a corrupt hex-file. For my specific problem, the fuses are to be blamed. As I wrote above, I used the following at first:

-Ulfuse:w:0x75:m -Uhfuse:w:0xFF:m

Then I searched for another off-time FW and found https://github.com/alexvanh/basic_off_time_driver

I didn't even download this FW because at the bottom of the page I found the following hint:

-U lfuse:w:0x79:m -U hfuse:w:0xed:m

After trying that the FW I compiled previously just worked. As did the provided hex-file (biscotti.hex). :-) The UI is just great, thanks Toykeeper! Now, I'm really happy with my S2+.

Does anybody know why this happened? Why does 75, ff work for some people but I needed to use 79, ed?

Thanks and best regards

I think Convoy is using biscotti without any changes.

You can change the mode groups by changing numbers in an array in the code, but you’ll need to compile and flash it yourself.

Check here what various fuse settings will do:
http://www.engbedded.com/fusecalc/

Here’s a site which explains the fuses:

Looks like it changes the startup delay and brownout settings and self-programming switch. Maybe your circuit isn’t booting as fast as expected so it needs a longer startup delay.

I've checked the fuses and read the corresponding pages in the datasheet... I couldn't find anything related to RAM decay, but it doesn't really matter as it just works. Perhaps a lower quality MCU?!

To sum it up: I'm very happy with the biscotti FW. So much better than the old/stock FW. Simon should start shipping Biscotti only. ;-)

The SRAM decay trick isn’t in the data sheets. It’s not an intentional hardware feature or part of the spec. Instead, it’s abusing a quirk of physics to our advantage.

Sorry I lost track of what FW you guys are talking about. Does biscotti use brownout/decay instead of a cap?

Correct since it is meant for the 105C which does not have an OTC. That is why I think I will be using the A6 firmware or possibly the bistro firmware de-bloated on my own 105C’s with an added OTC, I like reverse modes.

Anyone know if there is a Firmware available that has a candle or campfire type mode? I am building a steampunk lamp and I want to create an effect. I’m using genuine sealed glass fixtures the opporated on pressured gas. I’m going to put amber leds in the fixtures and the drivers in the base.

So basically you want it to flicker like fire? That would actually make for a really neat mode in a flashlight, take up a lot of space I bet but cool none the less. An option for tiny85 builds. I would actually be interested in that. I already have like 8 hidden modes, why not add a few more lol. In fact if I was to start on a tiny 85 version of the TA firmware I might have to see if the hidden modes can get their own group selection menu as well.