Bistro for Texas Avenger drivers officially released! Still taking suggestions for future mode groups

Ok, here is the official release of the Bistro Texas Avenger edition V1. I have everything I could cram into the available space in here. If TK every has time to compact things a bit more then I plan to extend it with 31 mode groups and some more blinking modes along with a few other things but they will not really effect 98% of people.

This firmware will work on any of the Texas Avenger drivers when used with a clicky switch. For e-switch lights we have the amazing Narsil by TomE to take care of us (of which I have not been able to find a suitable light to try it out on myself yet).

So a quick rundown for the TA version of bistro.

It has 24 mode groups in all sorts of flavors
You can adjust the mode order and moon mode separately to further increase the options to 96 different combinations of modes!
Mode memory can be toggled in the menu
It has several neat strobe modes that are quite fun to play with
The modes have been optimized to work with the triple channel setup, putting as many as possible in non-pwn settings
The off-time settings have been recalibrate for the TA drivers which seem to be more stable and not drain the OTC as fast
Thermal regulation with a user calibration setting in the menu

A few other minor changes that won’t really matter.

Basically this firmware is setup so that 98% of people can simply flash it as is and tweak it in the menu to get exactly what they want out of it without ever having to touch a line of code!

Flashing the firmware is quite easy to do with less then $5 worth of parts and a computer. There are threads on this if you search with way more info then I could give. Flashing a pre-made hex file is quite simple though even for novices.

It works exactly like normal bistro, the only changes have been to the modes and mode groups to work best with the Texas Avenger drivers.

Before I show the mode groups here is a basic run down of how to interpret them:

A basic understanding of how these groups work:

There are 20 brightness modes more or less evenly spaced across the visual brightness range so a mode of 10 appears roughly 2x as bright as a mode of 5 ect.

To make things easier to understand the non-PWM channels are provided “shortcut names”.

Moon (selecable in the menu and not shown in the below charts)
ONE7135 = mode 8
ALL7135s = mode 14
TURBO = mode 20

I try to use the non-pwm modes as much as possible as they are the most efficient. Keep in mind it takes 4x the amount of light to appear 2x as bright to our eyes. So going from mode 8 to mode 14 actually appears to be a not quite twice the jump in brightness even though you are using 7x+ as much power.

Going from mode 14 (the 7135’s) to mode 20 (turbo with the FET) uses 2-3x the power but only visually appears slightly brighter with a single LED. Now on triple LED build or the like you might want some between modes, so thats what they are for.

This is why I select mode 12 as the default, if I want turbo it is in the hidden modes via a long click from moon/low. I find that the bank of 7135’s is more then enough for 90% of situations though.

Modes approx mA and lumen values for single XP-L LED
1 = 5.5ma = .5lm
3 = 19ma = 4lm
4 = 37mA = 12lm
5 = 66ma = 24lm
6 = 135ma = 60lm
8 (one7135) = 355ma = 150lm

Above this it will depend on how many 7135’s are installed
With 7x 7135
10 = 640mA
12 = 1A = ~335lm
14 (ALL7135s) = 2.55A = ~830lm

Above this you are using the FET and it will vary wildly depending on the build.

16 = ALL7135s + 25% FET
18 = ALL7135s + 60% FET
Turbo = 100% FET

Now here are the mode groups as seen in the code, using the above lists it should not be too hard to figure out what numbers will deliver which current/brightness.

Click for larger version

Hidden modes are as follows:

Turbo > Batt Check > Biking Strobe > Strobe 10hz > Strobe 16hz > Old Movie Effect Strobe > Creepy fun house strobe

Here is the download link: Bistro Texas Avenger V1

It includes everything you need to either compile your own version with all the needed extra files already in place, or use the per-compiled version and simply flash it with AVRdude. It includes a batch file to make that much easier as well.

It also includes some useful python scripts by TK for calibrating things along with the voltage, OTC and temperature calibration firmware for those that really want to dig into things.

Looks good to me! I was going to ask if you have a muggle mode, but I looked again, and saw it there in your code snippet! :smiley: I’d really like to see Narsil get a muggle mode. AFAIK, it doesn’t have one. I need some e-switch drivers with muggle mode!

Hey TA, are planning to build these for sale? You might get more input if people think they will get something out of it

I wasn’t planning on it but down the road I might make up a batch if people wanted. It is a pain to assemble drivers in bulk by hand lol. Who know’s maybe RMM would be interested in selling them down the road.

So you are saying that I should or should not sell them to get more input?

I REALLY like standardization whenever possible. It makes things so much easier to deal with down the road.

So I figure if the “standard” firmware for the TA drivers can have everything that 90% of people need then 90% of these drivers would be easily interchangeable without having to figure out what each mode group is by trial and error.

Or people needing to get into the C file to flash it, flashing a hex is a piece of cake, compiling from a C file is a whole other can of worms if you are just starting ou.

Thats also why I am leaving the last mode “blank” so people can do whatever they want with it while leaving he rest of the groups alone in case they change their minds later and want a different group. They can simply look at the chart and see which group does what.

Sounds good. Once you get it compiled and post the Hex, then RMM will flash it for people to bare Attiny25’s and they can assemble the drivers themselves. I just know there are a lot of people who would love this driver but aren’t saying anything because they don’t have the ability (or time) to assemble it themselves.

If people would actually want to buy the driver I could make a batch of them (or might have to talk to RMM about using that fancy machine of his to do it) and selling them. From what I have seen people on here are generally very budget orientated and would prefer to save the money and build it themselves.

I just have too much invested in prior flashlight projects to jump into anything else without knowing there is a market lol

Either way my goal is to get the firmware as complete and universal as possible to allow for the widest possible array of uses without needing to mess with the raw code.

If you build and sell your TA drivers, I’d be in for two right away, and probably a lot more to come! :money_mouth_face:

Heheh

All the modegroup options are pretty complete.
I have now set all my bistro lights up:
Moon long, press for back, memory, besides moon three modes.

Challenge … ramping
Select ramping mode
From off click is on on memorized mode
Single tap starts ramp up and down and up and down etc.
Second single tap stops ramp at desired level.
Double tap max output

Has anyone done a video on how to use Bistro? That guide goes completely over my head?

Can i just click a button and it turns on? lol Looking at those modes already gave me a Headache lol

LOL, well the guide is over the heads of what anyone needs to know to USE the light, it is simply how to setup the light in the code. Trying to see if there are any special cases of mode groups needed by anyone to fill the remaining 4 groups.

Far as using it goes, the picture at the very end with the flow chart is how bistro works from a user perspective. It is really very simple.

Yeah, a single click will turbo it on. In the menu you can set it to have the first mode be Moon, low, turbo or if a custom mode group is wanted anything else.

That is something that would be interesting to code but is sadly way over my head. I can edit modes and basically copy/paste what others have done with tweaks to get what I want but anything else is best left to those that know how.

Well I bet you Toykeeper is reading this thread :wink:

Seeing no other modegroup being asked for kind of proves my point that Bistro is just good in this department
So only an “infinite” number of modes, ramping, is not there.

FWIW, I figured out some ways to save a bit more space while making biscotti, and some of those changes can probably be applied to bistro too… in case more space is needed. I just haven’t merged the changes back yet.

… and with that many mode groups, it might actually reduce the size a little to change how it counts mode groups; making it count the zeroes instead of assuming 8 bytes each. Not sure if the extra code it requires would be smaller than the reduction in table size.

Also, the code should work fine on a tiny85 in case a lot more space is needed.

I wasn’t, but I discovered it just a moment ago. :stuck_out_tongue_winking_eye:

Interesting, well it is basically impossible to have too much space as you know, there is always something to fill it back up lol.

I can currently read code just good enough to sort of understand what is going on, if it is all in the same area. When it starts pulling things from who knows where and I don’t see clear defines for what it is doing, well things quickly leave what I want to mess with.

Plus I have always had an issue keeping syntax correct, I hate having to be THAT precise. I need a good linter for Atom but have not been able to find one.

If it is easy enough to merge the code over to bistro-tripledown I can upload the code as it sits right now and you are welcome to do so. Plus if it was more compact it would allow people to add a few features if they wanted without having to also remove some.

A tiny85 would be plenty of space thats for sure! Good to know though, are the fuses and such already setup / known? Or are they the same as the Tiny25? Just change AVRdude to the 85?

Oh, one minor detail, I am still having trouble understanding how the strobe frequency works, Which number does what? is the first number the on or off time in ms?

I agree, Bistro is truly the best Clicky firmware released yet. I am sure that TK will find ways to improve on it (as she already has apparently) but it works perfect for my goals for these drivers.

Simple and standard drivers that work for anything and everything without the user needing to get into the nuts and bolts unless they want to. Then things are completely open source allowing them to make whatever changes they desire.

I like to have my cake and eat it too whenever possible. :partying_face:

In case you felt like messing with it, here is a quick upload of what I am working with right now, besides the mode groups and a better understanding on the strobe settings I think I have most of the changes I planned on making done (not much as you can tell, virtually no code changed, mostly just comments and mode related things).

Bistro-Texas_Avenger_Series

Oh, one other feature I thought I had seen in bistro or one of your firmwares was a debounce feature? I can’t seem to find it in bistro though? Maybe it was firmware by someone else I saw it in?

I have a mode group I use in my H17F driver.

It has double tap mode but I know bistro doesn’t.

Basically 4 modes. No memory, start on moonlight, max maybe 10-15 lumens, evenly spaced modes.

I can creep around at night, not disturb the kids, and still see a bit more if needed.

So basically an all low mode group? I actually considered that but wanted to hear if anyone had a better idea first. I could put in a few low modes, should get you around .5, ~4, ~12 and ~25 lumens the way the ramp is setup now IIRC.

Good idea, so 3 more mode groups to go! (possibly more if TK has her way with the code)

Keep the ideas coming!