Main Menu

Can't upload sketch

Started by scott216, January 01, 2019, 09:29:35 AM

scott216

I have a Moteino Mega connected to my RaspberryPi.  I've got I2C and a couple GPIO connected between the two.  I've got ground connected between the two and the 5v output on the RPi is going t Vin on Moteino.  On my Windows laptop I have the Arduino IDE running.  To upload a new sketch to the Moteino, I'm using a FTDI cable.  If I unplug the Moteino from the RPi, I can upload a sketch just fine to the Moteino.  But when the Moteino is connect to the RPi, I can't.  It tries about 10 times, then gives up.  Any ideas why this isn't working?

Felix

Quote from: scott216 on January 01, 2019, 09:29:35 AM
If I unplug the Moteino from the RPi, I can upload a sketch just fine to the Moteino.  But when the Moteino is connect to the RPi, I can't.
Any ideas why this isn't working?
The Moteino works on its own so its some kind of power issue.
Is your Laptop powered from mains? Does it make a difference if you unplug it and run on battery?
If so maybe its different grounds? Probe with a DMM between the GND of your Pi and the GND of your FTDI.
Is it mandatory you have it connected to the Pi while you program it?

scott216

Thanks.  I figured it was some kind of voltage or ground issue.  The Moteino and RPi are at my ski house and I'm working on them remotely.  If I was there I could unplug the Moteino and program it.  Next time I'm up there I'll try your suggestions. 

Felix

Ok!
BTW - You could also program the Moteino through the Pi, a bit trickier and you have to use a modded version of avrdude but it's doable.
See this guide for MightyHat, it's basically the same thing:
https://lowpowerlab.com/guide/mightyhat/programming/