roaldarbol / bux

🐞 A simple GUI for running experiments
MIT License
2 stars 0 forks source link

Handle multiple cameras and serial ports #10

Closed roaldarbol closed 2 years ago

roaldarbol commented 2 years ago

Can be done with multi-threading, only I'm still not sure what exactly needs to be done and what the UI will look like - but it will be exciting!

roaldarbol commented 2 years ago

Some information regarding multithreading with OpenCV: https://stackoverflow.com/a/58599708/13240268

roaldarbol commented 2 years ago

For micropython to receive input whilst running, I need to better understand threading, multiprocessing and asyncio. Could make the microcontroller side of things greatly improved, and potentially enable communication between boards by having separate read and write threads. For asyncio, Peter Hinch is a great resource. For KeyboardInterrupt: https://forum.micropython.org/viewtopic.php?t=4637

roaldarbol commented 2 years ago

Managed to implement multi-canera support without threading. Remains to be seen if fps are unaffected, and thus whether threading will be needed later. Nevertheless, that shouldn't be too tricky now.

roaldarbol commented 2 years ago

Cameras are heavily affected. Trying to figure out whether to use threading, asyncio or multiprocessing to work around it.

roaldarbol commented 2 years ago

For the serial communication, there might be some useful info here: https://forums.raspberrypi.com/viewtopic.php?f=144&t=301414.

roaldarbol commented 2 years ago

Managed with multiprocessing. Serial communication will be discussed elsewhere.