Error uploading project 2

I get a memory error after i copy and paste project 2 text.

Did the paste work and the error comes after that? Paste where?

I copied the code text for project 2 from the arduino website. So that makes me believe there is no typing errors. It finishes compling but when it's done trying to upload it responds with a memory error.

This is where i copied the code from directly from arduino's website

Have you selected the correct board and com port in the IDE under Tools?

I think i did but i can double check. I think i need that to upload a project right? I tested the upload function right before that by uploading the text that was in the software by default and it uploaded successfully. Although, that code was for nothing.

1 Like

That's ok, even if just a blank sketch, it tells you the drivers installed correctly and the Arduino is at least communicating with the PC, right?

I know how to program plc's and this doesn't make sense to me. Hoping someone can help me out.

You will get used to it. The programmer (IDE for Arduino) is touchy. I have to tell my IDE what my board is and where it is connected many times every session, and I haven't physically changed boards, ports or "processors" in a week. I wish "preferences" would let me hard-code it.

Thanks for the encouragement. I think it's the buffer settings but doesn't make sense as to why they sell it with the buffer settings to low for project 2. Also wondering why it didn't pop right up in the forum.

Your sketch compiled without error (the white text in your image)... here is my compile report... we have the exact report, and I did not receive that error... so "buffer" is fine... I think that might be a holdover from other work you have done.

Sketch uses 1160 bytes (3%) of program storage space. Maximum is 30720 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes.

The "fix" might be as easy as remove/insert your USB cable and verify:

  • IDE >> TOOLS >> PORT >> your port
    and
  • IDE >> TOOLS >> BOARD >> AVR BOARDS >> your board
    and
  • IDE >> TOOLS >> PROCESSOR >> OLD BOOTLOADER (off-brand Nano with CH340 USB chip).

While you were building this project, you may have touched a jumper wire or component lead, bridging a 5VDC source or ground to an Arduino pin which sent a high or low up the USB cable to tell the computer to eject the device. The fix would be remove/insert the USB. Always disconnect the USB cable and external power while building projects. I let a half-loose jumper touch my 5V rail causing my computer to eject my USB. I heard the system chime. Lucky for me, all I needed to do was remove/reseat the USB.

Attaching the project book for reference. Copying the code from the book is fiddly.

arduino-projects-book.pdf (7.2 MB)

p.s. To answer your question, "Why it didn't pop up"... I will guess you are asking about "an error occurred while uploading the sketch" ... but it does show in the first six links. Maybe you were looking in another area.

1 Like

Device Manager > Arduino > Port Settings > Advanced
maybe?

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