SOLVED: problem uploading Arduino Sketch

The more technical aspects of Spirit, and carry-over discussion from Kickstarter updates.
User avatar
esba1ley
Posts: 58
Joined: Sun Jan 01, 2017 2:15 am
Location: Pasadena, CA
Contact:

Re: problem uploading Arduino Sketch

Postby esba1ley » Sun Feb 04, 2018 4:24 am

----------
Erik S. Bailey
Entry, Descent, and Landing Aerospace Engineer
Maker, and Musician
SpiritRover Kickstarter Backer #460

gpvillamil
Posts: 75
Joined: Fri Jan 26, 2018 5:03 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: problem uploading Arduino Sketch

Postby gpvillamil » Sun Feb 04, 2018 4:26 am

Perhaps Kevin changed the Ringowire libraries for Spirit, but we are still using the old ones?

All my other libraries are current and working.

gpvillamil
Posts: 75
Joined: Fri Jan 26, 2018 5:03 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: problem uploading Arduino Sketch

Postby gpvillamil » Sun Feb 04, 2018 4:33 am


User avatar
esba1ley
Posts: 58
Joined: Sun Jan 01, 2017 2:15 am
Location: Pasadena, CA
Contact:

Re: problem uploading Arduino Sketch

Postby esba1ley » Sun Feb 04, 2018 4:50 am

----------
Erik S. Bailey
Entry, Descent, and Landing Aerospace Engineer
Maker, and Musician
SpiritRover Kickstarter Backer #460

User avatar
esba1ley
Posts: 58
Joined: Sun Jan 01, 2017 2:15 am
Location: Pasadena, CA
Contact:

Re: problem uploading Arduino Sketch

Postby esba1ley » Sun Feb 04, 2018 5:02 am

See this thread:

https://forum.arduino.cc/index.php?topic=71580.0

BEFORE WE DO ANYTHING:

If we get this wrong, we can "brick" the board...

Kevin: What should the fuses be so we can reset them?

-Erik
----------
Erik S. Bailey
Entry, Descent, and Landing Aerospace Engineer
Maker, and Musician
SpiritRover Kickstarter Backer #460

gpvillamil
Posts: 75
Joined: Fri Jan 26, 2018 5:03 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: problem uploading Arduino Sketch

Postby gpvillamil » Sun Feb 04, 2018 12:03 pm

I don’t think you can change the fuses when uploading via USB using the IDE... The thread discusses using an ISP.

Though it does look like a timing issue, and the fuses are wrong for an Uno. Perhaps Kevin used an ISP to program the boards, and used non standard fuse settings?

In fact I’m fairly certain this is what happened: an ISP was used to program the boards, because this would let you burn the bootloader and demo sketch at the same time. However the fuses that would let the IDE recognize it as an Uno board were not set (eg enable full USB vs serial over USB), so we are not able to upload correctly configured code.

Easy enough to fix w an ISP but I’d like some info on where to hook it up.

gpvillamil
Posts: 75
Joined: Fri Jan 26, 2018 5:03 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: problem uploading Arduino Sketch

Postby gpvillamil » Sun Feb 04, 2018 3:03 pm

Don’t even need an ISP, the RPi GPIO pins are already connected to the Arduino. Just need the pin assignments.

https://learn.adafruit.com/program-an-a ... s/overview

gpvillamil
Posts: 75
Joined: Fri Jan 26, 2018 5:03 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: problem uploading Arduino Sketch

Postby gpvillamil » Sun Feb 04, 2018 4:34 pm


gpvillamil
Posts: 75
Joined: Fri Jan 26, 2018 5:03 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: problem uploading Arduino Sketch

Postby gpvillamil » Sun Feb 04, 2018 4:52 pm


User avatar
esba1ley
Posts: 58
Joined: Sun Jan 01, 2017 2:15 am
Location: Pasadena, CA
Contact:

Re: problem uploading Arduino Sketch

Postby esba1ley » Sun Feb 04, 2018 6:58 pm

I GOT IT!

SO it turns out by close inspection, it looks like the clock crystal next to the ATMega328p was 8MHz... so... by comparison I started looking at "which adruino boards have an ATMega328p, but have an 8MHz crystal, not a 16MHz crystal"... lo and behold, the Magical Arduino IDE settings for uplaod are:

Board: "Arduino Pro or Pro Mini"
Processor: "ATMega328 (3.3V, 8Hz)"
Programmer: "ArduinoISP"

By using these settings, I was able to build and re-burn the pre-loaded Demo code from PlumGeek's site, and I get proper behavior of the NeoPixels.

Yaaaaaay!

I think the reason we're not seeing the fuse values properly is that we're using a bootloader-enabled way of flashing the sketches on to the chip -- had we connected via the ISP header, we'd have both visibility (and control) of that.

I'm so glad we didn't have to head down that road... even if we had an ISP programmer, it would have been possible to get the chip into a configuration where we'd have to use a High Voltage Parallel/Serial programmer to fix the issue... and I was hoping we weren't staring down the barrel of needing that. Whew!

So, based on the fact that I fixed this via the proper IDE settings, my original hunch that there's something in the build process that sets what the processor speed is for internal variables seems to be correct.

Moral of the story: Use the above settings when using the Arduino IDE to program the board.

Now: if we could just get the proper configuration for the on-board RasPi to program the arduino, that will make us completely self-contained and not reliant on an external computer at all for development!
Last edited by esba1ley on Sun Feb 04, 2018 7:24 pm, edited 2 times in total.
----------
Erik S. Bailey
Entry, Descent, and Landing Aerospace Engineer
Maker, and Musician
SpiritRover Kickstarter Backer #460


[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Who is online

Users browsing this forum: No registered users and 19 guests