AVR Device not responding

Just got my Arduberry in this afternoon and ive run though the setup instructions and loaded the “blink” example, things didn’t work as expected :slight_smile:

I am getting the follow error after it compiles and tries to upload:

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

and of course nothing happens, i have even tried swapped the ATMEGA328 with one on my other arduino and its running the blink sketch that was pre programmed on it with no problems. I have the programer set right and the board as Uno. Not sure where to go from here

Thanks,
Adam

Hi Adam,
Sorry for the problems that you have faced.

Have you run the installation script (https://github.com/DexterInd/ArduBerry/blob/master/script/install.sh) and did it finish properly. If everything is installed properly, can you run avrdude -c gpio -p m328p on the terminal with the Arduberry connected to the Raspberry Pi and post here what you see. Also, run this script https://github.com/DexterInd/BrickPi/blob/master/Setup%20Files/Support/troubleshooting.sh and please post the result that you get in error_log.txt.

One more thing, can you visually check if all the chips are properly soldered to the board and post some good pictures of you setup.

-Karan

The result to avrdude -c gpio -p m328p is as follows:

pi@raspberrypi ~ $ avrdude -c gpio -p m328p

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

avrdude done.  Thank you.

The result for the troubleshooting.sh script is as follows:pi@raspberrypi ~ $ sudo bash ts.sh

===================================================
Welcome to Dexter Industries troubleshooting script
===================================================
This may take a few minutes, please be patient
Press Enter to start...

Check for dependencies
Checking Serial for BrickPi
Checking Hardware revision
Read pins
Check I2C
Check the /dev folder
Check BrickPiStatus
python: can't open file 'ser.py': [Errno 2] No such file or directory

Log File Generated

Contact Email:

Please enter your problem description. Press Enter to end

python: can't open file 'form_fill.py': [Errno 2] No such file or directory
Error logs sent successfully
Your Problem ID is 126 . Please post the Problem ID along with the problem description to the Dexter Industries Forums so that we can get back to you with the solution as soon as possible.

Press Enter to exit

Thanks much, if there is anything else you need, let me know.
Adam

Sorry, forgot the add the error log output:

troubleshooting_script_v1
Check for dependencies
======================
python 2.7.3-4+deb7u1 install ok installed
python-pip 1.1-3 install ok installed
git 1:1.7.10.4-1+wheezy1+rpi2 install ok installed
libi2c-dev 3.1.0-2 install ok installed
python-serial 2.5-2.1 install ok installed
python-rpi.gpio 0.5.5-1 install ok installed
i2c-tools 3.1.0-2 install ok installed
python-smbus 3.1.0-2 install ok installed
arduino 1:1.0.1+dfsg-7 install ok installed
minicom 2.6.1-1 install ok installed
scratch 1.4.20131203-2 install ok installed

wiringPi Found
wiringPi Found
I2C already removed from blacklist
SPI already removed from blacklist

Check for addition in /modules
==============================
I2C-dev already there
i2c-bcm2708 already there
spi-dev already there

Setup for Serial for BrickPi
============================
Clock speed not Configured(ERR)
Serial Port Enabled
Serial Port Login Already Disabled

Hardware revision
=================
gpio version: 2.15
Copyright (c) 2012-2014 Gordon Henderson
This is free software with ABSOLUTELY NO WARRANTY.
For details type: gpio -warranty

Raspberry Pi Details:
  Type: Model B, Revision: 2, Memory: 512MB, Maker: Sony

Read pins
=========
+----------+-Rev2-+------+--------+------+-------+
| wiringPi | GPIO | Phys | Name   | Mode | Value |
+----------+------+------+--------+------+-------+
|      0   |  17  |  11  | GPIO 0 | IN   | Low   |
|      1   |  18  |  12  | GPIO 1 | IN   | Low   |
|      2   |  27  |  13  | GPIO 2 | IN   | Low   |
|      3   |  22  |  15  | GPIO 3 | IN   | Low   |
|      4   |  23  |  16  | GPIO 4 | IN   | Low   |
|      5   |  24  |  18  | GPIO 5 | IN   | Low   |
|      6   |  25  |  22  | GPIO 6 | IN   | Low   |
|      7   |   4  |   7  | GPIO 7 | IN   | Low   |
|      8   |   2  |   3  | SDA    | ALT0 | High  |
|      9   |   3  |   5  | SCL    | ALT0 | High  |
|     10   |   8  |  24  | CE0    | OUT  | High  |
|     11   |   7  |  26  | CE1    | ALT0 | High  |
|     12   |  10  |  19  | MOSI   | OUT  | Low   |
|     13   |   9  |  21  | MISO   | IN   | High  |
|     14   |  11  |  23  | SCLK   | OUT  | Low   |
"error_log.txt" 111 lines, 3684 characters

Hi,
The troubleshooting output does not show any apparent problem. Can you post some high resolution photographs of the your setup. It would be great if you could try out the Dexter Industries Flavor of Raspbian from here: http://sourceforge.net/projects/dexterindustriesraspbianflavor/files/latest/download?source=files .

Please let me know if that also does not work out for you.

Sorry for all the troubles.
-Karan

Was this issue ever resolved? My Arduberry had been working fine and then all of a sudden, I began to have the same issue as above. I tried with a new Dexter Industries Raspbian image and still same error.

Any help would be appreciated.

Steve

Hi Steve,
Sorry for the troubles. Can you try running avrdude -c gpio -p m328p and post the output you get from it. Can you tell more about the setup you were using that before the Arduberry stopped responding. Did you have any sensors or shields connected to the Arduberry?

Also, do you have a spare Arduino or an ISP programmer lying around. That can help a lot to nail down the problem.

-Karan

I am also getting this. Was working fine with a BLINK style demo, but when I uploaded a new set of code it went into this error mode.

The previous code is still running (like I said, a BLINK style demo and lights are still blinking). No shields connected to Arduberry, just some LEDS off of 4 output ports (13, 12, etc.) for initially testing the blink style demo (which worked–blinked 4 LEDS).

pi@home ~ $ avrdude -c gpio -p m328p

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

avrdude done. Thank you.

Rebooted Raspberry, tried again to upload, but no joy. Previous code still running (lights blinking in the pattern set before).

Hi,
If the LED’s are connected to the pins 10-13, can you remove them and try again. Those pins are the ones used for programming so there might be some interference.

Let me know if it still does not work.
-Karan

Ran the troubleshooting.sh and attached the error log as well. If you need anything else let me know. WHile I have other Arduinos (that work) and other Raspberry Pis (that work) I only have the one Arduberry and Pi attached. Setting up another would be easy (as long as I use the same OS image/SD card).

The LEDS are attached to 4, 7, 8, 12, and 13

Should I be using different ones? Which 5 I/O pins are available? I assumed sine your example used 13 that this was open. If I can’t use 12 & 13 I need two others (2 & 3 perhaps?)

OK, disconnecting the LEDs from 12 and 13 and then uploading the modified BLINK to use ONLY pin 4:

int led = 4;

works.

However, I will need to use 5 digital outputs… which 5 would be the ones to use? I assume 4, 7, 8 are OK, but what should I use in place of 12 & 13?

OK, I have moved the I/O to 2, 3, 4, 7, 8 and that is happy. Might want a warning about 10-13 :slight_smile:

Sorry about the problems that you had to face. We’ll document it ASAP. Thanks for letting us know.

Sorry to bump this post but I have the same problem than Karan :
Fresh Raspberry install (Raspbian and Arduberry installed from script : blink sketch fail (see below). Next I tried your Wheezy img : idem
avrdude -c gpio -p m328p gives

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

avrdude done.  Thank you.

avrdude -c gpio -p m328p -F gives

avrdude: AVR device not responding
avrdude: initialization failed, rc=-1
avrdude: AVR device initialized and ready to accept instructions
avrdude: Device signature = 0x000000
avrdude: Yikes! Invalid device signature
avrdude: Expected signature for ATMEGA328P is 1E 95 0F 
avrdude done.  Thank you.

And troubleshooting script gives :

troubleshooting_script_v1
Check for dependencies
======================
python 2.7.3-4+deb7u1 install ok installed
python-pip 1.1-3 install ok installed
git 1:1.7.10.4-1+wheezy1+rpi2 install ok installed
libi2c-dev 3.1.0-2 install ok installed
python-serial 2.5-2.1 install ok installed
python-rpi.gpio 0.5.7-1 install ok installed
i2c-tools 3.1.0-2 install ok installed
python-smbus 3.1.0-2 install ok installed
arduino 1:1.0.1+dfsg-7 install ok installed
minicom 2.6.1-1 install ok installed
scratch 1.4.20131203-2 install ok installed

wiringPi Found
wiringPi Found
I2C already removed from blacklist
SPI already removed from blacklist

Check for addition in /modules
==============================
I2C-dev already there
i2c-bcm2708 already there
spi-dev already there

Setup for Serial for BrickPi
============================
Clock speed Configured
Serial Port Enabled
Serial Port Login Already Disabled

Hardware revision
=================
gpio version: 2.20
Copyright (c) 2012-2014 Gordon Henderson
This is free software with ABSOLUTELY NO WARRANTY.
For details type: gpio -warranty

Raspberry Pi Details:
  Type: Model B, Revision: 2, Memory: 512MB, Maker: Sony 

Read pins
=========
 +-----+-----+---------+------+---+-Model B2-+---+------+---------+-----+-----+
 | BCM | wPi |   Name  | Mode | V | Physical | V | Mode | Name    | wPi | BCM |
 +-----+-----+---------+------+---+----++----+---+------+---------+-----+-----+
 |     |     |    3.3v |      |   |  1 || 2  |   |      | 5v      |     |     |
 |   2 |   8 |   SDA.1 | ALT0 | 1 |  3 || 4  |   |      | 5V      |     |     |
 |   3 |   9 |   SCL.1 | ALT0 | 1 |  5 || 6  |   |      | 0v      |     |     |
 |   4 |   7 | GPIO. 7 |   IN | 0 |  7 || 8  | 1 | ALT0 | TxD     | 15  | 14  |
 |     |     |      0v |      |   |  9 || 10 | 1 | ALT0 | RxD     | 16  | 15  |
 |  17 |   0 | GPIO. 0 |   IN | 0 | 11 || 12 | 0 | IN   | GPIO. 1 | 1   | 18  |
 |  27 |   2 | GPIO. 2 |   IN | 0 | 13 || 14 |   |      | 0v      |     |     |
 |  22 |   3 | GPIO. 3 |   IN | 0 | 15 || 16 | 0 | IN   | GPIO. 4 | 4   | 23  |
 |     |     |    3.3v |      |   | 17 || 18 | 0 | IN   | GPIO. 5 | 5   | 24  |
 |  10 |  12 |    MOSI |  OUT | 0 | 19 || 20 |   |      | 0v      |     |     |
 |   9 |  13 |    MISO |   IN | 0 | 21 || 22 | 0 | IN   | GPIO. 6 | 6   | 25  |
 |  11 |  14 |    SCLK |  OUT | 0 | 23 || 24 | 1 | OUT  | CE0     | 10  | 8   |
 |     |     |      0v |      |   | 25 || 26 | 1 | ALT0 | CE1     | 11  | 7   |
 +-----+-----+---------+------+---+----++----+---+------+---------+-----+-----+
 |  28 |  17 | GPIO.17 |   IN | 0 | 51 || 52 | 0 | IN   | GPIO.18 | 18  | 29  |
 |  30 |  19 | GPIO.19 |   IN | 0 | 53 || 54 | 0 | IN   | GPIO.20 | 20  | 31  |
 +-----+-----+---------+------+---+----++----+---+------+---------+-----+-----+
 | BCM | wPi |   Name  | Mode | V | Physical | V | Mode | Name    | wPi | BCM |
 +-----+-----+---------+------+---+-Model B2-+---+------+---------+-----+-----+

Check I2C
=========
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- 04 -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- UU -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --                         

Check the /dev folder
=====================
i2c-1
spidev0.0
spidev0.1
ttyAMA0

============
=USER STATS=
============
BrickPi Found
Arduberry Found
grovePi Found
GoPiGo Not Found

BrickPiStatus
=============

BrickPi Not Found (ERR)

Help !!!

Hi,
What all do you have connected to the Raspberry Pi and can you try running sudo avrdude -c gpio -p m328p.

Also when uploading the code from the Arduino IDE, are you using the Upload using Programmer option?

-Karan

I only have raspberry and arduberry stacked and led with resistor to test blink sketch.
sudo avrdude -c gpio -p m328p gives


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

avrdude done.  Thank you.

And I upload the blink sketch using programmer option

Are both the LED’s solid green when you power the Arduberry and can you visually check if everything looks to be soldered properly and would it be possible for you to post a high res photos of the Arduberry top side and one of your setup.

Sorry for all the troubles.

-Karan

Ok !! I resoldered a pin on the socket, seems to solve the problem, so I can blink now ! :wink:

Thank you !

Sorry for all the troubles and great to hear that it’s working for you.

-Karan