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

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Alvipe
Copy link

@Alvipe Alvipe commented Mar 6, 2017

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.

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.
Although the original code is supposed to read the raw EMG signals measured by the sensor pods of the Myo, it actually reads rectified and smoothed EMG signals, a measure of their amplitude. The code has been modified to get the real raw signals, by suscribing to the raw EMG notification characteristics by writing to and reading from the corresponding handles listed on the Thalmic Labs BLE specification.
A new function to change the color of the logo and bar LEDs has been added.
The program is now able to get the battery level in the same manner that it gets the EMG, IMU or classifier data. By suscribing to the battery characteristic, the Myo sends the battery level every time its value changes.
@Alvipe
Copy link
Author

Alvipe commented Apr 21, 2017

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 Alvipe changed the title Add a power off function Add method to get real raw EMG. Also add functions to power off, read battery, set sleep mode and change led color. Apr 21, 2017
@Alvipe Alvipe closed this Apr 21, 2017
@Alvipe Alvipe reopened this Apr 21, 2017
qtux added a commit to qtux/myo-raw that referenced this pull request Oct 29, 2017
@Alvipe
Copy link
Author

Alvipe commented Jun 18, 2018

@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.

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

Successfully merging this pull request may close these issues.

3 participants