spaceman5
Posts: 55
Joined: Sun Aug 25, 2019 5:26 am

Arduino IDE on Raspberry Pi Zero W

Mon Sep 09, 2019 6:27 am

Hi all


I ordered RPi Zero W and Zero v1.3, and they are on their way.


I am curious to ask:
Does the Arduino IDE come preinstalled on the Raspbian image that we download from this URL?:
https://www.raspberrypi.org/downloads/raspbian/


If it's not preinstalled already, can the Arduino IDE be installed and run well on Raspbian?
(does it matter if it's RPi Zero, or RPi 4, etc? or if it runs well on one it runs well on all RPi boards?)


I found this on Arduino's Download page:

Image
https://www.arduino.cc/en/Main/Software


I hope there are people here who tried it and can say if it works well..


Thank you all

fruitoftheloom
Posts: 20676
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Arduino IDE on Raspberry Pi Zero W

Mon Sep 09, 2019 8:39 am

spaceman5 wrote:
Mon Sep 09, 2019 6:27 am
Hi all


I ordered RPi Zero W and Zero v1.3, and they are on their way.


I am curious to ask:
Does the Arduino IDE come preinstalled on the Raspbian image that we download from this URL?:
https://www.raspberrypi.org/downloads/raspbian/


If it's not preinstalled already, can the Arduino IDE be installed and run well on Raspbian?
(does it matter if it's RPi Zero, or RPi 4, etc? or if it runs well on one it runs well on all RPi boards?)


I found this on Arduino's Download page:


I hope there are people here who tried it and can say if it works well..


Thank you all

Raspbian Buster

Code: Select all

sudo apt update
sudo apt install arduino
Retired disgracefully.....

User avatar
davidcoton
Posts: 4123
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK

Re: Arduino IDE on Raspberry Pi Zero W

Mon Sep 09, 2019 9:23 am

What fotl said.

If that fails (it should not), remember the Zero is 32 bits, not 64.
Signature retired

spaceman5
Posts: 55
Joined: Sun Aug 25, 2019 5:26 am

Re: Arduino IDE on Raspberry Pi Zero W

Mon Sep 09, 2019 9:27 am

Thank you very much fruitoftheloom.


You wrote Raspbian Buster,
only Buster? or Raspbian in general - all versions before it?
fruitoftheloom wrote:
Mon Sep 09, 2019 8:39 am

Code: Select all

sudo apt update
sudo apt install arduino
Thank you for that


davidcoton wrote: If that fails (it should not), remember the Zero is 32 bits, not 64.
Oh..
Didn't know that the Zero and Zero W are 32bit SoCs..
Thanks

User avatar
rpdom
Posts: 15168
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Arduino IDE on Raspberry Pi Zero W

Mon Sep 09, 2019 9:34 am

spaceman5 wrote:
Mon Sep 09, 2019 9:27 am
Thank you very much fruitoftheloom.


You wrote Raspbian Buster,
only Buster? or Raspbian in general - all versions before it?
Earlier versions of Raspbian will have the arduino package too, but older versions of it.

Generally it is recommended that you run Buster to use the most recent code available.

spaceman5
Posts: 55
Joined: Sun Aug 25, 2019 5:26 am

Re: Arduino IDE on Raspberry Pi Zero W

Mon Sep 09, 2019 9:39 am

I see.

BTW, this will be a GUI IDE right?
And not just a Command Line compiler..
Last edited by spaceman5 on Mon Sep 09, 2019 11:52 am, edited 1 time in total.

User avatar
Gavinmc42
Posts: 3714
Joined: Wed Aug 28, 2013 3:31 am

Re: Arduino IDE on Raspberry Pi Zero W

Mon Sep 09, 2019 10:16 am

Arduino IDE ARM 64bit runs well on Gentoo64 and Arduino ARM 32 on Buster 32 on Pi4's.

Is there a reason you want it to run on Zero's?
I ran it years ago on a B+, that's slower than a Zero.
Raspbian Wheezy I think back then.
Used it on Stretch and 3B's.

And yep that 64bit version won't run on Zero's or another BCM2835 SoC Pi's.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

hippy
Posts: 5928
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: Arduino IDE on Raspberry Pi Zero W

Mon Sep 09, 2019 10:27 am

fruitoftheloom wrote:
Mon Sep 09, 2019 8:39 am

Code: Select all

sudo apt update
sudo apt install arduino
As I keep saying every time you post that - don't do that; it will install an ancient version of the Arduino IDE.

Instead -

Code: Select all

cd ~
wget https://downloads.arduino.cc/arduino-1.8.9-linuxarm.tar.xz
tar -xvf arduino-1.8.9-linuxarm.tar.xz
cd arduino-1.8.9
sudo ./install.sh
From the Pi desktop; select the Start Menu, Programming, and click on the Arduino IDE option.

User avatar
neilgl
Posts: 947
Joined: Sun Jan 26, 2014 8:36 pm
Location: Near Aston Martin factory

Re: Arduino IDE on Raspberry Pi Zero W

Mon Sep 09, 2019 11:19 am

It might be tricky on a pizero as it only has one microUSB port. So you may need an additional USB powered hub. And a miniHDMI to HDMI adapter.

SueGeo
Posts: 17
Joined: Mon Jul 08, 2019 1:03 am

Re: Arduino IDE on Raspberry Pi Zero W

Mon Sep 09, 2019 12:01 pm

spaceman5 wrote:
Mon Sep 09, 2019 9:39 am
I see.

BTW, this will be a GUI IDE right?
And not just a Command Line compiler..
Yes, GUI. It's working fine on my 3b+.

spaceman5
Posts: 55
Joined: Sun Aug 25, 2019 5:26 am

Re: Arduino IDE on Raspberry Pi Zero W

Mon Sep 09, 2019 12:06 pm

hippy wrote:
Mon Sep 09, 2019 10:27 am
Don't do that; it will install an ancient version of the Arduino IDE.

Instead -

Code: Select all

cd ~
wget https://downloads.arduino.cc/arduino-1.8.9-linuxarm.tar.xz
tar -xvf arduino-1.8.9-linuxarm.tar.xz
cd arduino-1.8.9
sudo ./install.sh
From the Pi desktop; select the Start Menu, Programming, and click on the Arduino IDE option.
Oh, Ok then..
Thank you


SueGeo wrote:
Mon Sep 09, 2019 12:01 pm
Yes, GUI. It's working fine on my 3b+.
Great


neilgl wrote: It might be tricky on a pi zero, as it only has one microUSB port.
So you may need an additional USB powered hub. And a miniHDMI to HDMI adapter.
Actually If you connect to your Pi Zero from another computer (e.g. your Desktop computer) using VNC, then you don't need the HDMI cable..

Regarding Powered Hub, I think it depends on what you do with the Arduino..
If the Arduino board and surrounding components that you connect to it consume little current (e.g. less than 100mA),
I believe the RPi Zero's USB should handle it well..
(probably upto 500mA, like the USB Standard, I assume)


Gavinmc42 wrote: Is there a reason you want it to run on Zero's?
I ran it years ago on a B+, that's slower than a Zero.
Well, I don't know how slow it will be yet,
the Zero (and Zero W) have an advantage of being small, and not require any fan on the SoC..
(I will put a heatsink of course),
that's why I will try with the Zero W..


If it's slow then I'll move to another board.. (and probably buy a big heatsink and a fan)
Last edited by spaceman5 on Mon Sep 09, 2019 1:28 pm, edited 1 time in total.

hippy
Posts: 5928
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: Arduino IDE on Raspberry Pi Zero W

Mon Sep 09, 2019 1:51 pm

SueGeo wrote:
Mon Sep 09, 2019 12:01 pm
spaceman5 wrote:
Mon Sep 09, 2019 9:39 am
I see.

BTW, this will be a GUI IDE right?
And not just a Command Line compiler..
Yes, GUI. It's working fine on my 3b+.
I have just tested the 'download and install' 1.8.9 version on a Pi Zero W running Buster, using the instructions provided earlier.

It is quite slow, rather laggy, but does seem to work.

spaceman5
Posts: 55
Joined: Sun Aug 25, 2019 5:26 am

Re: Arduino IDE on Raspberry Pi Zero W

Mon Sep 09, 2019 1:59 pm

Thank you hippy..

The slowness is only when doing compilation,
or even in light CPU work such as text editing?


In that case should I go for the RPi 4B?

I was hoping I can do it with the Zero W,
since the Zero W is much cooler, and a fan is not required on it..

User avatar
PeterO
Posts: 5001
Joined: Sun Jul 22, 2012 4:14 pm

Re: Arduino IDE on Raspberry Pi Zero W

Mon Sep 09, 2019 2:25 pm

fruitoftheloom wrote:
Mon Sep 09, 2019 10:43 am
Do you also turn water into wine and walk on water ?

Do not tell me what to do, you are not a moderator !
Calm down. :shock:
The version in the Raspbian repo is indeed still 1.0.5 which qualifies as ancient compared with the current version 1.8.9
PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

hippy
Posts: 5928
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: Arduino IDE on Raspberry Pi Zero W

Mon Sep 09, 2019 2:27 pm

spaceman5 wrote:
Mon Sep 09, 2019 1:59 pm
The slowness is only when doing compilation,
or even in light CPU work such as text editing?
Text editing seemed reasonable. It is mostly compiling, particularly if board type is changed when it has to rebuild everything.

The Zeroes are quite slow relatively speaking so it comes with the territory.

Good news as a passing note, though slightly off-topic, the Aduino IDE configured to use the PiDuino framework for Pi B+/2 compiles native executables for the Zero but I haven't exhaustively tested that.
spaceman5 wrote:
Mon Sep 09, 2019 1:59 pm
In that case should I go for the RPi 4B?
A Pi 3B, 3B+ or 4B should be satisfactory, and I guess a Pi 2 1.2 version.

spaceman5
Posts: 55
Joined: Sun Aug 25, 2019 5:26 am

Re: Arduino IDE on Raspberry Pi Zero W

Mon Sep 09, 2019 2:53 pm

PeterO wrote:
Mon Sep 09, 2019 2:25 pm
The version in the Raspbian repo is indeed still 1.0.5 which qualifies as ancient compared with the current version 1.8.9
Does the repo contain the old verion for some good reason, or someone just did not update it for a long time?

There is one advantage with old versions of the IDE, and it is that they are lighter.
I myself still use Arduino IDE v1.0.3 on my Windows :)
The reason I do it is becuase I never switched to the newer boards by the Arduino Foundation.
I only use Nano, Pro Mini, Mega 2560...
And the IDE is really light..
The newer IDE versions that support the new boards became bloated, and I don't like it.

Whenever you have an application that when you load it you get a "Splash screen" that stays too much,
it means that this application got ruined.
(that's my opinion)


hippy wrote:
Mon Sep 09, 2019 2:27 pm
Text editing seemed reasonable. It is mostly compiling, particularly if board type is changed when it has to rebuild everything.
If you change board type from B1 to B2, compile something, and then change back from B2 to B1,
will it rebuild everything again? or it keeps what was already built, for board types that were used before?

hippy wrote:
Mon Sep 09, 2019 2:27 pm
The Aduino IDE configured to use the PiDuino framework for Pi B+/2 compiles native executables for the Zero but I haven't exhaustively tested that.
Terrific

hippy wrote:
Mon Sep 09, 2019 2:27 pm
A Pi 3B, 3B+ or 4B should be satisfactory
Those have quite hot SoCs..
So a fan will be required..

User avatar
neilgl
Posts: 947
Joined: Sun Jan 26, 2014 8:36 pm
Location: Near Aston Martin factory

Re: Arduino IDE on Raspberry Pi Zero W

Mon Sep 09, 2019 2:57 pm

Ah, for me it is slow running it via VNCviewer on a PC (i7) - even with encryption turned off - for typing, moving mouse etc.
If you have a PC, why not just run the Arduino IDE on that (1.8.9)? Or a pi3 - no fan needed.

User avatar
PeterO
Posts: 5001
Joined: Sun Jul 22, 2012 4:14 pm

Re: Arduino IDE on Raspberry Pi Zero W

Mon Sep 09, 2019 2:59 pm

spaceman5 wrote:
Mon Sep 09, 2019 2:53 pm
Whenever you have an application that when you load it you get a "Splash screen" that stays too much,
it means that this application got ruined.
(that's my opinion)
What a strange criteria to use as a basis for your choice of software.
PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

spaceman5
Posts: 55
Joined: Sun Aug 25, 2019 5:26 am

Re: Arduino IDE on Raspberry Pi Zero W

Mon Sep 09, 2019 3:11 pm

neilgl wrote:
Mon Sep 09, 2019 2:57 pm
Ah, for me it is slow running it via VNCviewer on a PC - even with encryption turned off - for typing, moving mouse etc.
Wow..
OK I guess I am going to find out soon, once the boards I ordered will arrive.

PeterO wrote:
Mon Sep 09, 2019 2:59 pm
What a strange criteria to use as a basis for your choice of software.
:)

User avatar
scruss
Posts: 2465
Joined: Sat Jun 09, 2012 12:25 pm
Location: Toronto, ON
Contact: Website

Re: Arduino IDE on Raspberry Pi Zero W

Mon Sep 09, 2019 3:43 pm

fruitoftheloom wrote:
Mon Sep 09, 2019 10:43 am
Do not tell me what to do, you are not a moderator !
Yes, but please don't jump in with a first recommending the Raspbian arduino package. It's many years out of date and almost useless. I know you're just trying to help, but if you were actively developing on Arduino you wouldn't wish that Raspbian package on anyone. The download from the arduino.cc website actually works with current Arduino hardware, unlike the other one.
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.

PhatFil
Posts: 1363
Joined: Thu Apr 13, 2017 3:55 pm
Location: Oxford UK

Re: Arduino IDE on Raspberry Pi Zero W

Mon Sep 09, 2019 3:47 pm

I find vnc fine when needed to access my headless pi-0-w systems and a gui interface.

the arduino ide should work fine via vnc, its not as if many folk speed type when coding, (tv hackers excluded of course..) its either cut n paste or ponderous typing usually ;) But if you do type at speed typist rates you may have some keyboard lag to contend with..

Compiling will take a longer but unless your working with huge multi file projects I doubt it will be a major pita.

Only thing that may be an issue is iirc? some folk have reported that hot plugging usb devices in a running pi-0 can cause a system restart. If so work with it, just ensure you save things power off plug in the arduino etc....

have fun,

spaceman5
Posts: 55
Joined: Sun Aug 25, 2019 5:26 am

Re: Arduino IDE on Raspberry Pi Zero W

Mon Sep 09, 2019 3:58 pm

Thanks for that info..

PhatFil wrote: some folk have reported that hot plugging usb devices in a running pi-0 can cause a system restart.
If so work with it, just ensure you save things power off plug in the arduino etc....
Oh no..
That only happens with the Pi Zero (and Pi Zero W)?
If it doesnt' happen with other RPi boards, I wonder why it happens ont he Zero (and cannot be fixed..)

Also, do you know if it happens when you connect a USB Device, or disconnect it?
Last edited by spaceman5 on Mon Sep 09, 2019 4:22 pm, edited 2 times in total.

hippy
Posts: 5928
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: Arduino IDE on Raspberry Pi Zero W

Mon Sep 09, 2019 4:06 pm

spaceman5 wrote:
Mon Sep 09, 2019 2:53 pm
Does the repo contain the old verion for some good reason, or someone just did not update it for a long time?
I would guess; that's what Debian provides, so that's what Raspbian provides. Raspbian mostly follows Debian's policy of going for stable apps over cutting-edge which may be reason. Or maybe not. I don't know.
spaceman5 wrote:
Mon Sep 09, 2019 2:53 pm
There is one advantage with old versions of the IDE, and it is that they are lighter.
Not always, or significantly, and the disadvantages are that bugs won't have been fixed, new capabilities won't have been added, and anyone on the later versions won't always be able to help someone using an earlier version.

The Arduino IDE is based around Java and it seems a hefty weight anyway. I am surprised no one has rewritten that so it really is lightweight. But it is what it is and it works, and it's not really a problem on fast enough computers.
spaceman5 wrote:
Mon Sep 09, 2019 2:53 pm
I myself still use Arduino IDE v1.0.3 on my Windows :)
The reason I do it is becuase I never switched to the newer boards by the Arduino Foundation.
I was going to say you may be absolutely fine with the installable version then, try that and the latest version, see which you prefer. But when I tried to install the apt-get version that failed on my Zero W -

Code: Select all

Processing triggers for man-db (2.8.5-2) ...
Processing triggers for ca-certificates (20190110) ...
Updating certificates in /etc/ssl/certs...
0 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...

Error occurred during initialization of VM                        <===
Server VM is only supported on ARMv7+ VFP                         <===
E: /etc/ca-certificates/update.d/jks-keystore exited with code 1. <===
done.
Processing triggers for shared-mime-info (1.10-1) ...
Processing triggers for fontconfig (2.13.1-2) ...
Errors were encountered while processing:
 ca-certificates-java
E: Sub-process /usr/bin/dpkg returned an error code (1)
pi@raspberrypi:~ $ 
I have previously installed that on my 3B so it seems if you want to use that you will have to go to something other than a Zero.
spaceman5 wrote:
Mon Sep 09, 2019 2:53 pm
Whenever you have an application that when you load it you get a "Splash screen" that stays too much, it means that this application got ruined.
(that's my opinion)
I wouldn't say "ruined", and IMO it's better to have a splash screen than have nothing happen for 'an eternity' after the application has been launched.

The 1.8.9 splash screen lasts about 18 seconds on my 3B before the editor itself appears, 75 seconds on my Zero W.
spaceman5 wrote:
Mon Sep 09, 2019 2:53 pm
If you change board type from B1 to B2, compile something, and then change back from B2 to B1, will it rebuild everything again? or it keeps what was already built, for board types that were used before?
From my limited experience it rebuilds every time. Not sure what it rebuilds. I don't really use the IDE much myself.
spaceman5 wrote:
Mon Sep 09, 2019 2:53 pm
hippy wrote:
Mon Sep 09, 2019 2:27 pm
A Pi 3B, 3B+ or 4B should be satisfactory
Those have quite hot SoCs..
So a fan will be required..
I have never required a fan on my 3B or 3B+. It is true they idle hotter than a Zero but that's the price one has to pay; faster means hotter.

spaceman5
Posts: 55
Joined: Sun Aug 25, 2019 5:26 am

Re: Arduino IDE on Raspberry Pi Zero W

Mon Sep 09, 2019 4:27 pm

hippy wrote:
Mon Sep 09, 2019 4:06 pm
The 1.8.9 splash screen lasts about 18 seconds on my 3B before the editor itself appears, 75 seconds on my Zero W.
Oh no..
75secs.. definitely not usable..
(actually 18secs is also not usable..)
Maybe I should abandon the idea..

hippy wrote:
Mon Sep 09, 2019 4:06 pm
I have never required a fan on my 3B or 3B+. It is true they idle hotter than a Zero but that's the price one has to pay; faster means hotter.
I see.
Maybe my next board will be 3B/3B+

User avatar
PeterO
Posts: 5001
Joined: Sun Jul 22, 2012 4:14 pm

Re: Arduino IDE on Raspberry Pi Zero W

Mon Sep 09, 2019 4:43 pm

spaceman5 wrote:
Mon Sep 09, 2019 4:27 pm
(actually 18secs is also not usable..)
Maybe I should abandon the idea..
Sell your PI because your expectation are unrealistic. Go out and spend a lot more money otherwise you are never going to be happy.
PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

Return to “Beginners”