Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing EMG streaming rate #4

Open
GermanAndresVargasTorres opened this issue Apr 18, 2017 · 0 comments
Open

Changing EMG streaming rate #4

GermanAndresVargasTorres opened this issue Apr 18, 2017 · 0 comments

Comments

@GermanAndresVargasTorres

Kind regards @mamo91 , your library has been quite useful for my current research.

I've run some tests and noticed that EMG data is being streamed at 50 Hz, as if only one of the four EMG characteristics is being read.

I would be most grateful if you can help me modify the code in two key aspects:

  1. What numbers do I have to change in order to subscribe to filtered EMG data instead of raw EMG data? I haven't understood how these numbers match to the UUIDs explained in the MYO bluetooth protocol:
self.writeCharacteristic(0x28, struct.pack('<bb', 0x01, 0x00),True) # Subscribe to emg notifications
self.writeCharacteristic(0x19, struct.pack('<bbbbb', 1,1,1,3,1) ,True ) # Tell the myo we want all the data
  1. How do I get the data from all four EMG characteristics? Here it seems as if the code only read one of the four characteristics. I believe the extra byte you mention is indicating which of the four is being read:
if cHandle == 0x27: # EMG
    data = struct.unpack('<8HB', data) # an extra byte for some reason
    if busylog:
        log.debug("got emg notification")
    ev_type = "emg_data"
    if "emg_data" in self.bindings:
        self.bindings["emg_data"](self.myo, data[:8])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant