dzhu / myo-raw

MIT License
218 stars 115 forks source link

Add method to get real raw EMG. Also add functions to power off, read battery, set sleep mode and change led color. #23

Open Alvipe opened 7 years ago

Alvipe commented 7 years ago

I have added a function to power off the Myo Armband (actually, according to the official BLE specification, the 0x04 command puts the Myo into deep sleep, there is no way to completely turn the device off). I think this is a very useful feature since, without this function, you have to wait until the Myo battery is fully discharged, or use the official Myo app for Windows or Mac and turn off the device from there.

The base script is the myo_raw.py modified by Fernando Cosentino, as the original script by dzhu throws some errors.

Alvipe commented 7 years ago

I have committed more changes to the original code. I have implemented a method to get the real raw EMG signals, not the filtered ones that the original code receives. I have also implemented new functionalities, such as reading the battery level, changing the color of the LEDs and setting the sleep mode.

Alvipe commented 6 years ago

@hananabilabd, I think Open Myo is faster than this code. I've never done a proper test, but I think its close to the 200 Hz at which data is theoretically sent from the armband. You should definitely try it.