Arduino on Linux

Community contributed apps
User avatar
Posts: 2744
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
PostPosted: Wed Sep 19, 2012 4:22 pm
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-Arduino-v1.0.1-32bit.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-libraries-1.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:

Posts: 121
Joined: Wed May 30, 2012 10:44 pm
PostPosted: Wed Sep 19, 2012 11:18 pm
Thank You!
Image

Posts: 97
Joined: Wed Jul 06, 2011 6:45 am
PostPosted: Thu Sep 20, 2012 5:38 am
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.
User avatar
Posts: 2744
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
PostPosted: Thu Sep 20, 2012 6:43 pm
Thanks for that tip. I didn't encounter that one myself but can understand possibly having to do that.
User avatar
Posts: 5350
Joined: Fri Jul 20, 2012 9:42 am
PostPosted: Thu Sep 20, 2012 6:52 pm
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.
User avatar
Posts: 2744
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
PostPosted: Thu Sep 20, 2012 6:55 pm
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
Posts: 5350
Joined: Fri Jul 20, 2012 9:42 am
PostPosted: Thu Sep 20, 2012 7:21 pm
Lol forgot to add the necessary sudo for the useradd command...fixed :)
User avatar
Posts: 19
Joined: Fri Sep 14, 2012 1:37 pm
Location: Kinderhook, NY
PostPosted: Thu Sep 20, 2012 7:36 pm
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!

Posts: 41
Joined: Wed Apr 25, 2012 3:50 am
Location: JHB, South Africa
PostPosted: Wed Aug 21, 2013 6:53 am
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
User avatar
Posts: 2744
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
PostPosted: Wed Aug 21, 2013 6:56 am
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.
Next

Return to Apps

Who is online

Users browsing this forum: No registered users and 3 guests

cron