The serial write error shows up after disconnecting the filter wheel, and disappears when I reconnect it.

I'm not 100% sure what triggers it, but I suspect it's part of the wait loop which checks if the filter is moving.

Read More...