Arduino ide is not recognizing my MKR1010 board

I started to use the MKR1010 wifi board. My applecation requires to connect an acceleration sensor to the mkr board and communicate with it via spi.

when i plug in the board and open the ide software i can see the board connected to port 7. when i verfiy the code it works also fine. as soon as i click the upload button the port number changed to 10 and then the board is not connected any more (see the lower corner on the right).

I have read about the bootloader and the pressbutton trick but it is not working for me. After pressing the button (physically) twice the orange light blinks and i can see the board on the port but when i want to upload the code the same problem occurs.

Can any one help me with the problem please?

a screenshot after verifying the code and before uploading the code

a screenshot after pressing the upload button

This is normal for Samd boards.

At the bottom of your last pic it says "upload complete"
everything looks like it has uploaded successfully.

but i dont see anything in the serial plot (any printin commands)

here is my code

#include <Simple_ADXL345.h>
#define ADXL345_SPI_CS_PIN 5

/* Using sensor on SPI mode */
ADXL345 adxl(ADXL345_COMM_SPI, ADXL345_SPI_CS_PIN);

void setup()
{
Serial.begin(9600);

adxl.setFullScaleRange(2);
// adxl.setFullScaleRange(4);
// adxl.setFullScaleRange(8);
// adxl.setFullScaleRange(16);
int range = adxl.getFullScaleRange();
Serial.println(range);

/*
When powered on, the sensor is converting acceleration data and
storing it on it's memory.
You can use the configuration commands before or after powering on.
*/
adxl.powerOn();

/*
This function sets the output data rate, also named sampling frequency.
The ADXL345 sensor supports the following output data rates:

 -> 6.25 Hz
 -> 12.5 Hz
 -> 25 Hz
 -> 50 Hz
 -> 100 Hz
 -> 200 Hz
 -> 400 Hz
 -> 800 Hz
 -> 1600 Hz
 -> 3200 Hz

*/
// adxl.setDataRate(6.25);
// adxl.setDataRate(12.5);
// adxl.setDataRate(25);
// adxl.setDataRate(50);
adxl.setDataRate(100);
// adxl.setDataRate(200);
// adxl.setDataRate(400);
// adxl.setDataRate(800);
// adxl.setDataRate(1600);
// adxl.setDataRate(3200);

int frequency = adxl.getDataRate(); // get the current data rate
Serial.println(frequency);

// adxl.powerOff(); // Stops the acceleration conversion.

/* This function returns the device ID byte. On this sensor,
the device ID is 0xE5h. It's useful to detect if the sensor
is working.
*/
byte devId = adxl.getDeviceId();
Serial.println(devId, HEX);

adxl.enableDebug(); // Enable the debug via serial
adxl.disableDebug(); // Disable the debug via serial

bool debug = adxl.isDebugEnabled(); // Check if the debug is enabled
Serial.println(debug);

adxl.setSerialDebugPort(&Serial); // Set the serial port used for debug
}

void loop()
{

}

The serial plotter is not the same as the serial monitor which is where println statements are printed.
are you sure you are using the correct one?
the serial monitor is the icon at the top right of the IDE window.

Sorry i mean the serial monitor

it says the board on com19 is not available

in your first post you say com 7
if you click on tools -> port
what does it say?

now it says com10

and is it working or ??

no it is not unfortunately

does the serial monitor open?
what is it saying now?

no i cant open it
as soon as i upload the code i cant open the serial monitor anymore
the error says: the board in com10 is not available

When i change the usb port the mkr is connected to then come the same problem but with com6

@msawaftah Use the latest IDE 1.8.16 and install the lastest package core for MKR1010 wifi board, see https://www.arduino.cc/en/Guide/Cores. Use a good quality data USB cable and do not use a USB hub or USB 3.0 port.

unfortunately nothing changed.

I have installed arduino 1.8.16 and arduino samd boards version 1.8.11

and i am using USB 2.0 Port

Apply boatloader mode recovery option:

  1. Double tap the reset button on your board quickly. You should now see the LED on the board pulsing (fade in and out slowly), which means the bootloader is running. The double press/tap makes the bootloader to run indefinitely (until the board is reset by taping again the rest button once, powered off, or an upload is done).
  2. Select the COM port for the board from the Tools > Port menu. The port number is usually different when the bootloader is running.
  3. Start compile and upload a Blink LED sketch from the Arduino IDE examples.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.