Timer Library

Howdy all?

I am new to Cayenne. So I am discovering things as I go along. Having said that, I got extremely frustrated with the “Timer” class that has the member “update()”. This library is supposed to speed up the incoming data from my ESP board. However I have not had any success in compiling simple code with this library. I did include it with my sketch. The problem is that I get errors along the lines of “Timer has no member named update()”. I checked the header and source files. The update() member function is definitely there.
If I were to venture a guess, Arduino IDE includes another Timer library that is clashing with this one.
Anybody has a clue as to how to deal with this annoying issue?
I was also wondering if someone knew how to get data from an ESP board at a faster rate than normal. I used a simple button that I am pushing and it takes several seconds before a widget shows the change in its state. Anybody cares to help with this issue?

Thanks!

@sjellouli,

The problem is that the new MQTT lib has an internal Timer class so if you want to use the Timer library, you need to hack it.

Thus I have a library called Timerr and I include timerr.h, read ‘more timery’. You need to go through the library with a proper text editor like Notepad++ and change all references to Timer to Timerr then change the file names too.

Cheers,

Craig

1 Like

I did exactly that and I got errors.
I will keep at it until I figure it out.

2 Likes