Go Down

Topic: Timed interrupts, any solution? (Read 568 times) previous topic - next topic

guzon

I'm trying to improve on a weather station project and I'm stuck on adding a timed interrupt to determine anemometer revolutions over time.  Has anyone identified a work around or fix for the lack of RTC routines in the default libraries?

kenharpster

I am not sure what you are specifically looking for, but the Arduino code on this site may or may not be of help:

http://cactus.io/hookups/weather/anemometer/davis/hookup-arduino-to-davis-anemometer-software

goodchip76

#2
Apr 11, 2019, 11:14 am Last Edit: May 06, 2019, 12:32 pm by goodchip76
Hi!

for use the internal RTC, I propose you to loot at my new fork of original arduino Time library (and test the InternalRTC_interrupts example)

https://github.com/goodchip/Time


> If possible, I would like a return for testing before submitting a pull-request to the original Time project. Thanks!

guzon

Hi!

for use the internal RTC, I propose you to loot at my new fork of original arduino Time library (and test the InternalRTC_interrupts example)

https://github.com/goodchip/Time


> If possible, I would like a return for testing before submitting a pull-request to the original Time project. Thanks!
I seem to be having some trouble with your sketch TimeInternalRTC_interrupts.  I have added TimeLIb.h to my libraries but I still get undefined reference errors to any call to the lib while compiling the sketch.

For this project I'm not interested in a fully capable clock, I just want something to interrupt the normal loop and run a quick calculation every few seconds.

goodchip76

I seem to be having some trouble with your sketch TimeInternalRTC_interrupts.  I have added TimeLIb.h to my libraries but I still get undefined reference errors to any call to the lib while compiling the sketch.

For this project I'm not interested in a fully capable clock, I just want something to interrupt the normal loop and run a quick calculation every few seconds.
Could you see me the compiled debug please?

Have you replaced fully the directory of the old TimeLib by this new fork?  Time.cpp and others files are important also.

This lib is fully capable to generate an interrupt in your sketch every time by second (by power of two: 1x, 2x, 4x, 8x... to 8192x by sec).

guzon

OK, no compilation errors when all files are present but it doesn't do anything.  There is no output of any kind once the sketch is uploaded.

I don't see how any of it works.  The meaning of your comments may be getting lost in translation since nothing seems intuitive.

goodchip76

#6
May 06, 2019, 12:31 pm Last Edit: May 06, 2019, 12:34 pm by goodchip76
Hi guzon.

Could you check if it has this hardware issue on your board:

https://github.com/arduino/ArduinoCore-megaavr/issues/27#issuecomment-482302760

Go Up