Arduino on Linux

Community contributed apps
Post Reply
binder
Posts: 2865
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Arduino on Linux

Post by binder »

Linux Users.

This post will discuss how to use / run Arduino on a linux machine and make use of the Wizard, Library Version check and to Restore Preloaded Code.

These files contain the following software:
  • Arduino 1.0.1 (32 or 64bit) (modified for Reef Angel)
  • Reef Angel Libraries 1.1.1
  • Wizard 2.1.9
I have uploaded 32bit and 64bit versions of the Arduino app with the modifications to my website.

To install, make sure you have Java installed (openjdk java 6 runtime is fine).
  • Download either the 32bit (http://curtbinder.info/apps/ReefAngel-A ... bit.tar.gz) or 64bit (http://curtbinder.info/apps/ReefAngel-A ... bit.tar.gz) version of the Reef Angel modified Arduino.
  • Extract the tarball into your home directory. It should create a folder called ReefAngel.
  • Download the arduino libraries tarball. http://curtbinder.info/apps/arduino-lib ... 1.1.tar.gz
  • Extract it to your home directory. It will create a folder called Arduino inside your home directory.
  • Open up the ReefAngel folder.
  • Double click on the arduino file. It will prompt to Run in Terminal, Display, Cancel or Run. You can choose Run. If you encounter problems, you should choose Run in Terminal to see more output. NOTE: If you are running Ubuntu 13.04, Nautilus behavior has changed and double clicking on a shell file (*.sh file) causes it to be opened in a Text Editor by default. To fix this, go to Nautilus > File menu > Preferences > Behavior, and change preferences there: set the item "Executable Text Files" either to "Run executable..." or to "Ask each time".
  • On first run, Arduino will prompt you for the folder to store your sketches. Select the Arduino folder.
    If it does not prompt you for the directory when Arduino starts up, you need to change the folder. To change the folder, goto the File menu and choose Preferences. Then click the Browse button next to the Sketchbook location. Change the folder to be "/home/USER/Arduino" where USER is your username.
You will now want to select your Reef Angel from the Tools menu and then Board. Most people will use either Reef Angel Controller w/ optiboot OR Reef Angel Plus Controller.

Lastly, you will need to choose what Serial Port to use to communicate with the controller. This port can change at times but will most likely be /dev/ttyUSB0 for the 1st USB device. If arduino cannot communicate with the proper port, it will notify you and prompt you to change it.

This will allow you to run arduino on linux and make use of the wizard and functionality. I have tested this on the following systems:
  • Xubuntu 14.04.2 LTS 64bit
  • Ubuntu 10.04 LTS 32bit
  • Ubuntu 12.04.1 LTS 64bit
  • Ubuntu 12.10 64bit
  • Ubuntu 13.04 64bit
If you are looking for the older version. Here are those files:
1.0.9 Libraries Pre 1.0.9 Libraries Let me know if you have any questions. :geek:
fatman
Posts: 120
Joined: Wed May 30, 2012 10:44 pm

Re: Arduino on Linux

Post by fatman »

Thank You!
Image
agentgreen
Posts: 97
Joined: Wed Jul 06, 2011 6:45 am

Re: Arduino on Linux

Post by agentgreen »

Awesome, thanks for this!

One thing to note so far. If you are trying to run arduino as your normal login user and not root, you probably will notice the Serial Port option is grayed out. This is due to permissions on the device.

Plug up the usb-ttl cable, sudo to root and run ls -l /dev/ttyUSB0:

ag@aglaptop:~/ReefAngel$ sudo ls -l /dev/ttyUSB0
[sudo] password for ag:
crw-rw---- 1 root dialout 188, 0 Sep 20 08:25 /dev/ttyUSB0

You'll see my device is in the dialout group. So just add your normal login user (in my case ag) to the dialout group, reboot or logout/login and now you should have access to change the Serial Port.
binder
Posts: 2865
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Arduino on Linux

Post by binder »

Thanks for that tip. I didn't encounter that one myself but can understand possibly having to do that.
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Re: Arduino on Linux

Post by lnevo »

Sorry have to be a picky UNIX guy :) sudo is not needed to ls -l the USB device :)

It is needed though for adding the user to the dial out group which for those that don't know how, the command would be:

Code: Select all

$ sudo useradd -G dialout lnevo
No reboot necessary, logout/login required (or relaunch terminal window if launching from a shell)

Lee
Last edited by lnevo on Thu Sep 20, 2012 7:20 pm, edited 1 time in total.
binder
Posts: 2865
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Arduino on Linux

Post by binder »

lnevo wrote:Sorry have to be a picky UNIX guy :) sudo is not needed to ls -l the USB device :)

It is needed though for adding the user to the dial out group which for those that don't know how, the command would be:

Code: Select all

# useradd -G dialout lnevo
No reboot necessary, logout/login required (or relaunch terminal window if launching from a shell)

Lee
lol. yeah that's how my system is setup. much easier to do that so you have access as needed and limit the use of the super user. :smile:
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Arduino on Linux

Post by lnevo »

Lol forgot to add the necessary sudo for the useradd command...fixed :)
User avatar
ScottT
Posts: 19
Joined: Fri Sep 14, 2012 1:37 pm
Location: Kinderhook, NY
Contact:

Re: Arduino on Linux

Post by ScottT »

Thank you, Thank you, Thank you! It worked! I now have to buy a RA and play around with it. Very excited to be able to use it on Linux. Go Binder!
ishtak
Posts: 41
Joined: Wed Apr 25, 2012 3:50 am
Location: JHB, South Africa

Re: Arduino on Linux

Post by ishtak »

Curt,

Any plans to update the linux version to use the new libraries and new wizard? Is it difficult to update? If you dont have time to update i'm happy to test for you with some gentle nudging in the right direction :)
Image
binder
Posts: 2865
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Arduino on Linux

Post by binder »

ishtak wrote:Curt,

Any plans to update the linux version to use the new libraries and new wizard? Is it difficult to update? If you dont have time to update i'm happy to test for you with some gentle nudging in the right direction :)
I didn't even realize that the library version on it was "outdated". I don't believe it's too difficult to update. I will need to check with Roberto to make sure I grab the latest wizard and have the updated files setup. I might be able to get to it today or in the next upcoming days.
When I get something updated, I will let you know so you can test it out.
binder
Posts: 2865
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Arduino on Linux

Post by binder »

I was unable to get to this update over the weekend. it is on my list of things to do this week or weekend. sorry for the delay.

Sent from my Nexus 7
binder
Posts: 2865
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Arduino on Linux

Post by binder »

ishtak wrote:Curt,

Any plans to update the linux version to use the new libraries and new wizard? Is it difficult to update? If you dont have time to update i'm happy to test for you with some gentle nudging in the right direction :)
I just uploaded the new version. See the OP for the link. Make sure you read the note at the end of the post. I'm looking into this further and will update if necessary.
binder
Posts: 2865
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Arduino on Linux

Post by binder »

Updated appropriately. Everything should be the latest version and work just fine. Feel free to test out and let me know if there are any problems.
smadascott
Posts: 14
Joined: Sat Aug 24, 2013 10:12 pm
Location: Arizona
Contact:

Re: Arduino on Linux

Post by smadascott »

well I tried using the files in the links on the original post but with no luck. I got everything installed but the compiler is version 1.0.3 and it wasn't reading the library files or giving me options to select the correct RA board. I finally just installed the windows RA compiler using Wine and got things working. However, if you do use wine you must manually set up the com ports! Wine doesn't do it automatically like windows does..
sabo
Posts: 127
Joined: Tue Sep 24, 2013 3:18 am

Re: Arduino on Linux

Post by sabo »

Is updating the libs as simple as pulling it from git and overwriting?
binder
Posts: 2865
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Arduino on Linux

Post by binder »

sabo wrote:Is updating the libs as simple as pulling it from git and overwriting?
depends on what version of the libs you were coming from. there was a change that was made to one of the support library files (i believe it was twc.c) with the update to 1.0.9.
otherwise, just downloading the latest libs from git and copying them into the libraries folder and overwriting should be ok. you won't get the latest wizard or additional feature checks that the arduino app provides though. all you can do is make a backup of your existing libraries folder first before you do anything and give it a try.
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Arduino on Linux

Post by rimai »

Hey Curt, doesn't the auto-update also work on linux?
When I push updates to master branch on git, the Mac and Windows versions pop-up a box saying that there is a libraries update and asks if you want to download it.
It's an integral part of my compiled version of the Arduino IDE, which is basically the pde.jar file, but I thought it would work on linux too.
Sabo, if you want to configure your linux to work with the Reef Angel libs, I would recommend starting with the package that Curt put together. It will place all the folders and files you need in the right place. After that, it is just a matter of pulling git repo clone to be updated.
Roberto.
binder
Posts: 2865
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Arduino on Linux

Post by binder »

rimai wrote:Hey Curt, doesn't the auto-update also work on linux?
When I push updates to master branch on git, the Mac and Windows versions pop-up a box saying that there is a libraries update and asks if you want to download it.
It's an integral part of my compiled version of the Arduino IDE, which is basically the pde.jar file, but I thought it would work on linux too.
Sabo, if you want to configure your linux to work with the Reef Angel libs, I would recommend starting with the package that Curt put together. It will place all the folders and files you need in the right place. After that, it is just a matter of pulling git repo clone to be updated.
Yeah, to the best of my knowledge it works. I had forgotten about it when he asked the question and was simply replying to the question. Guess I better pay closer attention when reading the questions. :)
sabo
Posts: 127
Joined: Tue Sep 24, 2013 3:18 am

Re: Arduino on Linux

Post by sabo »

The other thing I was wondering about was the arduino package thats available. I guess I will just have to install it and have a play. :)
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Re: Arduino on Linux

Post by lnevo »

I recommend curt's package. Otherwise its hard to get the wizard installed and all the ra files etc aside from libraries folder
binder
Posts: 2865
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Arduino on Linux

Post by binder »

just updated the libraries to version 1.1.1 and included the latest wizard as well.
Post Reply