After my years of using ATTiny chips for model train block detection, all working well until the next stage of reporting to the MAIN controller, it all fell in a heap. Needs too much tech to lift the signal over distance, too slow, lost messages etc.
Then came along the ESP###, and to this next generation, the Wemos ESP32 Lite, WIFI 4Meg of memory, 3.3V, comparable IO, Bluetooth and BLE (Bluetooth lite), and LIPO connection to boot and comes with your choice of programming with MicroPython LUA or Arduino.
Fantastic, runs its own code making on the spot decisions, communicate by cobbling with MQTT and Node-RED running on a Raspberry Pi (https://smalldevices.com.au/collections/cases/products/raspberry-pi-3b-starter-kit) , couldn't get better than this. Node-Red gives me browser based switches, alarms sounds, speed and other gauges, all works seemingly.
Bought a second unit to pressure test the MQTT, not a problem, simulated 60 messages a minute, ran for 8 hours straight without a hitch.
My interest is running trains but these things can do anything. I walk into my playroom, lights come on automatically, Wemos says hello, model railway lights come on. What a great experience.
Get one and start the fun.