Arduino on Debian Wheezy

I recently discovered the joys of Arduino! But setting up the development environment on Debian Testing (Wheezy) took me a while. Here is what I did…

Set up the Arduino IDE

Many packages required for Arduino development were recently removed from Debian’s testing repositories. At the time of writing, they are being held in sid, waiting on a some issues before being migrated.

In the mean-time, you can download pre-built binaries from the arduino.cc download page is pretty simple. I downloaded version 0022 for 64-bit Linux. You just unpack this in to a directory and run the arduino script. You’ll need to have Java installed.

$ apt-get install openjdk-6-jre

Next, you have to get the Arduino device to be detected. This works ok on Wheezy. Plug it in and look in your kern.log. It should show up as a serial device (my Ardino Uno shows up as /dev/ttyACM0).

So far so good.

Get the AVR C++ compiler working

You need to get the AVR C++ compiler and C-library. Unfortunately, the newer versions of the required packages in sid don’t work (which is why they’ve not been migrated). Fortunately, the ones in squeeze work fine. Download the following packages from squeeze

  • gcc-avr (the compiler)
  • avr-libc (the C-library)
  • binutils-avr (tools to work with AVR binaries)

And install them

$ dpkg -i avr-libc_*.deb binutils-avr_*.deb gcc-avr_*.deb

This way, when they are finally migrated to wheezy, they should just get upgraded normally.

Test the set-up

  1. Open up the Arduino IDE.

  2. Go to Tools -> Serial Port and select the serial port your Arduino is appearing as.

    If you can’t see it, there is a problem with the device being detected. If you opened the IDE before the device was plugged in, try closing it and re-opening it.

  3. Go to File -> Examples -> Basics -> Blink. Then go to Sketch -> Verify / Compile.

    If there are compiler errors, you have a problem with the set-up of the AVR C++ compiler or the C-library.

  4. Finally, go to File -> Upload to I/O Board. You should see the board’s serial TX/RX LEDs flicker, and then you should see the LED next to pin 13 blinking on and off. Congratulations.

24th October, 2011 — computing — 2 comments

comments feed trackback url

Comments

  • Pierre
    9th November, 2011 at 2:05 pm
    reply
    permalink

    Thanks for the information. Missing a ‘b’ in the installation command line : dpkg -i avr-libc_.deb binutils-avr_.deb gcc-avr_*.de

    • edam
      9th November, 2011 at 4:49 pm
      reply
      permalink

      Fixed, thanks!

Leave a Reply




Cancel Reply

Spam protection by WP Captcha-Free

    • Home
    • About Me
    • Photography
    • Software
      • Android
        • Import Contacts
        • How to install an APK
      • GTK-based
        • Manage Raws
        • Prep. Images
      • Makefiles
        • Arduino
        • General-purpose
      • sqlite3cc
  • Page Content

  • Categories
  • Archives
  • Links
    • Future Mowgli Project
  • Meta
    • log in
    • site feed

powered by WordPress and Gallery2   |   hosted at waxworlds.org   |   site design by edam