Update: March 9, 2015 Hidden strobe mode
I’ve added a hidden strobe mode to my firmware. After 2 very short on times the light goes into a strobe mode. To access it, half press the switch as fast as you can 3 or more times. I tried to make it hard to accidentally enter strobe, but easy enough to get into it when you want to, so it requires a very short on time between presses. You pretty much have to turn it off again before you see the light. A long press is needed to exit strobe mode.
Update: January 17, 2015 Ramping, Optional mode memory
Hey guys, I’ve added ramping to my firmware. I tried to make it a nice smooth ramp, it’s kind of like the sleep LED on a mac or something. It uses the ram retention trick, so it won’t wear out your eeprom. You can change the code to use the default ramp() function which rises and falls /\\\\ or ramp2() which is rising only /////. Just do a short press when it is ramping and that brightness level will be selected. I’ve also added mode memory (disabled by default) just uncomment #define MODE_MEMORY to enable it.
Hey guys, I’ve been lurking here for a little while and thought I might contribute something back. I’ve been experimenting with writing firmware for NANJG drivers.
I’ve come up with a method for using off-time mode switching on stock nanjg drivers. This requires no hardware modifications, there is no need to solder any extra capacitors to the stars for example. It works by storing data in memory that does not get initialized on startup. The bypass capacitor that is already on the nanjg driver is able to supply just enough power to keep the data stored in memory for about 500ms. This happens to be a very convenient amount of time for off-time mode switching. For this to work, brown-out detection must be enabled in the fuse bits when you flash the chip.
I’ve only actually tested this with the NANJG 101-AK-A1, but it should work with the others as well.
This isn’t really meant to be a complete firmware, it’s mostly intended to demonstrate the method and allow others to add off-time mode switching to their own firmware. I plan on releasing more stuff in the future when it’s finished but I thought I would share this with you guys now. Please try it out and let me know what you think (and whether it actually works with your driver).
You can read a more in-depth description and download it here: https://github.com/alexvanh/basic_off_time_driver