python-microscope / microscope

Python library for control of microscope devices, supporting hardware triggers and distribution of devices over the network for performance and flexibility.
https://www.python-microscope.org
GNU General Public License v3.0
69 stars 41 forks source link

Changing the Digitial IO to a DataDevice #270

Closed iandobbie closed 1 year ago

iandobbie commented 1 year ago

I have started to work on changing the DIO device to be a DataDevice. This will allow hardware to send input digital lines back to the remote server in real time.

This involves changing the device type and adding a few required functions, the most important being the _fetch_data call which returns data to the connecting machine

iandobbie commented 1 year ago

I have added a test line to the DIO simulation mode which toggles line 3 every 5 seconds and pushes the new value over Pyro.

Next steps:

Add to the Raspberry Pi implementation using its interrupt driven function call to wait for state changes on all input lines and push them when they occur.

iandobbie commented 1 year ago

This has been completed and merged in b6ddfa0dc10cdf7ef6a5b723054fb65bd8a83f31 Now all appears to work for simulation and the concrete raspberry pi implementation.