Page 1 of 1

Problems uploading to board

Posted: Tue Feb 13, 2018 9:36 am
by duchesnehelp
Hello all!
We are building a 3D printer for school, and we are having a few issues with it. Another class from two years ago started building the printer and got most of it done, up until the part where you upload the code, and that's where we took over.

We have built the Rostock Max v2 printer and are using Arduino for the code.

Whenever we click "upload," we get an error saying "Problem uploading to board. See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions."
The other text that comes up is "avrdude: ser_drain(): read error: The handle is invalid."
It also says: "avrdude: ser_open(): can't open device "\\.\COM4": The system cannot find the file specified."

I checked the website and it essentially says that there is a problem with the arduino board, but I can't find where the arduino board is.

If you guys could help us out, that would be great! Please let us know if there is any other information that could he helpful. :)

Re: Problems uploading to board

Posted: Tue Feb 13, 2018 4:48 pm
by geneb
What OS are you using? do you have the correct port & board type selected in the Arduino IDE? Don't forget, you need to use v1.6.0 of the IDE when uploading firmware to the Rostock MAX.

FYI, the "arduino" really isn't. The controller is called the RAMBo and is compatible with the Arduino Mega 2560. That controller board is located behind the panel with the LCD screen on it.

g.

Re: Problems uploading to board

Posted: Wed Feb 14, 2018 10:49 am
by duchesnehelp
We're using Windows 8.1. I'm not sure how to tell which version of the IDE we're using. The Arduino program we're using says it's version 1.6.9.
The previous group didn't leave a lot of helpful information for us, so we're just trying to figure things out as we go.

Thank you so much!!

Re: Problems uploading to board

Posted: Wed Feb 14, 2018 10:57 am
by Mac The Knife

Re: Problems uploading to board

Posted: Fri Feb 16, 2018 9:49 am
by duchesnehelp
So, I downloaded ardunio 1.6.0 and copy-pasted the code from Arduino 1.6.9 into it, keeping everything the same.
I made sure the port and board type were the same from the old program, then saved, and tried to upload.
We got this error:
Arduino: 1.6.0 (Windows 8), Board: "Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"

In file included from Commands.cpp:22:0:
Repetier.h:113:27: fatal error: Configuration.h: No such file or directory
#include "Configuration.h"
^
compilation terminated.
Error compiling.

This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.

So, we did that then tried to upload again.
This is what we got this time:

Arduino: 1.6.0 (Windows 8), Board: "Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"

Build options changed, rebuilding allUsing library SPI in folder: C:\Users\user\Downloads\arduino-1.6.0-windows\arduino-1.6.0\hardware\arduino\avr\libraries\SPI C:\Users\user\Downloads\arduino-1.6.0-windows\arduino-1.6.0/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10600 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -IC:\Users\user\Downloads\arduino-1.6.0-windows\arduino-1.6.0\hardware\arduino\avr\cores\arduino -IC:\Users\user\Downloads\arduino-1.6.0-windows\arduino-1.6.0\hardware\arduino\avr\variants\mega -IC:\Users\user\Downloads\arduino-1.6.0-windows\arduino-1.6.0\hardware\arduino\avr\libraries\SPI C:\Users\user\AppData\Local\Temp\build8854710262678809301.tmp\Commands.cpp -o C:\Users\user\AppData\Local\Temp\build8854710262678809301.tmp\Commands.cpp.o In file included from C:\Users\user\AppData\Local\Temp\build8854710262678809301.tmp\Commands.cpp:22:0:
C:\Users\user\AppData\Local\Temp\build8854710262678809301.tmp\Repetier.h:113:27: fatal error: Configuration.h: No such file or directory
#include "Configuration.h"
^
compilation terminated.
Error compiling.


Does anyone know what we're doing wrong?
Thank you so much for your help.

Re: Problems uploading to board

Posted: Fri Feb 16, 2018 4:09 pm
by geneb
You can't just copy/paste like that and expect it to work. :) You need to open the Repetier.ino file from within the Arduino IDE in order for it to file all the files it needs.
g.

Re: Problems uploading to board

Posted: Wed Feb 21, 2018 10:29 am
by duchesnehelp
So I opened the Repetier.ino file without any problem (thanks for helping me figure that out!). I then went on to the next step in the manual, which was to do the test upload (File > Examples > EEPROM > eeprom_clear).
Everything seemed to be working fine and it said it was uploading, then stopped. The text said something about there being a timeout with the programmer and I'm not sure what to do to fix it.

Here's the full text:

avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer


Thank you all so much!

Re: Problems uploading to board

Posted: Wed Feb 21, 2018 9:24 pm
by rootboy
Looks like your bootloader got hosed.

https://stackoverflow.com/questions/196 ... ge-timeout

Re: Problems uploading to board

Posted: Fri Feb 23, 2018 9:25 am
by duchesnehelp
What exactly does that mean?

Re: Problems uploading to board

Posted: Mon Feb 26, 2018 9:52 am
by duchesnehelp
Never mind!!! I fixed it!! It had the wrong port (COM 3 instead of COM 4)!
I swear I changed that, though..

Re: Problems uploading to board

Posted: Mon Feb 26, 2018 12:03 pm
by Xenocrates
If you rebooted or otherwise let anything reset the com ports (Such as unplugging or resetting the board), because it's a software port, it can change. Some USB hubs/controllers at the MB level will do entertaining things. I can't do USB to serial through front panel I/O if I have my power supply connected and the SD card slot in use, because the specific USB 2 controller doesn't like having that many realtime peripherals.

But also, it happens to the best of us, and sometimes the drop-down doesn't function the first time, or an errant scroll will change it back.

Re: Problems uploading to board

Posted: Mon Feb 26, 2018 1:03 pm
by Plaft1981
rootboy wrote:Looks like your bootloader got hosed.

https://stackoverflow.com/questions/196 ... ge-timeout]
lotf of thanks! i really appreciate this as i was having same problem and it seems that you were right! thanks for the link as well! generally i appreciate all of the help i got here. was wondering if i may come back asking questions in case i would have some? thanks!

Re: Problems uploading to board

Posted: Mon Feb 26, 2018 6:30 pm
by rootboy
duchesnehelp wrote:Never mind!!! I fixed it!! It had the wrong port (COM 3 instead of COM 4)!
I swear I changed that, though..
I've been bitten by that as well. And of course, keep in touch! :)

Re: Problems uploading to board

Posted: Wed Feb 28, 2018 9:42 am
by duchesnehelp
Hello again!
I'm trying to do the initial function tests, and the Gcode terminal keeps saying that there's an error, something to do with "SD init fail"?
I'm not sure if this is something I can ignore and move on, or if I need to figure out how to fix this before I continue. I took a screenshot of the terminal if that would help.
Capture.PNG
If anyone can help me out, that would be great!

Re: Problems uploading to board

Posted: Wed Feb 28, 2018 12:19 pm
by geneb
It may say that if there's no SD card installed or the one installed is bad.

It doesn't affect the printer itself.

g.

Re: Problems uploading to board

Posted: Wed Feb 28, 2018 3:04 pm
by duchesnehelp
Hmm... Is an SD card necessary/should there be one?

Re: Problems uploading to board

Posted: Wed Feb 28, 2018 3:31 pm
by geneb
It's not required for the printer to operate,

g.

Re: Problems uploading to board

Posted: Wed Feb 28, 2018 3:52 pm
by duchesnehelp
Alright, thanks. I'll see if there is an SD card in the computer next time I'm in class.

Re: Problems uploading to board

Posted: Fri Mar 02, 2018 9:10 am
by duchesnehelp
So... I checked, and there isn't an SD card inserted anywhere in the computer. I cleaned out the slot for the SD card since it was really dusty because I thought that might be what's causing the issue.
I went into Matter Control again to open up the Gcode terminal and again it came up with the "SD init fail" error.
Should I just ignore this and move on?

Re: Problems uploading to board

Posted: Fri Mar 02, 2018 1:36 pm
by Xenocrates
The SD card in question lives on the printer. Stop worrying about it, because you're not using it to print from currently.

Re: Problems uploading to board

Posted: Mon Mar 05, 2018 10:02 am
by duchesnehelp
Haha, thanks! Alright, moving on to the next step :)