Push buttons to change a stored value

Does anyone know of a snippet of code to allow a change in a stored value?

I'm looking at making a clock that displays local time, and every 30 seconds or so, flashes UTC time (Zulu time)

For this you can use a preset offset value for Time and Ztime, but that would require re-writing the code to the pic every time you change from Daylight Savings or change local time zones.

If I can find a snippet of code that watches for a button input, then if found, allows 1 or 2 other buttons to change a stored value (the time zone offset value) by +/- 12. it might do the job.

Anyone know of a code for this?

Reply to
Aurbo
Loading thread data ...

Well you have two parts to the answer here, one is the code to recognise button pushes, the other is to change a value as a result of the particular button pushes, so no there probably isn't a snippet readily available.

The other thing is where do you want to store the value? I assume NVRAM so is this on your micro or external and do you already have the code for this written?

I think you just need to get on and do it yourself, you could probably get it all working in a couple of hours.

Reply to
Dave

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.