xcode/myo.cpp
// Every time Myo Connect successfully pairs with a Myo armband, this function will be called.
//
// You can rely on the following rules:
//  - onPair() will only be called once for each Myo device
//  - no other events will occur involving a given Myo device before onPair() is called with it
//
// If you need to do some kind of per-Myo preparation before handling events, you can safely do it in onPair().
Every time Myo Connect successfully pairs with a Myo armband, this function will be called.
You can rely on the following rules:
onPair() will only be called once for each Myo device
no other events will occur involving a given Myo device before onPair() is called with it

If you need to do some kind of per-Myo preparation before handling events, you can safely do it in onPair().
Every time Myo Connect successfully pairs with a Myo armband this function will be called . You can rely on the following rules : onPair () will only be called once for each Myo device no other events will occur involving a given Myo device before onPair () is called with it If you need to do some kind of per - Myo preparation before handling events you can safely do it in onPair () .
void TheMyo::onPair(myo::Myo* myo, uint64_t timestamp, myo::FirmwareVersion firmwareVersion)
{
    knownMyos.push_back(myo);
    std::cout << "Paired with " << identifyMyo(myo) << "." << std::endl;
}
void TheMyo :: onPair ( myo :: Myo * myo , uint64_t timestamp , myo :: FirmwareVersion firmwareVersion ) { knownMyos . push_back ( myo ) ; std :: cout << " " << identifyMyo ( myo ) << " " << std :: endl ; }
Every time Myo Connect successfully pairs with a Myo armband, this function will be called.
Every time Myo Connect successfully pairs with a Myo armband this function will be called .
// Print out the MAC address of the armband we paired with. // The pointer address we get for a Myo is unique - in other words, it's safe to compare two Myo pointers to // see if they're referring to the same Myo. // Add the Myo pointer to our list of known Myo devices. This list is used to implement identifyMyo() below so // that we can give each Myo a nice short identifier. // Now that we've added it to our list, get our short ID for it and print it out.