Cannot calibrate, toggles between connection on port com3, and connection timed out

Anyone have a suggestion on how @Tanker51 can test out the connectivity to the arduino outside of GC? Will the arduino IDE report connect/disconnect issues over time? He says it comes and goes at a cadence of approximately 1 second. He says he managed to upload the firmware, but GC isn’t acting reliably. (He’s also hit his post limit for the day)

Hmmm that error usually means that GC isn’t recieving position information from the machine. It could be caused by the firmware not being on the Arduino or a bad USB connection or many other things.

If uploading the firmware went well that is a good sign.

What COM port did you use when uploading the firmware to the Arduino?

a connect/disconnect cycle indicates that there are multiple applications
fighting for the serial port.

check that the arduino software is disconnected (or shut down) so that nothing
else is fighting for the serial port.

1 Like

@madgrizzle

In this thread - I set Gary up in the IDE to run a loop test for 30 minutes looking for a disconnection. This is a way to test outside GC.

Thank you

1 Like

I tried this, clicked on the magnifying glass, no numbers show up at all.

I tried this, clicked on the magnifying glass and there are no numbers.

OK, Here is what I would start with. If you reboot the PC. Connect the Arduino with a USB cable. Do you see an LED on the Arduino with it just plugged into the USB. Your 12V power should be disconnected for this. In the Arduino IDE - Tools ->Ports what port are you connecting to? Under Files ->Examples-> Basic select Blink. Then try Uploading it. The on board LED should blink if it’s successful.

Give us some feed back on these steps.

Thank you

ok, I am connected to com port 3, when I uploaded blink, an amber light inside starting blinking continually

3 Likes

That is excellent news! That means that all is well with the Arduino itself.

Next let’s try to get it to send back information from the firmware. After uploading the firmware if you click the magnifying glass in the upper right corner and change the baud rate at the bottom of that window to 57600 you should see the machine reporting it’s position. What do you see there?

1 Like

OK now lets try this -

In the Arduino IDE go to files -> examples->basic->AnalogReadSerial

Then upload this file to your Arduino by clicking the right arrow icon at the top of the IDE program next to the check mark.

Once it finishes uploading click the square in the Upper right corner as shown in the picture below.

This will open the terminal window and should display a random group of numbers. If you are not seeing the numbers check the communication speed is 9600. This is shown in the lower right of the terminal window. It has a pull down if you need to change it to 9600 baud.

The goal is to get the window scrolling numbers.

Tell us what happens.

Thank you

ok, yes the window is scrolling numbers now

3 Likes

OK we are doing pretty good, this means we have a steady communication with your Controller over the Arduino IDE. Next unplug the usb cable from the PC. Carefully plug the 12v power into the shield. Make sure it is in the Maslow shield as the Arduino has a similar plug we don’t want to use. Then plug the USB back in and check you can get the Window with numbers again. Be sure to check the comport in the menu again. Windows will sometimes increments the number to something like com4. Once you have the Analog Read Serial test working with everything plugged in you are ready to try the Maslow Firmware again. I’m going to link you to those steps a few lines down. Once you you have uploaded the firmware it is important to make sure you close the Arduino IDE. If it is left open a battle to control the same port will take place between Ground Control and the Arduino IDE. Ok Proceed to these steps, if you have a problem let us know here.

FYI - I added this to the Firmware Setup in the Wiki

Great Job! Make sure you close the Arduino IDE before proceeding.”

Thank you

1 Like

FYI - because of our post at the same time I just saw your post when scrolling back.

Thank you

ok, the analog read serial test is working with everything plugged in

2 Likes

if you unplug the USB cable while something still has the com port open, the old
com port doesn’t get removed, so when you plug it in again, it gets a new
number.

If you shut down everything that uses the com port before you unplug the cable,
and give it a few seconds to recognize that you’ve unplugged it and destroy the
port, it should re-use the number when you plug it back in.

1 Like

Ok, I just went through the steps, closed the arduino ide after uploading and opened ground control. A message popped up saying “unable to find valid machine position for chain lengths 0.00, 0.00. Please calibrate chain lengths” so I am going to try again to calibrate the machine. Thank you so much!!!

3 Likes

Your most welcome. I’m happy to help where I can. As a community we can do anything together.

Thank you

1 Like

Out of curiosity, was it just running that analog serial read test that fixed it? I didn’t do anything different today other than that. Also, do I have to “upload” from arduino and imput the port number, board type, etc every time I want to use the machine?

Thank goodness no :grin:…from now on GC will connect automatically as soon as it starts up. You will only need upload from arduino when you want to update the firmware version.

2 Likes

Thanks guys you just solved my issue today too.

3 Likes