I found creating a small Python webserver using Starlette plus a basic CLI using Click to be great for interacting and testing hardware. Python gives you an easy way to integrate with your actual code on the hardware using whatever interface you need with its wide support of different protocols. Click gives you a way to create a robust CLI for interacting with your Python code, and Starlette gives you a way to create a really lightweight but extensible webserver for both simple and more complex GUIs. Then, you can even add pytest on top of that for integration tests. Overall, I'd highly recommend this setup for hardware prototyping.