I built a small octocopter motor failure testbench in Streamlit to try out the new open source Nominal Instro package.
- Streamlit = mission console (motor controls, hardware visualizations).
- Instro = instrument layer (
InstroDAQreads/writes, channel aliases, etc).
I’m new to hardware engineering, and I’ve been finding it frustrating that I need to relearn how to use each hardware driver. Instro seems cool because it gives me a hardware abstraction so that I can write my testing code once and swap out the underlying hardware later.
Moving to my real LabJack driver is just swapping out this one line of code below.
from instro.daq import InstroDAQ
driver = SimulatedLabJackT7(device_id="470010000")
# driver = LabJackTSeriesDriver(device_id="470010000") # real bench
daq = InstroDAQ(name="drone_bench", driver=driver)
daq.write_analog_value("m1_cmd", 0.5)
measurement = daq.read_analog()