Flashlight Firmware Repository

I have a ramping clicky, is there a ramping MOM anywhere? For an 8X ~ 12X Nanjg...

Yes, that’s what the one a couple posts ago is — a ramping UI for momentary switch lights like the SRK or Roche F6: ToyKeeper/Ferrero_Rocher/Ramping_UI_Table.c

For a nanjg-based driver, you might need to recalculate the ramp values. By default it’s calibrated for a FET driver or a 32x7135 driver, but regular nanjgs need a higher zero point. The ramp_calc.py tool can generate new values for you; just tell it the lowest PWM value which actually produces light and adjust the goal multiplier… it might take some trial and error to get it to produce the right number of steps though.

I'll check into it.

Thank you!

Hi guys, I’ve been playing around with the blf-a6 firmware for a light that I’m trying to build. I’ve compiled it and it just doesn’t work just a quick flash then no output. I have tried a different firmware on the driver to confirm it work and that’s all good so has to be the firmware that’s causing my issues, yet I can’t see what the matter is.
Any chance you could give it a look?

CODE

Thanks
Pyro

I actually did end up implementing batcheck, put it at 30 short presses. Using a five step scale and ToyKeepers values it works quite well. Took a battery directly from the charger and it showed five. Used it for a day and it showed four. Used it for another day and it showed three and now it’s down to two. Will see what happens when it goes down to zero. I took away low battery step down though, don’t like it anyway. Low battery shut off makes more sense to me so I kept that, haven’t tested it yet though. Now it’s summer around here and the sun is up all the bloody time so not much time for testing firmwares. Testing inside is just boring. I wrote this firmware almost as a joke but it’s actually growing on me. It’s kinda the ultimate flashaholic firmware as it’s empty from the beginning and you must program everything yourself. Seven modes possible so five normal levels, strobe and sos ought to be enough for everybody yes. :slight_smile:

You got a ton of compiler errors. Start with installing avr-libc as the headers are missing.

I didn’t get any errors when compiling in a avr studio. How odd?

Isn’t the “output” you pasted yours? Or maybe that is something that is automatically generated? If so then you can ignore my previous comment.

codepad.org seems to be a compile/interpreter as well - not just file sharing, so I think it tried to compile your code. = that explains it.

guardior - which exact driver/board are you using? Are you sure it' a DD+1, and if so, connected on the same pinouts as TK has it configured for?

Ahhhh that may be causing some issues here then.

No no, I’m still only on 105d. And will be for some more time, I’m not really good with soldering but trying to learn. :slight_smile:

He meant the pasting site so you can safely ignore my comment. But finding bugs in that code is not easy as there are tons of ifdefs and whatnot. :slight_smile:

Ahhhh OK well no worries if it’s an issue.

Ok - I'm getting BLF'ers confused Smile.

pyro1son - sorry: are you also trying to use it on a stock Nanjg? If so, you have to disable the secondary PWM output which looks like you attempted to do.

MODES1x1 and MODES1x2 should be zeroed out. You zeroed one but not both. I believe MCU pin #6 (PB1) is the standard output pin on a Nanjg, while pin #5 (PB0) is the alternate PWM pin called: ALT_PWM_PIN. It might be you are defaulting to group #2 which won't work.

I'd try swapping mode sets. You have CONFIG_STARS turned on, but it's support appears to be commented out. I mught have to punt at this point - not sure what you changed for what reason....

I’m using a board with dual PWM output. Config stars?

You can get a Fet + 7135 driver from MTN Electronics that would be just two wires to solder, or if you don’t want to do that much you could buy all the parts for a light and have him assemble it for you.

BLF VLD gone?

What’s the current state of experiments with adding a capacitor to be able to determine between short and long press?
Some had success before it seems with only a capacitor for some functionality but the original idea had more parts (R,D,C if I remember right, that’s what I got but didn’t build yet) and made more sense.
Might get to it again, I see there are now many more codes than the “crazy” VLD.

Is there some feature and UI overview of the different FWs copied in the repo? Say an overview sheet of what each FW and version supports?
I can see the index in trunk but that’s more or less only useful for searching for specific features to then look them up in code or reuse the hex file if no code. But no mention of say wear leveling, if it’s implemented or not. I understand this is stuff hidden in code and might need to be filled in the meta files by someone who made or at least read the code.

Might be a good idea to add a link to the repo to wiki and if there would be a table overview of the features it would be grand to have there.
http://flashlightwiki.com/AVR_Drivers

You can add it, but if you can’t shoot me a PM I should get a notification and can add things to the Wiki.
It’s easier to navigate wiki than search every flashlight forum threads in the world for data/information.
This is yet another 1000 pages long driver thread, impossible for anyone to read over for what has been shared and said here, it’s important to take the useful information and save it at places like Wiki.

Nice :slight_smile: agree about the step down, LV shut off should be plenty, and with these new high Vf emitters, we already have a step down when it drops under the Vf :wink:

I think i will absolutely test this out when i start flashing drivers (soon i hope).

Its horrible we have like no night at all here in Sweden now, just a few hours & even then the sky is so bright it is not really dark :frowning:

This is my first year in the flashlight rabbit hole :D, and i really miss the early dark evening at winter when you could mod a light & test it out right away :slight_smile: now it is just soooo bright outside.

Jack - TK should really respond to you on this - she's the keeper Smile. She implemented a nice short/long press detection on using a cap - it's pretty standard now and is being used in the BLF EE A6 group buy light (https://budgetlightforum.com/t/-/31076). I've built a couple of lights with the same firmware. I much prefer an e-switch light for short /long press's though - easier, more consistent, much better UX/UI.

Ohh - haven't seen you on BLF for a while, hope all is well. If you just came back recently, there's lots to catch up on. RMM's website: http://www.mtnelectronics.com has many of the latest things we are building - parts, drivers, hosts, etc. Triples and quads have gotten to a whole new level, as well as insanely high amps in smaller and smaller lights.

I just did some browsing on the wiki - didn't know it was still maintained - there's lots of out-dated info there, but also lots that's still very useful. I can't find how to participate and post to it though. I never used BLF-VLD, always went with my own version of luxdrv, but now, luxdrv is pretty out-dated. I use OSHPark custom drivers almost exclusively now - the" FET+1" drivers where you get best of both - high powered modes from a FET, low modes off a single 7135.