hcilab / MyoStream

A reusable tool for Processing allowing the streaming of EMG data directly from the Myo armband through Bluetooth Low Energy
4 stars 2 forks source link

Enable / Disable EMG streaming #3

Open aarontabor opened 7 years ago

aarontabor commented 7 years ago

Currently, EMG streaming begins when an instance of MyoEMG is created, and continues for entirely of the object's existence. In practice this will probably be unnecessarily demanding on the armband's battery life, and a mechanism to enable/disable streaming should be added to the MyoEMG class.

Proposed Solution

Add instance methods enableEmgStreaming() and disableEmgStreaming() to the MyoEMG class. EMG streaming can be enabled/disabled by subscribing/unsubscribing to notifications from the 4 EMG Data channels.

aarontabor commented 7 years ago

See the class constructor for an example of subscribing to notifications.