The main program sketch is at https://github.com/ethermania/MPCountdown/blob/master/firmware/masterDigit/masterDigit.ino and the other files included in the top link are header files for the 74hc595 display multiplexing. I am wishing to use the masterDigit.ino sketch to drive a nine digit display to do the same thing that the program already does but with the 7221 drivers. I am tight on space so the dual 7221 set with the Arduino makes for a much better solution than using one 74hc595 per digit. I already have a sketch made up for the 7221 LedControl library that I have been using the experiment with, but at this point I am just throwing stuff into it and hoping it works without understanding what is going on.
I have been trying to figure out how to split the sketch apart and use it with the LedControl sketch that I already have with absolutely no success. I am even more confused than I was when I first started trying. I am not that fluent in the programming language but I can usually understand the logic, as long as I know what the commands in the program are doing.
My best guess as to the goal that I am trying to achieve is to create an array somehow (which is already done in the MPCountdown sketch) and use it to assign a variable for each digit (DDD:HH:MM:SS) like and set up the time in such a way that it resembles:
//days setDigit(1,2, 'variable from array here-days_hundred', false); setDigit(1,1, 'variable from array here-days_dec', false); setDigit(1,0, 'variable from array here-days_ones', false); //hours setDigit(0,0, 'variable from array here-hours_dec', false); setDigit(0,1, 'variable from array here-hours_ones', false); //minutes setDigit(0,2, 'variable from array here-minutes_dec', false); setDigit(0,3, 'variable from array here-minutes_ones', false); //seconds setDigit(0,4, 'variable from array here-seconds_dec', false); setDigit(0,5, 'variable from array here-seconds_ones', false);
However, I have no idea how to achieve that with C/C++. Even more so, I don't know how to utilize the additional functions in the MPCountdown sketch to work with the LedControl library like to make it countdown, set the time, blink while setting the time, etc. I'm guessing that its a quick and easy replacement of a few variables here and there and changing a couple of loops, but again, I'm am lost.
I posted a similar thing on Project Guidance, but it never received any suggestions, so I'm guessing that I was in the wrong forum, and since this is mainly an LED driving issue, I would assume that this is the correct place for such a question. I still may stand corrected though.
Any suggestions would be appreciated, and I can provide any additional information if needed. Thank you.