URGENT Help No Serial data for Myoware 2.0 Wireless

Hi,

I bought the EMG sensor wireless kit.

I am trying to connect esp32 wireless shield to arduino to collect bare EMG data.

However, I am having trouble.

I am running the BLE Peripheral code and using espressif ESP 32 Dev Module on dev/tty0 port

This is my error:

Sketch uses 566958 bytes (43%) of program storage space. Maximum is 1310720 bytes.
Global variables use 31620 bytes (9%) of dynamic memory, leaving 296060 bytes for local variables. Maximum is 327680 bytes.
esptool.py v4.8.1
Serial port /dev/ttyUSB0
Connecting......................................

A fatal error occurred: Failed to connect to ESP32: No serial data received.
For troubleshooting steps visit: https://docs.espressif.com/projects/esptool/en/latest/troubleshooting.html
Failed uploading: uploading error: exit status 2

please help me getting esp32 connected to arduino ide so i can see emg recording as i have a MAJOR deadline by tomorrow.

thank you

NOTE:

I downgraded IDEs, switched Board IDs nothing working.

I’m using sample code BLE Peripheral from the library and it looks like my systme can detect CH340 drivers.

If you can help please do and see my forum post.

Make sure you have the new COM port selected that appears in hardware manager when you plug in the device and be sure to select that same one in the Arduino IDE

Also, note that the power switch needs to be flipped in order to upload to that board, see this from the guide:

" When uploading new code to the Wireless Shield, you will need to connect a USB cable between the MyoWare 2.0 Wireless Shield and your computer’s USB port. Select the POWER SOURCE on the Wireless Shield (in this case, we used the built-in LiPo battery so the switch was flipped toward the VBAT). When ready, flip the switch for the POWER to the ON position to begin uploading the modified peripheral code (i.e. MyoWareBLEPeripheral.ino) using the Arduino IDE. This is also how you would charge the built-in LiPo battery.

USB Between Wireless Shield/Muscle Sensor and Computer

After uploading code, flip the POWER switch to the OFF position. Stack the shield on top of the MyoWare 2.0 Muscle Sensor similar to the Power Shield or LED Shield. Then attach the EMG pads to the bottom of the board."

I am doing the exact same thing.

Yet, I still get the error

Here is the code I am uploading
from myowareBLEPeripheral.ino from BLE lib

#include <ArduinoBLE.h>
#include <MyoWare.h>

const String localName = “MyoWareSensor1”; // recommend making this unique for
// each Wireless shield (e.g. MyoWareSensor1,
// MyoWareSensor2, …)

MyoWare::OutputType outputType = MyoWare::ENVELOPE; // select which output to print to serial
// EMG envelope (ENVELOPE) or Raw EMG (RAW))

// debug parameters
const bool debugLogging = false; // set to true for verbose logging
const bool debugOutput = true; // set to true to print output values to serial

// MyoWare class object
MyoWare myoware;

// BLE Service
BLEService myoWareService(MyoWareBLE::uuidMyoWareService.c_str());

// BLE Muscle Sensor Characteristics
BLEStringCharacteristic sensorCharacteristic(MyoWareBLE::uuidMyoWareCharacteristic.c_str(), BLERead | BLENotify, 128);

void setup()
{
Serial.begin(115200);
while (!Serial);

myoware.setConvertOutput(false); // Set to true to convert ADC output to the amplitude of
// of the muscle activity as it appears at the electrodes
// in millivolts
myoware.setGainPotentiometer(50.); // Gain potentiometer resistance in kOhms.
// adjust the potentiometer setting such that the
// max muscle reading is below 3.3V then update this
// parameter to the measured value of the potentiometer
myoware.setENVPin(A3); // Arduino pin connected to ENV (defult is A3 for Wireless Shield)
myoware.setRAWPin(A4); // Arduino pin connected to RAW (defult is A4 for Wireless Shield)
myoware.setREFPin(A5); // Arduino pin connected to REF (defult is A5 for Wireless Shield)

pinMode(myoware.getStatusLEDPin(), OUTPUT); // initialize the built-in LED pin to indicate
// when a central is connected
digitalWrite(myoware.getStatusLEDPin(), HIGH);

// begin initialization
bool error = !BLE.begin();
if (error)
{
Serial.println(“FAILED - BLE Initialization!”);

while (error);

}

BLE.setLocalName(localName.c_str());
BLE.setAdvertisedService(myoWareService);
myoWareService.addCharacteristic(sensorCharacteristic);
BLE.addService(myoWareService);

// set initial values for the characteristics
sensorCharacteristic.writeValue(“”);

BLE.advertise();

if (debugLogging)
{
Serial.println(“Setup Complete!”);
Serial.print(BLE.address());
Serial.print(" ‘“);
Serial.print(localName.c_str());
Serial.print(”’ ");
Serial.print(myoWareService.uuid());
Serial.println();
Serial.print(“Waiting to connect…”);
}

digitalWrite(myoware.getStatusLEDPin(), LOW);
}

void loop()
{
// wait for a BLE central
BLEDevice central = BLE.central();
if (central)
{
if (debugLogging)
{
Serial.print("Connected to central: ");
Serial.println(central.address());
}

digitalWrite(myoware.getStatusLEDPin(), HIGH); // turn on the LED to indicate the 
                                               // connection

while (central.connected()) 
{      
  // Read sensor output
  const String strValue = String(myoware.readSensorOutput(outputType));
  if (debugOutput)
    Serial.println(strValue.c_str());

  // "post" to "BLE bulletin board"
  sensorCharacteristic.writeValue(strValue);
}

// when the central disconnects, turn off the LED:
digitalWrite(myoware.getStatusLEDPin(), LOW);

if (debugLogging)
{
  Serial.print("Disconnected from central: ");
  Serial.println(central.address());  
}

}
else
{
myoware.blinkStatusLED();
}
}

this is how my arduino IDE looks:

Ok - do any of the LEDs light up? If not, it might be defective… if they don’t, was it purchased from us? If so head over to Returns (contact vendor if purchased elsewhere) and we’ll get ya squared away

Yes the PWR and sometimes the ENV light up as well as the CHG part and 13 constantly.

What do you think could be the problem?