New Pi'er: Cannot get ArduBerry to work with Pi 3B


#1
  1. I have an ArduBerry v7.0. Does this work with Pi3vB?
  2. Found typo in step 3: cd Arduberry/script should be “cd ArduBerry/script”
  3. I cannot get this to work. I’ve done all the updates but cannot select Programmer to Rasberry Pi GPIO as specified in step 7.

My goal is to do stuff with Arduino and also with Python and Wolfram down the road. I hope you can help. I tried the forum, web and YouTube.

Thanks.


#2

Hi @shauncumby,

ArduBerry v7.0.will work with Pi3vB and thanks for pointing the typo to us, we have corrected it. I have few questions.

Is your Pi running on Raspbian for Robots Image from Dexter Industries or any other Image such as stock Raspbian ?
If you are running your own image,were you able to run the Install.sh? Please post a screenshot of the command line while the install.sh has finished running.

I recommend you to use our Raspbian for Robots image which we have built for our products and Arduino comes installed in it. You can either download our Raspbian for Robots image and install it following the instructions given here or you can buy a SD card with our image installed from here.

Do let us know if this helps,
-Shoban


#3

Hi Shoban,

I’ve ordered the SD card (and some other stuff).

I was running stock Raspbian as I just got the Pi3B last week and with the Arduberry from buyapi.ca. I looked at the process for downloading/installing and I hope that the SD card install will make it simple.

Attached is the requested screen shot after install.sh is run. Does it look like it should work?
Board: Arduino Uno
Port: /dev/ttyAMA0
Programmer: nothing comes up for selection

I appreciate the quick response and hope that the card arrives soon and I can try to advance my learning.

Thanks,
Shaun
Order #106494


#4

In the Raspberry Pi Configuration, what should the settings be for the ArduBerry to work?

I noticed that Serial and Remote GPIO were both on Disable.
I Enabled, then rebooted.
Then redid install.sh.

However, Port still shows /dev/ttyAMA0 and there are no options for selection under Programmer.

Shaun


#5

Hi @shauncumby,

It looks like, you are cloning the ArduBerry into a different folder. You will have to clone the ArduBerry repository inside the Desktop folder, and then run the install.sh.

Please let us know if this helps!,
-Shoban


#6

Hi Shoban,

This helped a bit as I can now see the Raspberry Pi GPIO in the Programmer list.

However, when I try Blink via upload to programmer I get an error: avrdude: Can’t find programmer id “gpio”

I’ve rebooted, have Board set to Uno, have the Configuration/Interfaces all set to “Enable”… not sure what more I can do.

Thanks.


#7

Hi @shauncumby,

It looks like there might have been an error with the installation, you can try fixing it by removing the existing ArduBerry folder using this command sudo rm -r ArduBerry and then by running the following commands on the terminal.
sudo apt-get -f install
sudo apt-get update
sudo apt-get upgrade
After this clone the ArduBerry repository into the Desktop folder and run the install.sh.
Also post a screenshot of the output that you get, while running install.sh in your reply.

-Please let us know if it helps
Shoban


#8

Hi, I also have a new RPi3 and ArduBerry. RPi3 is Raspian Jessie - standard installation. (I also have an older version of the combination, RPi2 and ArduBerry, that is working nicely.) For the new ones, I followed the installation instructions closely.
Along the way, I had to modify install.sh because folder ArduBerry is in /home/pi not home/pi/Desktop. Reading your guidance, I was in Desktop when I did the clone download, but the ArduBerry folder was created at the same level as Desktop. Had an error associated with inittab and programmers.txt. In the latter, I had the same issue in the shell script – cut out the /Desktop in the path and the error in programmers. txt went away. My research and testing says that programmers.txt is important because it has modifications to avrdude.conf.
I redid the whole process and started with
sudo apt-get -f update, install, and upgrade as you suggested. Redid the process above.
In the IDE, I can’t upload Blink. the IDE error – can’t find gpio. Checked avrdude.conf. The id = “gpio” is not there although id = “linuxgpio” is there. The pin parameters are the same.
This current version of avrdude is 6.1. In my older system, avrdude is 5.10 and id=“gpio” is in avrdude.conf. This latter configuration works through the IDE
Do I need to recompile avrdude to recognize gpio? If so, could you provide a detailed list of steps.


#9

I tried modifying avrdude.conf by entering the following:
programmer
id = “gpio”;
desc = “use sysfs interface to bitbang GPIO lines.”;
type = “linuxgpio”;
reset = 8;
sck = 11;
mosi = 10;
miso = 9;
;

Now I get a new IDE error
can’t open gpioX/direction. Permission denied.
Researching this, here is a link
https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=100913&p=700025
I am not sure what to do with the information from the link, but I wonder if the inittab errors in the install_jessie.sh script might be related to this. or, if avrdude needs to be recompiled as I have asked earlier.


#10

More yet.
I don’t know why jessie doesn’t have an inittab. I ran a test by this:
cd /etc
sudo touch inittab
sudo chmod +x inittab — not sure if this is needed

sudo reboot
cd /home/pi/ArduBerry/script
sudo ./install.sh

This procedure is now error free - not that it is correct…
Ran Arduino IDE and blink
(still using the mod to avrdude.conf in last note
same error - can’t open gpioX/direction permission denied

more research – there is a patch associated with a software race condition – I am not sure if it has been included in avrdude 6.1 – and, I am hoping that someone has been here before and knows the answer.

Relative to inittab:
https://www.raspberrypi.org/forums/viewtopic.php?f=66&t=123081
It’s functions have moved. So, my test above was interesting, but irrelevant…
But it does appear that the install_jessie.sh script needs to be updated along the way…


#11

Hi @brooke.hutt,

You will have to have the ArduBerry folder downloaded to the Desktop, for it to work properly, since the location of programmers.txt in the install script is from Desktop.

You should remove the existing ArduBerry folder from /home/pi and clone the ArduBerry folder to /home/pi/Desktop and then run the install.sh.
To do this you can refer to the steps 3,4 and 5 given here.

Can you also tell if you are able to see RaspberryPi GPIO in the Tools->Programmer of the Arduino IDE

It looks like you are using an image other than our Raspbian for Robots. Can you tell us which image you are using and is there any specific reason for using it.

Do let us know if this helps,
-Shoban


#12

Hi Shoban,
Thank you for the quick reply. The mistake was mine.
I did as you instructed and found that I was in error relative to the folder location. So I deleted ArduBerry folder in home/pi and re-did the script in Desktop. It worked without error.

sudo rm -r ArduBerry
cd Desktop
git clone https://github.com/DexterInd/ArduBerry.git
cd ArduBerry/script
sudo chmod +x install.sh
sudo ./install.sh

Note: I forgot to delete inittab from my previous test so it found the file.
Sorry for my mistake. However, when I run Arduino IDE and blink (having found the Raspberry Pi GPIO and using Upload to Programmer, it looks like a clean compile but stops with the error message:
can’t open gpioX/direction Permission denied.
If you review my post above your reply, there is some information about this error-- google avrdude 44218 for a patch. I have been trying to learn how to incorporate this patch in avrdude 6.1 but so far am unsuccessful. If you think that this patch is useful, could you provide a process for incorporation.

Here is what I have done to date:

sudo wget download.savannah.gnu.org/releases/avrdude/avrdude-6.1.tar.gz
sudo mkdir avrdude-repo-6.1
sudo tar zxvf arvdude-6.1.tar.gz -C home/pi/arvdude-repo-6.1
cd avrdude-repo-6.1/avrdude-6.1
sudo wget savannah.nongnu.org/bugs/download.php?file_id=33041
sudo cp download.php?file_id=33041 gpio_fix.patch
patch < gpio_fix.patch
sudo apt-get install bison -y
sudo apt-get install byacc -y

,/bootstrap
./configure --enable-linuxgpio
sudo make install – still has an error

If I can get through this, then I would test the IDE with blink to see if I get a clean load.
Suggestions / guidance greatly appreciated,
P.S. I am running Raspian Jessie – it was the image that came the RPi3 … no reason other than it is convenient to install from the SD card.
Brooke


#13

Hi @brooke.hutt,

It looks like you have downloaded avrdude 6.1 from a different package before.Our install script itself would add Arduino 1.6.0 and make it function properly, you wouldn’t need any other packages.
I am not sure why you get this error, as I see this error seems to be a common one with users using this package and you have rightly tried the gpio_fix.patch too.

You can either try using a fresh Jessie image and run our install script, following the instructions given here or you can download our RaspBian for Robots image and install it following the steps here. It comes with Arduino 1.6.0 pre-installed, and you do not have to install any scripts.

Please let us know if this helps,
-Shoban


#14

Hi Shoban,
I never have had a clean compile of avrdude 6.1 source code to date.
I found that I needed to install bison and flex. This reduced the number of errors in the compile.
I also was confirmed that the patch 44218 was incorporated in the linuxgpio.c source code.

So, I downloaded avrdude 6.2 and went through the same process which I will list below if someone else is interested. I installed the patch and compiled 6.2 without error.

When i rebooted the RPi3 and ran the IDE and blink, I got the same error – can’t open gpioX/direction Permission denied –

sudo apt-get install software-properties-common
sudo wget download.savannah.gnu.org/releases/avrdude/averdude-6.2.tar.gz
sudo mkdir avrdude-repo-6.2
cd avrdude-repo-6.2
sudo tar zxvf avrdude.6.2.tar.gz
cd avrdude.6.2

sudo apt-get install bison
sudo apt-get install flex

sudo wget savannah.nongnu.org/bugs/download.php?file_id=33041
sudo cp download.php?file_id=33041 gpio_fix.patch
patch < gpio_fix.patch looks like it was incorporated in linuxgpio.c

sudo ./bootstrap
sudo ./configure --enable-linux.gpio #
sudo make install

check avrdude.conf in /etc
mine has this –

id = “gpio”;
desc = “use sysfs interface to bitbang GPIO lines.”;
type = “linuxgpio”;
reset = 8;
sck = 11;
mosi = 10;
miso = 9;
;

reboot, start IDE and load blink
still has - can’t open gpioX/direction Permission denied -

I switched from alamode to Arduberry because I wanted components that seem to keep up with upgrades in RPi’s, the Arduino IDE, and Raspian releases. I don’t know why I would want to switch to Raspian for Robots – how do I know that it will be compatible with my other project software?

So, I will standby and see if anyone else has this problem and has discovered a fix.


#15

Hi @brooke.hutt,

We program the Arduberry with bitbanging from the SPI lines and we have built on the work done by Gordon here.

The last we had tested was Arduino v1.6.0 with the avrdude 5.10.We haven’t tried out avrdude v6.1 and the changelog here for 6.1, does not show any major updates that we really want for the Arduino IDE to work with avrdude.

In our image, Raspbian for Robots we have spent some time tweaking the Arduino IDE and the avrdude so that it works seamlessly.

If you wish to work on a previous version of avrdude, then our install script alone will do, you wouldn’t have to download any additional packages. However if you wish to upgrade the avrdude to recent releases, not sure if it would work for you.

-Shoban