Using RUI timer

Hello comunity,

I am developing using the RAK811 using the RUI libraries and i wonder.
I want to measure how much time in ms has elapsed on the timer.
I want to measure the time a GPIO on high and the response on another PIN.

I looked to the RUI interface https://docs.rakwireless.com/RUI/rui-interface-general-format/#rui-timer-start.
but can´t figure out

Have you checked the example here? GitHub - RAKWireless/Products_practice_based_on_RUI_v2.0

This should be a good starting point.

1 Like

Yes i have, The code i understand just not how can I in any given instance know the timer “clock”.
And not based on a interval.

For example in the PIC 32 you can reset the timer and pull the clock whenever you want.

Since there was no answer i assume there is no function in the RUI.h library that gives me a clock value?

Hi @bioshock2k ,

If you are looking for the low level register of the timer peripheral of the STM32, that it is not available on RUI.

The fastest interval you can set is 1mSec using this RUI API.

https://docs.rakwireless.com/RUI/rui-interface-general-format/#rui-timer-set-value

How it is used is in this example. But this one has 1sec interval. Products_practice_based_on_RUI_v2.0/app_RAK811.c at master · RAKWireless/Products_practice_based_on_RUI_v2.0 · GitHub

1 Like

Thank you!
But i guess that for my application it wont do.
I will see what i can brew with the RUI, kinda need the sleep mode on the RAK811.