The last days have been spent tunning Arduino code running on the timer.
A library to manage the MAX7219 seven-segments driver has been written, which can access all the chip settings, and three other libraries based on this one:
- One that won't be used, to drive a 8x8 led matrix, but that can be usefull for another project.
- One that effectively drives a seven segments display, with convenience functions like setting a digit, clearing it, setting and setting the digit's dot. I've also include a char set to display letters, that differs a bit from what I could find online, that is used by a setChar method that display a char, and a setText method that set several chars.
- And one that uses the previous, and offers convenience methods to directly set minutes and seconds.
Besides these libraries, the main code has been updated too. Until now the code was for using a shift register to drive the led display, it now uses the MAX7219 libraries mentionned above. I've also added some functions to naviguate trough a succinct menu. So the timer is now able to:
- Store a time in EEPROM, if it needs to be used in the future.
- Read a saved time from EEPROM
- Set and store the display luminosity
- Enable or disable the bell ringing at the end of an exposure.
So, I'm now waiting for the prototype boards to come home, before I can test the program in real condition! That will let some time to think about how using an accelarating feature on the rotary encoder, so that step value increments when turning more than a given time, to speed-up time tunning. And to think about the bell ringing, how long it should ring, if that long should be settable, and things like that...
All the sources for the main program and the libraries are on my github repository. Feel free to use them for whatever you want. The timer one can be usefull in a lot of programs, I whish I had write it a long time ago!
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.