I am about to give up on this! So frustrating.
How do you do it? Do I need to add a off time cap? (I only have 10uF at the moment, can I make that work for off time I wonder..)
Anyone??
I am about to give up on this! So frustrating.
How do you do it? Do I need to add a off time cap? (I only have 10uF at the moment, can I make that work for off time I wonder..)
Anyone??
I did it with Star firmware and 10uF offtime cap soldered between ground and star#4. I think you can use similar caps in the uF range, doesn’t have to be exactly the same, but takes some time (20 minutes in my case) to figure out which levels correspond to what time, voltage is converted to levels 0…255.
Actually I did it so that I detect short and long presses, which is basically the same thing. I use fast click to move forward in modes, long press to move backwards.
It is not possible to do it without the cap, no way to measure how long the MCU has been off.
Well then that was fast. Then I am on the right track at least. I just put a 10uF cap on a driver... Only to find out I put it so I cannot get my programming clip attached now :-(
But that should be easy peasy to fix. Thank you for confirming this. I've been trying various fantastic coding for a week now..
Now a short nap and then onwards. TY so much :-)
hehe I was also considering many crazy ideas how to accomplish this thing of having two separate commands through one dumb switch, but the capacitor gives you that much needed information about how long was the button pressed.
let me know if you need the piece of code how I did it, but it’s basically just adding another level of detection, and on boot, checking what the level is
what is your end goal - what do you want to accomplish with this?
Hi vex_zg,
thats really another great improvement for the modded 105c’s!
It’d be awesome, if you could share your code and explain how to implement it in the off-time firmware.
Thanks!
FF
Sorry for not "spilling the milk" I am not trying to hide anything here, just that my first post was written in frustration :-)
I am trying to accomplish a "hidden" mode.
So normal mode pwm level sequence can look like low ->10, med -> 30, high -> 90.
Then double click to enter turbo ->255.
Also trying to make some even more hidden modes like strobe or similar but right now I am really out of ideas on how to do that.
I realise that others already have done this but I am trying to learn and understand. And it seems this old noggin for a head of mine is not taking well to programming anymore.
we’re thinking about similar things - it’s been a week since I did the modification to distinct between short and long press, and since then I’ve been thinking how to access hidden modes in the best way (such as strobe modes).
I think the doubleclick method is not good - because you typically actually use really fast double clicks when going forward thrugh modes, so if you want to use doubleclick to access hidden modes, you would often end up there by mistake.
This is my proposal/conclusion:
use short press to advance through modes (for me this is <1s)
use long press to go back in modes (for me this is 1s-3s)
use very long press to go to the first mode (for me this is >3s)
how to access hidden modes:
turn on the light, imeediately after turning on, go back in the modes (do a long press) to the “hidden” area, located “before” the first mode.
if you would go forward through the modes after turning on the light, the hidden modes will not be available
only through going back after turning the light on, is the “hidden” modes area available
what do you think?
sure, I’ll share, not at my computer right now.
I am also considering that. But I am thinking about making a total timed approach. So if two very short presses are detected in a short time it will go to strobe.
It is definately in the development phase right now though but I have a friend here who said that it would be his dream UI. So I gotta try to make it work.
ok, so you can do it this way, roughly:
is the current press a short press?
Yes:
was the previous press a short press?
Yes: access hidden mode
No: do regular mode advance, and store information that previous press was a short press
let me know if you get stuck
i’ll share the code of detecting length of presses tonight.
Can’t really add anything about the code, I haven’t messed with star in a lone time now, but make sure you’re giving the cap time to fully cool after solderong before testing (even if it’s X7R), Ive learned the hard way that can really screw you up!
I am still playing with the cap threshhold value but not getting it to change mode.
Everything else in star_offtime v1.3 is stock I am going up in value from the original 130. Should I be going down? Maybe I am not understanding the comments right?
Now I have tried going the other way and now I can change modes. But not consistently... cap_threshold value is now less than 10
So basically I am still battling with getting the 10uF cap to work consistently :-)
Once you get long and short taps and on time between them figured out you can set the hidden modes select to shave and a hair cut.
Progress has been made. I still have issues getting it set up right but now the off time cap thing works and I am getting closer.
A special thank you to vex_xg :-D Thank you for the ideas, code-sharing and fault finding. I will update this thread with the code when I have it working.
Yeah that star code is fun to work with. I like everyones code here really, toms, toymaker, comfy, cereal, old dr. jones stuff. Flashed them all in and changed things here and there. Not much that hasn’t been written already noticed. The hardware is the b * to get right. I wish we had that programmable buck driver they’re working on.
Oh well ot (like usual hehe). Be nice to see the code led. I’m sure it’ll help someone somewhere.