-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Arduino IDE won't upload with shield in place #128
Comments
@JHPHELAN Arduino IDE will not upload while you have the serial cable plugged into the Arduino sheild correct. This is because that uses the same serial peripheral on the Arduino for the upload as is used by the TTL serial communication line to the Raspberry pi. The arduino Uno only has one serial peripheral so there isn't really much that can be done about that. I am thinking maybe adding a switch to the sheild to disconnect the serial Rx and Tx lines from the RPi would help though. So to upload code you would flip the switch, use the arduino IDE to flash, then flip the switch back to open communication to the RPi |
@ericjunkins ...even if the serial cable isn't connected to the Pi or anything elese? |
The cable has electronics inside it that converts signals to the USB output whether it is connected to the Pi or not. Those are messing up the serial port on the arduino trying to flash |
@ericjunkins Thanks, but I'm still confused. What I believe you mean is that the serial electronics in the shield interfere with the USB signal between the laptop and the Arduino if the shield is plugged into the Arduino. This would explain the behavior. But a switch disconnecting the Pi wouldn't help as I'm not connected to the Pi. Perhaps a switch disconnecting serial communication between the shield and the Arduino might? It is a pain to have to detach the shield every time I want to upload a revised sketch to the Arduino and risk damaging the shield. Fortunately this won't matter for running the rover as the Arduino will just have its one sketch to pass the display info from the Pi. For playing with just the Arduino and the LED display I could replace the shield with the "spaghetti farm" of jumpers between the Arduino and the LED display. |
Okay wait sorry maybe I misunderstood. You should not ever have to remove the arduino shield. I believe that the desync error is caused by having both the USB and serial cable plugged into the RPi while trying to upload. I never had any upload issues if I simply unplugged the serial cable before beginning the flashing process. Are you saying you're experiencing issues even if the serial cable is unplugged from the arduino shield? (to clarify I'm meaning the 6 pin connector that you are running serial TX and RX) |
To be clear about the upload process (i'll soon be adding this to the instruction set) the following procedure is what I did to develop that library, which I probably ended up flashing that arduino on the order of a hundred times while writing that code. Assuming that the arduino sheild is installed on arduino, the 6 pin connector is plugged into the sheild, and the control board on the other side, as well as the ribbon cable to the LED Matrix 1: Connect USB Cable from Laptop to Arduino Uno I would expect this to work on your board. Can you let me know if this is not? |
JHP Arduino: 1.8.9 (Windows 10), Board: "Arduino/Genuino Uno" CLICK ME TO EXPAND COMPILE ERROR
C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\Me\Documents\Arduino\libraries -fqbn=arduino:avr:uno -vid-pid=0X2341_0X0043 -ide-version=10809 -build-path C:\Users\Me\AppData\Local\Temp\arduino_build_926992 -warnings=default -build-cache C:\Users\Me\AppData\Local\Temp\arduino_cache_10073 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc-5.4.0-atmel3.6.1-arduino2.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude-6.3.0-arduino14.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA-1.2.1.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -verbose C:\Users\Me\Documents\Arduino\testshapes_16x32_PHELAN\testshapes_16x32_PHELAN.ino avrdude: Version 6.3-20171130
avrdude: stk500_recv(): programmer is not responding avrdude done. Thank you. Problem uploading to board. See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions. |
Okay I'm trying to figure out why this would happen. I'm assuming you have unplugged/replugged in your USB cable to the arduino after having removed the 6 pin JST connector? Here are a few images of the pcb and the schematic of the board. In the schematic we can see that the only thing that happens to the Tx/Rx lines for the serial read/write are that they run directly to the 6 pin JST connector at J5. Highlighted is the board traces of these lines. This should entirely act as though there is just a wire attached to each of them that goes nowhere. Can you do a few things to help test this? Remove the Arduino sheild from the back of the Arduino and do the following:
I never once removed the Arduino sheild after inserting it onto my arduino, and can't come up with any reason other than a short on the board to cause this issue. Doing some googling about that error it is almost entirely caused by there being something going on with the Tx/Rx pins on the arduino. Let me know if you do these and still don't have anything conclusive |
Also @JHPHELAN I edited your above comment to give it a collapsed set of text on all of the compiler and linker information of the Arduino. A nice way to have that there but not clutter up the message :) |
@ericjunkins SOLVED - hardware issue. I tested TX and RX. They were not shorted to each other and connected to the appropriate RPi and Arduino pins. However, during the initial build of the shield, I had the serial connector backwards and had to rework it. So, I rebuilt the board using one of the excess PCBs. I didn't have a spare 16 pin connector so just used naked header pins and marked the side for the key slot. Fortunately I DID have a spare 6 pin connector. JHP |
@JHPHELAN I'm using 5.0.2 If you are having KiCAD problems can you open an issue for that so we can track that? Want to make sure we don't miss something. |
The Arduino IDE won't upload if the shield is in place. It gives an avrdude synchronization error.
If the USB is disconnected, the shield removed, USB inserted, the sketch uploaded, USB unplugged, the shield replaced then USB reinserted, the sketch runs. Is this normal?
JHP
The text was updated successfully, but these errors were encountered: