Flashlight Firmware Repository

I didn’t, thanks. I’ll take a look.

Would that by any chance be why the 7135 (on PB4) didn’t seem to be working in my build?

Yes, that is related.

The problem was, that the original code assumed that all 2-Channel drivers only use PB0 and PB1 which are on Timer 0.
A 2nd problem was that Timer 1 ran at double the frequency of Timer 0 - which would make 7135 chips unstable at low duty cycles.

fsm-main.c before my changes

If 1 Channel:

- Set up Timer 0

- Set up used pin “PWM1_PIN”
If 2 Channels:

- Set up used pin “PWM2_PIN”
If 3 Channels:

- Set up Timer 1

- Set up used pin “PWM3_PIN”
If 4 Channels:

- Do some interrupt stuff

  • Set up used pin “PWM4_PIN”

Now my changes add a bit of logic to that:

If PB0 is used or PB1 is used:

- Set up Timer 0
If PB4 is used:

  • Set up Timer 1

If 1 Channel:

- Set up used pin “PWM1_PIN”
If 2 Channels:

- Set up used pin “PWM2_PIN”
If 3 Channels:

- Set up used pin “PWM3_PIN”
If 4 Channels:

- Do some interrupt stuff

  • Set up used pin “PWM4_PIN”

Thanks. It’s working!

Hi TK, are there any known bugs with anduril when it comes to the modes group and you try to set number of modes to 1?

I’m experiencing very strange behavior trying to do the above but I’ve not yet been able to decern enough to even briefly describe the actual behavior more than “its odd” so I thought I’d start out checking on any other bug reports while playing with it / trying to figure out Wtf it’s doing to report back more in depth than “doesn’t work” / “strange”.

Hi TK, (and anyone else who might know)

I was wondering if you could help me a bit. I have some of each of the Fireflies and Mateminco lights and I seem to be finding conflicting information on the user interfaces. I see here that Maukka said his Rot66 has Narsil in it Fireflies ROT66 review (3x18650, 9x219B) But on NeilsGadgets page I found a link with you being credited Fireflies E07 6900LM 21700 Flashlight – Nealsgadgets

Can you confirm what the firmware being used is? Is it the same in Rot66/Eo7/and PL47?

Same question about the Matemenico. The manual I got for the x6s says bistro, but I don’t seen anything in the instructions of the S03 that would indicate what the UI is based on.

Also are these two companies just ones that picked up on the idea of using the trunk code in their products or do they have a deeper connection here at BLF? For example were any of the light designed with other help from members as a group project etc?

I don’t have any of the other lights so I can’t speak for them but the S03 / S43 use NarsilM 1.3.

That driver was done by me, although the manual that shipped with the lights was not correct as they didn’t use the one we sent them. The correct manual is posted in the S43 thread IIRC.

Early versions of Rot66 have Narsil. Then they were updated with additional color leds under the optic and newer firmware.

It’s not clear what exactly Matemenico did. See here Mateminco X6S, Factory Triple - #57 by ToyKeeper and following comments.

anyone want to do a step by step on compiling from FSM sources?
When I try “momentary.c” I end up getting 22 errors.

Edit-Now down to 20 errors 3 warnings.

Try zeroflows blog

I don’t see anything in there.

Edit-found his Atmel guild. I am using codeblocks, have also tried with just the terminal.

Did you define Attiny? Post the errors?

The first 15 or so are light this

/usr/lib/avr/include/avr/pgmspace.h|1529|error: unknown type name ‘uint_farptr_t’|

Most of the rest are undeclared first use of function

#define ATTINY85
#define FSM_EMISAR_D4_DRIVER
#define USE_LVP
#define USE_DEBUG_BLINK
#define USE_DELAY_4MS
#include “spaghetti-monster.h”

Do you have all of the files in the right folder?

I believe I have every file from FSM downloaded into one folder.

Have done a few tutorials and it works, when I do the simple c codes. I am not getting something from FSM that I need.

You also need these from the ToyKeeper root

tk-attiny.h
tk-calibration.h
tk-delay.h
tk-random.h
tk-voltage.h

Do they need to be in momentary.c or just in the same folder

Same folder

There all in same folder. Those are at the top of momentary.c file.

Are they all in the same folder? Like this: