[MKR1000] upload completed but there are prints that saids "cpu reset"

hello! I’m trying to use MKR1000 with pulse sensor ( sensor : https://github.com/WorldFamousElectronics/PulseSensor_Amped_Arduino)

I’m testing with the sensor in arduino ide(ver 1.8.7 latest version)

I’m testing with the example code:

/* Getting_BPM_to_Monitor prints the BPM to the Serial Monitor, using the least lines of code and PulseSensor Library.

--------Use This Sketch To------------------------------------------

  1. Displays user’s live and changing BPM, Beats Per Minute, in Arduino’s native Serial Monitor.
  2. Print: “:heart: A HeartBeat Happened !” when a beat is detected, live.
  3. Learn about using a PulseSensor Library “Object”.
  4. Blinks LED on PIN 13 with user’s Heartbeat.
    --------------------------------------------------------------------*/

#define USE_ARDUINO_INTERRUPTS true // Set-up low-level interrupts for most acurate BPM math.
#include <PulseSensorPlayground.h> // Includes the PulseSensorPlayground Library.

// Variables
const int PulseWire = A1; // PulseSensor PURPLE WIRE connected to ANALOG PIN 0
//const int LED13 = 13; // The on-board Arduino LED, close to PIN 13.
int Threshold = 550; // Determine which Signal to “count as a beat” and which to ignore.
// Use the “Gettting Started Project” to fine-tune Threshold Value beyond default setting.
// Otherwise leave the default “550” value.

PulseSensorPlayground pulseSensor; // Creates an instance of the PulseSensorPlayground object called “pulseSensor”

void setup() {

Serial.begin(9600); // For Serial Monitor

// Configure the PulseSensor object, by assigning our variables to it.
pulseSensor.analogInput(PulseWire);
//pulseSensor.blinkOnPulse(LED13); //auto-magically blink Arduino’s LED with heartbeat.
pulseSensor.setThreshold(Threshold);

// Double-check the “pulseSensor” object was created and “began” seeing a signal.
if (pulseSensor.begin()) {
Serial.println(“We created a pulseSensor Object !”); //This prints one time at Arduino power-up, or on Arduino reset.
}
}

void loop() {

int myBPM = pulseSensor.getBeatsPerMinute(); // Calls function on our pulseSensor object that returns BPM as an “int”.
// “myBPM” hold this BPM value now.

if (pulseSensor.sawStartOfBeat()) { // Constantly test to see if “a beat happened”.
Serial.println(":heart: A HeartBeat Happened ! "); // If test is “true”, print a message “a heartbeat happened”.
Serial.print("BPM: "); // Print phrase "BPM: "
Serial.println(myBPM); // Print the value inside of myBPM.
}

delay(20); // considered best practice in a simple sketch.

}

library&example: https://github.com/WorldFamousElectronics/PulseSensorPlayground/tree/master/examples

I installed SAMD board by using Board Manager

but when I compiled+uploaded to mkr1000, it prints like

Sketch uses program storage 11256Byte(4%). Max is 262144Byte(I translated in my own… sorry…)
Atmel SMART device 0x10010005 found
Device : ATSAMD21G18A
Chip ID : 10010005
Version : v2.0 [Arduino:XYZ] Dec 20 2016 15:36:43
Address : 8192
Pages : 3968
Page Size : 64 bytes
Total Size : 248KB
Planes : 1
Lock Regions : 16
Locked : none
Security : false
Boot Flash : true
BOD : true
BOR : true
Arduino : FAST_CHIP_ERASE
Arduino : FAST_MULTI_PAGE_WRITE
Arduino : CAN_CHECKSUM_MEMORY_BUFFER
Erase flash
done in 0.837 seconds

Write 11560 bytes to flash (181 pages)

[========== ] 35% (64/181 pages)
[===================== ] 70% (128/181 pages)
[==============================] 100% (181/181 pages)
done in 0.077 seconds

Verify 11560 bytes of flash with checksum.
Verify successful
done in 0.016 seconds
CPU reset.

And after this, my micro usb connection(which is connected to mkr1000) was being disconnected&
reconnected(I didn’t touch anything after upload)…

as a result, I can’t get print in serial monitor… Can I get solution for this problem?

thank you!

It sounds like maybe this bug:

That has been fixed in the hourly build of the Arduino IDE. Try it out to see if it makes the problem go away:

Note that the hourly build is primarily intended for beta testing and may not be as stable as the production releases of the Arduino IDE.

Thank you for help! First, I tried to use hourly one. But it replies "Atmel SMART device 0x10010005 found
Device : ATSAMD21G18A
Chip ID : 10010005
Version : v2.0 [Arduino:XYZ] Dec 20 2016 15:36:43
Address : 8192
Pages : 3968
Page Size : 64 bytes
Total Size : 248KB
Planes : 1
Lock Regions : 16
Locked : none
Security : false
Boot Flash : true
BOD : true
BOR : true
Arduino : FAST_CHIP_ERASE
Arduino : FAST_MULTI_PAGE_WRITE
Arduino : CAN_CHECKSUM_MEMORY_BUFFER
Erase flash
done in 0.837 seconds

Write 11560 bytes to flash (181 pages)

[========== ] 35% (64/181 pages)
[===================== ] 70% (128/181 pages)
[==============================] 100% (181/181 pages)
done in 0.080 seconds

Verify 11560 bytes of flash with checksum.
Verify successful
done in 0.202 seconds
CPU reset. Can't find board in the port that you selected"

The same situation is being repeated
usb automatically disconnected and reconnected

Did you select the port of your MKR1000 from the Arduino IDE's Tools > Port menu?

Yes! It is displayed like "COM27(Arduino/Genuino MKR1000)" and I selected it

but when it is being disconnected automatically and changed to recognized as COM15 (actually in

device manger , there were no COM15 under USB/LPT)

I tried it in both usb 3.0 and usb 2.0 but both prints same problem

I didn't expect the hourly build of the Arduino IDE to break your upload further. I thought it would either fix the problem or have no effect on it. I don't own a MKR 1000 but my MKR Zero should behave about the same and I don't have any problems uploading to it with either Arduino 1.8.7 or the hourly build.

Thank you for your help!

I tried to change version 1.6.11 after your latest answer (because I saw some video that

version over 1.6.8 is okay so I tried)

Actually, in first time, there were no print in hourly ide and 1.8.7

but when I used 1.6.11, I can check from blink example of mkr1000

and firmware version

But in 1.6.11, there were some hard thing(I don't know exactly right haha..),

so I went back to use hourly ide to update firmware

I update mkr1000 firmware now !!

I can consider and retry with your advice!

Thank you so much!

Now, I will try to do example with pulse sensor!

Thank you!