I'm using MicroPython and this is what I want to stick with. But I'll research how RTOS is doing things and make an equivalent.