[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 574: sizeof(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 630: sizeof(): Parameter must be an array or an object that implements Countable
Plum Geek Forum • Base sketch won't upload
Page 1 of 2

Base sketch won't upload

Posted: Sat Feb 10, 2018 6:35 pm
by Bastian
Hi,

I idownloaded CDM21216_Setup.exe from the site and installed the usb driver.
Halas, when I try to upload the Spirit_BaseSketch_PiControl_Rev01.ino, I get the notorious averdude stk500_recv() error:
----------------------------------------------------------------------------------------------------------------------
Arduino: 1.6.9 (Windows 10), Board:"Arduino/Genuino Uno"
De schets gebruikt 7.714 bytes (23%) programma-opslagruimte. Maximum is 32.256 bytes.
Globale variabelen gebruiken 469 bytes (22%) van het dynamisch geheugen. Resteren 1.579 bytes voor lokale variabelen. Maximum is 2.048 bytes.
avrdude: Version 6.0.1, compiled on Apr 15 2015 at 19:59:58
Using Port : COM4
Using Programmer : arduino
Overriding Baud Rate : 115200
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0xc3
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0xc3
avrdude done. Thank you.
-----------------------------------------------------------------------------------------------------------------------------
It’s the first time since assembly that I tried to upload a sketch (I was waiting for the PI-interface).

As mentioned in other posts and the Ringo & Wink pages, I surely tried the Pro/pro-mini versions 8Mhz and 16 Mhz and a lot of the other Arduino configurations, but all with the same result. And of course several re-installs of the usb driver.

‘ Years ago’ ;-) I could solve this issue by using another Arduino as programmer. I don’t know how I could manage this on the Spirit board (just a USB connector).
Does anyone know a workaround?

Re: Base sketch won't upload

Posted: Sat Feb 10, 2018 9:47 pm
by gpvillamil
Set the board type to “Arduino Pro or Pro Mini” and the processor type to “ATMega328p 3.3v 8mhz”

Re: Base sketch won't upload

Posted: Sat Feb 10, 2018 10:51 pm
by Bastian
ThnX for your answer. this question just contains some output of the "UNO-trial" I tried the other boards and processors extensively, every time reinstalling the driver as well. Tried a newer version of the driver (CDM21228). Halas nothing works. I'll wait for some time for answers and probably dismantle the Pi and leave the rest of SPirit for what it is for me. ;-(

Re: Base sketch won't upload

Posted: Sun Feb 11, 2018 12:34 am
by gpvillamil
Update to Arduino 1.8.5

Re: Base sketch won't upload

Posted: Sun Feb 11, 2018 8:17 pm
by Bastian
Good suggestion to upgrade the ide: it comes with the adafruit usb driver. But unfortunately: ik keep getting the uploader error: avrdude: stk500_recv(): programmer is not responding, avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x96.

I think I now tried all possible combinations of boards, drivers and ide's (I usualy work with Visual Studio). I know how to burn a sketch using another Arduino as programmer, but there are no pins on the spirit board to connect it to. The demo sketch produces strange I2C values (see other problems) and won't work with spirit_core.py, So it feels as a dead end street. Any suggestion is more than welcome!

Re: Base sketch won't upload

Posted: Sun Feb 11, 2018 9:03 pm
by gpvillamil
Did you also select processor type, not just board?

Arduino pro w atmega328p 3.3v is working for me w MacOs, Windows and Linux.

Re: Base sketch won't upload

Posted: Sun Feb 11, 2018 9:07 pm
by esba1ley
Bastian:

See this thread:

viewtopic.php?f=18&t=7897

But the bottom line is I got it work with the Arduino IDE, with these settings in the pull-down menus:

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

Are you using avrdude outside of the IDE? I can sleuth down what the settings should be for that command line tool...

Re: Base sketch won't upload

Posted: Sun Feb 11, 2018 9:47 pm
by Bastian
Yep I used exactly those params. I also tried Arduino duemilanove as board for this board has a special usb virtual usb programmer. Out of pure boredom I also tried every other arduino board/processor combination. Useless of course, but just to exclude possibilities. Years ago the small Dagu boards also used a virtual usb and produced the same error. Then using a second arduino as programmer was the only way to get some sketch loaded.

Without the ability to load a sketch I'm stuck with the buggy I2C behaviour. Reducing the I2C speed to 100K didn't work (btw: 400K and 1M didn't work as well). Every python script that requests info from the sensors (lightsense, rangefinder, voltage) gets FF (i.e.: [255,255,255,255,255] Length of the list depends on the request and I2C speed)

I'll set spirit aside for a while now. ALthough cute, at this point for me it's a rather restricted toy with bugs. I'll spend my scarse free time on one of my other hobby projects: a sort of rover with a rocker-bogie dispension, location and mapping based on Lidar Lite pointcloud, IMU data and openCV deep learning object tracking.

Re: Base sketch won't upload

Posted: Sun Feb 11, 2018 10:18 pm
by esba1ley
That's really odd... I've programmed many AVR uCs, and avrdude usually works, provided that the fuses didn't get horked up somehow. (Then you HAVE to do an ISP connection, or worse, a dedicated chip programmer).

Just so we can be sure we're not missing something that seems obvious to you, but isn't to us, what is your specific setup? Is it possible that by loading another non-Arduino driver for USB that you've mucked something up on the Windows side? Admittedly, I'm not a Windows expert (Linux and MacOS only spoken here...) but I defer to those who are.

Can anyone else help out Bastian here?

Re: Base sketch won't upload

Posted: Mon Feb 12, 2018 1:25 am
by gpvillamil
Yeah, what Erik says.

Try removing any non-Arduino drivers, and do a clean install of the Arduino IDE. Verify that you are using the correct COM port. (Open the Device Manager, plug in the the rover, and see which COM port appears.)