Currently, a caller of the MyoEMG class acquires EMG samples by instantiating an instance, and then repeatedly calling the instance's getSample() method. A more elegant interface would provide the caller with a reference to a stream of Sample objects where they could simply read data from.
Exposing data through streams would also provide us with a clean approach for streaming additional data (e.g., IMU) in the future. Each type of data could be sent through a separate stream.
Currently, a caller of the
MyoEMG
class acquires EMG samples by instantiating an instance, and then repeatedly calling the instance'sgetSample()
method. A more elegant interface would provide the caller with a reference to a stream ofSample
objects where they could simply read data from.