Arduino UNO R3 + Yun Shield - Sketch Uploading

Hi all,

Would be really grateful for some help/direction as I'm bashing my head against a brick wall and because I'm a relative newbie I'm a bit overawed by the amount of articles suggesting I may have a defective unit (although that isn't my suspicion, I'm a bit disheartened as I've been at this for a number of weeks now and am on the edge of giving up). I've read a lot of articles now but running into dead ends.

Basic situation is:

  • I have deployed many sketches successfully to the UNO R3 alone, directly connected by USB to my computer.
  • The Yun is successfully configured on my network and I can ssh into the box, no issues at all.
  • Try as I might, I cannot deploy even a Blink example sketch to the UNO R3+Yun Shield combo over wi-fi via the IDE or as a compiled hex via the web interface on the Yun (both trying to upload the bootloader hex and the one without).
  • I don't really know what the right combination of board and port settings in the IDE should be, but I have tried all combinations now and none seem to work.
  • I have figured I must be trying to pass the code and some parameters via the IDE to run-avrdude and I suspect that the boards configuration in the IDE affect these parameters but I'm into advanced territory and I don't really understand how this all comes together.
  • I followed the tutorial, so have installed the jumper on the UNO R3 to bypass the serial interface.

The error I get is usually something along the lines of:

"
avrdude: AVR device not responding
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.

/usr/bin/run-avrdude: line 5: can't open /tmp/efuse: no such file
avrdude: AVR device not responding
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.

"

Config is:

  • Arduino IDE at 1.8.3.
  • OpenWRT successfully upgraded to 1.6.2 on Yun (following suggestion from other article)

Any help in terms of tracking down or diagnosing my problem would be really appreciated as I really want to learn here.

Thanks,

Ben

Can you see the YUN's IP address in the IDE ?

Better bet is to start with Ethernet as that seems a little more robust.

Did a quick vid for the CREATE IDE yesterday seems its your turn to get a quick vid so here is one I just did..

BTW this is a FULL YUn as I don't have a shield to hand.

Ethernet is a good shout thank you, I will try that. I could see the IP in the IDE and seemingly also managed a successful connection to the Serial Monitor.

But I will try Ethernet and watch your video for inspiration to see if I get better results!

My suspicion is that it is something specific to the combo of UNO and Shield but just grateful to have new avenue to try. That was staring me in the face!

Thanks Bob. I've tried this, watched the video and trying over both Wi-Fi and Ethernet produces the same result. The IDE is definitely picking up the Wi-Fi interface and correctly identifies a "Yun Shield".

The only thing I noticed that was different about your configuration in the video was the Programmer setting (I don't understand this) which I updated to be "USBTinyISP" but I don't know if this makes any practical difference. It certainly didn't in my test.

I had read an article that suggests that because I have a Yun Bridge I should be setting the Board target to be the Uno, but the code does not compile in that situation, I guess due to the absence of the right inclusions. So I think setting the as a Yun is correct.

So I'm back to where I was... does anyone have a good way of doing a healthcheck of the Yun configuration - perhaps by remote shell on the Yun side?

Actually, I appear to have got a bit further... and the difference seems to have been removing a LED that was connected to 13/GND which is really odd... but I now have a new error message:

/usr/bin/run-avrdude: line 65: can't open /tmp/efuse: no such file
avrdude: Expected signature for ATmega32U4 is 1E 95 87
Double check chip, or use -F to override this check.
avrdude: Expected signature for ATmega32U4 is 1E 95 87
Double check chip, or use -F to override this check.

I don't suppose anyone has seen this one before?

OK - think I've cracked it myself following extensive Googling. The boards.txt file in the IDE needed a new entry as follows to correct the fact that the Uno has a different chip type when using the Yun shield than the Yun has itself...

##############################################################
unoyun.name=Arduino Uno -- Dragino Yún
unoyun.upload.via_ssh=true
unoyun.vid.0=0x2341
unoyun.pid.0=0x0043
unoyun.vid.1=0x2341
unoyun.pid.1=0x0001
unoyun.upload.tool=avrdude
unoyun.upload.protocol=arduino
unoyun.upload.maximum_size=32256
unoyun.upload.maximum_data_size=2048
unoyun.upload.speed=57600
unoyun.upload.disable_flushing=true
unoyun.upload.use_1200bps_touch=true
unoyun.upload.wait_for_upload_port=true
unoyun.bootloader.tool=avrdude
unoyun.bootloader.low_fuses=0xff
unoyun.bootloader.high_fuses=0xde
unoyun.bootloader.extended_fuses=0x05
unoyun.bootloader.file=optiboot/optiboot_atmega328.hex
unoyun.bootloader.unlock_bits=0x3F
unoyun.bootloader.lock_bits=0x0F
unoyun.build.mcu=atmega328p
unoyun.build.f_cpu=16000000L
unoyun.build.board=AVR_YUN
unoyun.build.core=arduino
unoyun.build.variant=standard
##############################################################