SOLVED: problem uploading Arduino Sketch

The more technical aspects of Spirit, and carry-over discussion from Kickstarter updates.
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

SOLVED: problem uploading Arduino Sketch

Postby gpvillamil » Sat Feb 03, 2018 11:08 pm

Problem is solved. In the Arduino IDE, select board "Arduino Pro or Pro Mini", then processor "AtMega328P 3.3V 8Mhz" and everything works fine! Thanks to some detective work by Erik Bailey!

===========================================

I'm having a problem uploading an Arduino sketch:

Board type is set to "Arduino/Genuino Uno"

When trying to upload, I get:

Sketch uses 14130 bytes (43%) of program storage space. Maximum is 32256 bytes.
Global variables use 657 bytes (32%) of dynamic memory, leaving 1391 bytes for local variables. Maximum is 2048 bytes.
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x80
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x78
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x1e
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x78
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0xfe
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x80
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x78
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x1e
An error occurred while uploading the sketch

I can upload with board type set to "Duemilanove" and there is some functionality, but LEDs do not respond correctly (the LEDs light to all white).

The bootloader must be responding, because I've uploaded the base sketch (no function), then the demo sketch (Spirit responds to ultrasonic sensor) but the LEDs don't change color, probably because the board type is wrong.

I've tried this on Mac OS X High Sierra and Windows 7, behavior is identical.

Anything else to try?
Last edited by gpvillamil on Sun Feb 04, 2018 10:34 pm, edited 1 time in total.

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 1:02 am

You're using the Arduino IDE, correct?
----------
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 1:08 am

Yep, version 1.8.5

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 1:23 am

What programmer are you using?
----------
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 1:40 am

Just over USB. I don’t see any populated headers for another ISP.

The weird thing is that I can upload programs with the “wrong” board (duemilenove): the demo sketch mostly works but the LEDs act weird (they go to full white). I will see if I can configure the Neopixel library to work w a different board type.

I wonder if this related to power or the RPi. I tried disabling the interfaces on the Pi (SPI and I2C), and actually also tried shutting down the Pi over VNC before programming the Arduino.

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 1:42 am

Hmmm... have you tried using avrdude directly and trying to read what the board type is? It should be an ATMega328p ... so the signature coming back should be 0x1E 95 0F, I think... Let me look...
----------
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 2:10 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 2:54 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 2:58 am

Yep that is exactly what I’m seeing: all pixels white, and some functions are slow.

I thought there might be a power issue so I disconnected the wing LEDs.

What board did you select for programming?

Kevin, it would be great to at least restore the demo behaviors!

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:09 am

I don't think the problem is with the avrdude tool... if it can upload code (which it can) I bet it's how the Arduino IDE is compiling the code in the first place -- I bet there is some kind of pre-complier statement that is assuming the clock rate is twice as fast as it really is. Let me take a look at Kevin's code...
----------
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 33 guests