Next cog question
DiverBob
Posts: 1,116
I'm getting further along with the timer module but ran into a snag tonight. I attached the timer code (I used the Archive function this time). It is designed to run on a uOLED-96 with 3 NO buttons attached to pins 18, 19 and 20. The methods TimeLoop (the commented out version) and CheckFlags run just fine when I don't use cog2. But once I add cog2 it appears that TimeLoop is no longer running. I believe its because of how I need to address the variables in order to grab the values at the address and then make the appropriate update. I have been looking for an example but haven't run across one that seems to do the trick. edit - I just realized that cog is reading and updating the variables directly.... hmmmm, now I'm really confused, must be time to go to bed and try again tomorrow evening
The thinking behind this setup is that cog always controls the button input and sets the flags when a button is pressed. Since this is a counter module, I want to set the counters up, move on to other displays and when I move back, just call up the current values from TimeLoop and initialize the displays. I know I haven't completed optimizing the code but my first pass is just to get everything working and then start looking for prettying it up.
Any help from the local experts is appreciated.
Bob
The thinking behind this setup is that cog always controls the button input and sets the flags when a button is pressed. Since this is a counter module, I want to set the counters up, move on to other displays and when I move back, just call up the current values from TimeLoop and initialize the displays. I know I haven't completed optimizing the code but my first pass is just to get everything working and then start looking for prettying it up.
Any help from the local experts is appreciated.
Bob
Comments
I just got in the stainless steel piezo switches (waterproof) so I will be swapping those in and seeing how well they work.
Although no one had a direct answer for this particular question, the forum was helpful in my research for figuring out the solution.
Thanks again!
Are those the ITW ActiveTouch switches? I am using those in a current work project. They work very well, I am using the npn open collector 24v version.
- Jesse