I altered the code to my likings and sensor fittings all good.
But the consumptions are high, and not the breasy uA the RAK811 can do.
I know the RUI compiler is available, but i thing adding the libraries there would be more complicated for now.
First question, how can i enable the sleep mode in the RAK811 like i would wih a AT+comnand?
Secondly (and please be kind) question: can i use the other RAK serial ports to tell itself to go to sleep? I imagine it should work right?
Unfortunately, you cannot combine RUI with STM32Duino.
With saving battery, you can also consider to totally remove the power of the whole circuit by using low power external RTC or timer switch. But this will require you to re-join every turn on of the device (if OTAA) and frame counters are always 0. Might be viable option if you will only send very few times a day.
Only as long as he’s not using TTN where we hunt people that re-join on OTAA more than once a decade down like the huge resource hogs that they are and make them write out lines, Bart Simpson style.
A device joins and stays joined, battery changes permitting.
HAHAH no no i want to use the RUI sleep mode that keeps all its information. Don´t want no rejoining in here ahhaha.
That´s why i am talking about using the Serial to give that command.
I want my devices to last 2 years with one battery not 1 month