DeuxVis/Lora-TTNMapper-T-Beam

TX only above certain speed

HaViGit opened this issue · 2 comments

Hi,

Working with your software I intend to send the data with an interval of 60 seconds but only if the speed is above a certain value like >=5 kmh. I've tried so many options like:

if (actualSpeed >= 5 {
do_send(&sendjob);
}

but without success so far. Above code even results in not sending at all. I realize deepsleep can't be used because the speed needs to be monitored constantly but powering is not an issue in my case.

Can you help me to realize this?

Best regards, Hans.

Hello,

Someone have already managed to do something similar - interval of transmission changing with the measured speed : https://github.com/tekk/TTGO-T-Beam-Car-Tracker/blob/122d8efc2ebc57445a80581974c6d5670329dfc0/TTGO-T-Beam-Car-Tracker.ino#L150

I suggest you try to take inspiration from that as my free time for is project is currently approaching zero. Good luck, have fun !

Thanks!