Extremely Slow Upload & Error in Example Code?

I am working with the Arduino M0 Feather for a project to use i2C communication between it and a Ambient Light Sensor but the Master Reader example code from the Wire library on Arduino takes an extremely long to download (5-9 minutes) and by the time it does a get a message that there is an error in the code but I am using one of the example codes so I don't know where the error is or why that message is coming from. Also how do I get the led pin (13) to stop following the Blink code. I am an amateur programmer and will appreciate all the help I can possibly receive. Thank you!!

Also would the presence of the Blink code be interfering with the new code I am trying to upload? I have tried to do research but nothing has provided me with a solid and easy to comprehend answer. I really would love help from anyone has any knowledge whatsoever.

When you encounter an error you’ll see a button on the right side of the orange bar “Copy error messages”. Click that button. Paste the error in a message here USING CODE TAGS (</> button on the forum toolbar).

I don't know of an Arduino Feather. Do you mean the Adafruit M0 Feather? If so which one? There are several different versions.

Have you gone through the installation required to set the Arduino IDE up to use your board and selected the correct board before compiling/uploading?

Please post the complete error messages you are getting (use the Copy error messages button in the IDE) and the code you are trying to compile.

When you successfully upload new code it overwrites any existing code in the device. The LED will stop blinking when you finally get some different code loaded in there without any errors.

Steve

Hi,
Welcome to the forum.

Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.

Have you been able to upload the blink code succesfully, or any other code?

Thanks.. Tom... :slight_smile:

Hi,
What controller board have you got selected in the IDE?

What version of the IDE are you using?

Does your code compile?

Thanks.. Tom.. :slight_smile:

*I have run the Blink code (it was the first one I ran) and it worked correctly but I have not been able to run any more code.

*Yes the code I am using does compile but it will not upload correctly. I am using the Arduino Feather M0 Basic (Proto).

*This the code that I have (example from the Wire library):
#include <Wire.h>

void setup()
{
Wire.begin(); // join i2c bus (address optional for master)
Serial.begin(9600); // start serial for output
}

void loop()
{
Wire.requestFrom(2, 6); // request 6 bytes from slave device #2

while(Wire.available()) // slave may send less than requested
{
char c = Wire.read(); // receive a byte as character
Serial.print(c); // print the character
}

delay(500);
}

*This is the error message I keep receiving.

(Sketch uses 11904 bytes (4%) of program storage space. Maximum is 262144 bytes.
An error occurred while uploading the sketch)

*The board that I am using in the IDE is Arduino M0 and I am using the most recent version of IDE.

*I am sorry if this is disorganized but I initially followed the directions on Adafruit’s website for this board. (I am also aware that this program uses the interaction between the Arduino and a slave device but I was advised by someone to upload the code with Arduino itself first.

I am sorry for not completely abiding by the rules of this forum. I am still getting used to everything. :frowning:

Select verbose mode for compiling and uploading, hopefully you'll then get useful error messages to report

in your IDE, click help> about arduino - and tell us what it says.
there may be some numbers in the top left of the popup

under tools > upload speed,
what do you have that set for ?

=================

did you read HOW TO USE THIS FORUM before jumping in an posting ?

it is at the top of every forum as a sticky post.

read #7 about using code tags.
you can modify a post, go to your post, on the bottom right there is other/modify
edit and then preview takes you to the same place.

don't worry too much, we just want to make sure you understand how to use the forum early so you do not make bad habits and you do not keep getting reminded about things.