Crescendo clicky firmware by TK

Final rendition of worded operation (confirmed):

.
Basic operation:

(tap = half press)

.
From OFF:
(memory off) 1 full click = on at moon level and begins ramping
(memory on) 1 full click = on at memorized level and remains steady
1 full click then Single tap = Moon
1 full click then double tap = Turbo
1 full click then triple tap = Strobe / Batt check / Special modes

.
From ON (while ramping):
Single tap = pause ramping (steady on at the level when tapped)
1 full click = OFF

.
From ON (after pause ramping):
Single tap = resume ramping UP
Double tap = resume ramping DOWN
Triple tap = Turbo
Quad tap = Strobe / Batt check / Special modes
1 full click = OFF

.
From Moon:
Single tap = begin ramping
Triple tap = Turbo
1 full click = OFF

.
From Turbo:
Single tap = back to steady on at previous level
1 full click = OFF

Sorry I couldn’t confirm yesterday :person_facepalming:
I’m glad that others did and that the diagram is explained now :+1:

No worries MB, I appreciate you were going to check it too, the OP was on it!

Hopefully this will be helpful to others as (IMO) the “map” is especially confounding for this because of the “Full click vs Single Tap” conflict.

Hi.

I‘ve flashed a Nanjg105D (Crescendo firmware), but I cant access to the memory activation I have push the indicated times in the instructions and also more times. I cant access.
Does anyone know what problem is? (Fuses are correct).

Thank you very much.

From what I gather; Crescendos Firmware with ramping will work with a tailcap clicky switch, correct?

Did your flash of Crescendo involve a port/edit of the standard Crescendo code? It is possible that mode memory is one of those additional features that was removed in order to fit the standard Crescendo code into the smaller memory space of the ATTiny13a MCU used on the Nanjg105D driver.

Yes, and personally I’ve had better luck using it on reverse clicky rather than forward clicky tailswitches.

Thanks SeniorXJ and PC_Light.

Do you have knowledge of where I can download the firmware crescendo for the ATTiny, being able to choose which additional features has been removed?.

I can do without strobo and other things, but memory is important for me.

Thank you.

@Maiden666. the small amount of memory in the ATtiny13 MCU limits the code that can fit. I had a similar experience when I first tried Crescendo13 on a BLF A6 driver which like the Nanjg105D uses the ATtiny13a.

In order to get Crescendo to fit the ATtiny13, Toykeeper had to pare the original file down to fit, which necessitated elimination of Config and some other special modes.

I am NOT a coder and have never used C but FWIW, working slowly through TK’s excellent commented source Crescendo.C file. I was able to (hack) my way through the code to retain Memory by sacrificing the smoothness of the Ramping. It was the only place I could squeeze out enough space to restore the Config and other features. So now I have Crescendo with Memory working on the ATtiny13 but ramping is a little choppy compared to the original smooth version.

I am reluctant to share my .hex for two reasons (1) our two driver boards are different, and (2) I’m unsure of how properly share altered versions of TK’s code. But hopefully this will give you an idea that might work for you.

You may also want to consider gChart’s ramping_ui which was actually written for the Nanjg driver.

is this the crescendo?

crescendo?

Yes.

The crescendo.c is the source C code file. The Crescendo.hex and Crescendo25.hex (for ATtiny25 based driver) are two compiled version. These can be customized and re-compiled/built following the instructions in crescendo.c file for driver specific differences of various driver.

thank you.

been trying to get the C file to build…hmmm

ok, it’s time to ask,

i keep getting

tk-attiny.h: No such file or directory
recipe for target ‘main.o’ failed

and after ferkin with this and that (like i have a clue lol)

the calibration library/directory then gets listed in the failed build as no such file or directory.
(i’ve added the directory/library files that come with the cresendo into the library folder in Atmel studio as advised on youtube by various peoples, right click library file, browse to the folder, select the directory files and ok, they then appear in the solutions part in the library folder).
The furthest i’ve got with this is to get all the directory files mentioned as no such file or directory in a failed build.

i’m using Atmel studio 7, and get the same results in Atmel studio 6.2.
the torch is a Convoy C8 with the red driver board that it came with . (i think i saw the BLF guy on you tube call it the driver the NanJG type but…erghh.)

i notice in the comments it said ’‘// Also, assign I/O pins in this file’’, what do i define as what? and where?

and i don’t see any cpu frequency setting, do i need to add that too?

also there’s a line above the ramp setting ’’ …/…/bin/level_calc.py 1 64 7135 4 0.25 1000’’ i assume this is paired with the ramp line #define RAMP_CH1 4,4,4,4,4,5,5,5…… after it, as in uncomment the line?
….just to get more fun out of it, ermm i see more than one ramp channel? ermmm? need i give up lol…

(bare in mind i’ve just got the blinky code working on a free standing 13A chip…)

basically i’m looking for ramping, no flash modes and memory,and moonlight, can any body help or point me to some proper reading?
where’s the error code list and explanations for Atmel studio? and there must be a good C language dictionary some where, the one’s i found all say things like ‘char… chars it in alien talk by folding nonigomo’bi directional oddey ferkums to the’ … and so on. I found some ramp/float code that looked like it was simple for ramping, can i find it on a google again, neeeee-ope.

(google really isnt your friend lol! it’s more like a Pinokio episode at some fun park, eee-ore…eeee-ore)

Carpmom43, I’m not a coder but I’m glad to share what I know and/or have figured out over time, lots of time.

The error is referring to a needed “include” file which in this case is “tk-attiny.h”. The compiler needs to know where that and any other support files are located. Many of the programs support files have their Paths declared as a part of the Amtel Studio’s configuration options. Others, particularly files unique to a user’s *.c files must be provided.

I personally place a copy of the referenced *.h includes (tk-attiny.h, tk-calibration.h… - located in TK’s main repository directory) in the same location as the main/crescendo.c file to make my life easier.

Some of the other parameters such as CPU frequeny, Pin assignments etc. are configured in the other referenced Include files based on the HW configuration that you declare such as “#define ATTINY 13” and “#define NANJG_LAYOUT”.

Earlier I recall some of the *.c files containing path prefixes with “…\.\” these simply point to directories two parent directories up; again, just change as needed to point to the actual locations on your computer.

I believe the red convoy driver is single channel so you will need to pick one ramp, which ramp will depend on smoothness, capability of the driver to light on lower levels, etc. and I don’t believe the …calc file is needed when using the suggested ramp levels.

I hope that helps a little.


Also, I think it’s been referenced before but it is certainly worth repeating. gChart’s compiled ramping_UI.hex for the Attiny13 is a simpler ramping without all the features but has worked for me straight out of the box.

yes that does help, thank you.

think i’ll admit defeat on this one, still cant get any .h files to ‘register’…must be summut i’m missing for all files to be unrecognised. ahhh well back to google punishment.

I’m starting flashing again after a long break so I’m refiguring this stuff out. When I was compiling crescendo today I had similar errors. In my case atmel was creating a folder within the main directory. The various .h files had to be in that folder in order for them to be found.

I don’t get why all this stuff with .h header files. Don’t people use simple one C file solutions? I do, it makes all this stuff so much easier to manage.

Anyhow, try this… found out where string.h is in your avr studio folder (if you are using avr studio) and copy all tk-*.h files to that folder. I use AVR Studio 7, and in my case the folder is:
C:\Program Files\AVRStudio7\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\

This is the default include folder, all “default” header files that are included are refering to this folder. Includes that have avr\ in front are in the avr sub-folder.
If you have previously complied firmware which uses included files (such as eeprom.h) successfully, this should work.

ah-haaa, i shall give it go, thank you.

Speaking only for myself, this C stuff is Greek to me, last time I tried to compile a program was in Assembly on a machine running CP/M, which was was before DOS was even a thing :–0

@Mike C, any chance we’ll get a try a version of your “UI #3 off switch ramping” for Attiny13 based drivers? Looks dandy.