Activity stack and UI management for Arduino