Category Archives: Linux

Creating A Linux Arduino Development Enviroment

I started playing with my haceduino 2009 and couldn’t get it to upload sketches to my board, I played for a while trying to hit the reset switch at different times but with no luck.

I hooked the board up to a windows machine and had it uploading almost right away so this led me to my Linux machine being at fault. What to do, what to do….

So last night I played with a few different Linux distros to find one that works “right out of the box” so to speak. It had to be a mainstream distro, had to be a clean install and only need packages available from the repos so as not to have to revert to compiling from source.

This guide is to set up a machine from scratch with the latest Ubuntu release 9.10, it should work with kubuntu and xubuntu as well but I offer no warranty as to the sutablity of this guide to your own hardware and setup


Do a fresh install of Ubuntu Karmic Koala 9.10

At the command line perform the following commands to prepare your system for the arduino IDE.
  • sudo apt-get update (Update Package list)
  • sudo apt-get upgrade (Upgrade all installed packages)
  • sudo apt-get remove brltty (Remove as it conflicts when uploading sketches)
  • sudo apt-get install sun-java6-jre avrdude gcc-avr avr-libc ftdi-eeprom (Install dependencies for the Arduino IDE)

Now that the system is ready we will install the Arduino IDE, follow the next set of commands to install the latest IDE from via google code

  • cd ~/ (change to your home directory)
  • wget (Download IDE from googlecode)
  • tar xzvf arduino-0017.tgz (extract files from the archive)
  • sudo reboot (reboots the machine)

Okay with that all done and your machine rebooted you should be ready to hook up your Haceduino and upload a sketch

  • Plug your Haceduino in to a USB port and wait 10 seconds for it to connect
  • To run the IDE you need to exucute the file ~/arduino-0017/arduino this will launch the IDE
  • Go to tools/board/arduino and select Duemilanove or Nano w/ ATmega328
  • Go to tools/serial port/devttyUSBx (Select the port your board is plugged in to)
  • Load a sketch from the examples choices, the file/digital/blink is a good start to make sure it is working as it doesnt require any additional hardware apart from the haceduino and a USB cable
  • Click on the upload button second icon from the right at the top of the IDE and the sketch should compile and be uploaded to the Haceduino 2009, the red and green serial traffic LEDs should flash for a few seconds
  • You should now have an orange LED blinking on the haceduino that is different to the dit dit dah flash that was all ready on the haceduino.
  • By playing with the values in the sketch you should be able to make it blink faster or slower, why don’t you have a try now.

Well all going well that should be it and you will have a Linux environment that you can program your Haceduino in, congratulations and happy hacking

Ubuntu Linux on Armada 1700 Laptop

Well I finally got around to installing linux on the laptop. I played with a heap of different distros before finally finding one that I understood how to configure 😛

I thought I might put my experiances down in a quick howto as installing Kubuntu on the Linux Armada 1700 Laptop wasnt all that hard.

I will point out that I was given a custom Debian distro from Computerbank Victoria a few years ago and had a bit of a play with it. The system that was set up and designed to run on the laptop I had. The developer used a similar laptop for development .

So I did have a bit of a play with config files and the like. I am from the days of C64’s BASIC and DOS so I know what a command line is and I wasnt scared to use it. well help is only an install CD away.

Well on with the installation of Kubuntu Dapper Drake 6.06 Alternate Install CD

Here are the hardware specs for the machine, certainly not a powerhouse type of a PC but it could run WINXP so I figured a Linux of the same era should work so I stumbleupon a site that mentioned ubuntu and Kubuntu and I got to downloading.

Compaq Armada 1700:

Tech Code: 6300/T/5000/D/M/3
CPU: Genuine Pentium II 300Mhz
RAM: 160 Mb
Display: 14″ LCD
Video chip: Chipsand Technologies 65555
Sound chip: ESS1869
Internal modem: Compaq 56VL (Lucent WinModem)
PCMCIA/CardBus slots: Two
USB 1.1 slot:
Floppy drive LS120: internal
CD-ROM drive: internal
Hard Drive: 3.3 gig
Mouse: Synaptics Touchpad (PS/2)
WiFi Card: Compaq WL110 PCMCIA card

Okay I downloaded the Dapper Drake 6.06 iso Kubuntu Alternate install disc, from There are links in the lower left of the homepage if you want Kubuntu with KDE (Kubuntu) instead of gnome (Ubuntu)

The reason for the alternate install CD image is the normal install CD uses a live linux version running in RAM. As most Armada Laptops from the 1700 range are fitted with less then the required 196 mb of ram for the install we have to do a text based install from CD 2 the alternate install CD Oh and not the DVD as we dont have DVD drives either.

I am not going to cover the complete ins and outs, this assumes you can read a screen and answer simple english questions and that you can use google to get basic information just like this howto. Take hostname for your computer, Easy it means a name for the computer call it Bob, Jane, Spot or Rover, just think of a name for your computer and type it in.. I will leave all that sort of stuff up to you just like the timezone you are in.

Basically if you can install windows by yourself and get all the devices working so have a grasp of drivers then you should be right.

However I will help you get all those little things like no sound, acpi shutting off laptop, framebuffer in 1024×768 for a fullscreen console and get X running in 1024×768 so your desktop is fullscreen as well. Those things that like windows work but usually just need a tweak to fix up.

I didnt get a few things working as eiether A. I dont use them so havent checked or B. they dont work and I havent learnt how to fix it yet. I am still a linux newbie.

Okay Download the ISO and burn it to disc, I used nero on a windows XP system but if on a mac do it the iMac way on nix do it the nix way etc.. Just burn it as a bootable image like any other ISO file…

Then boot of the CD on the laptop, if your laptop id not configured to boot from CD you will need to change the BIOS settings, Google for Armada 1700 BIOS Settings or similar for help on that.

Choose Text install from the option menu that appears.

Work through the standard installation questions on computer setup etc, and get the installation underway, like a windows install a hot beverge may aid here, unlike windows you end up with a full install of applications as well making it a true out of the box solution.

Okay you should now be able to log in to your desktop and once you have you should have noticed 3 things, the text at startup only fills the middle of the screen (640×480 mode) the desktop fills the middle of the screen (800×600 mode) and there was no sound at startup. Lets fix all thre in that order.

One lets get the framebuffer running in console mode so that our “Dos” text fills the screen.

First you need to open Kate the advanced text editor, it is found under the “K” menu lower left of screen, just like the windows start button. It is in the utilities section.

In kate you need to open /boot/grub/menu.lst this is the boot loader config file. Here we are looking for the following lines in the code

title Ubuntu, kernel 2.6.15-26-386
root (hd0,0)
kernel /boot/vmlinuz-2.6.15-26-386 root=/dev/hda1 ro quiet splash
initrd /boot/initrd.img-2.6.15-26-386

we need to add acpi=off, this turns power management off which shortens battery life 🙁 but if you dont for some reason the laptop thinks it is hot and shuts down, fan doesnt work with Kubuntu. We also need to add vga=791 to enable the frame buffer. We still get a few short duration startup screens smaller just like windows but our console is fullscreen 🙂

Change this
kernel /boot/vmlinuz-2.6.15-26-386 root=/dev/hda1 ro quiet splash
to this
kernel /boot/vmlinuz-2.6.15-26-386 root=/dev/hda1 ro quiet splash acpi=off vga=791

Save the file in your home directory as you cant save it back to the grub directory as your are not Root “Administrator” to the linux newbies like me.

Once you have it saved to your /home/username directory as menu.lst you need to copy it over the top off the old one, to do this type the following in to a console window. The sudo gives you tempoary root access

sudo cp /home/username/menu.lst /boot/grub/menu.lst and hit enter

Thats the first one fixed, next is the desktop we do this the same way but this time we want to edit the /etc/X11/xorg.conf file.

Go through and look for a section like this

Section “Screen”
Identifier “Default Screen”
Device “Chips and Technologies F65555 HiQVPro”
Monitor “Generic Monitor”
DefaultDepth 24
SubSection “Display”
Depth 24
Modes “1024×768” “800×600” “640×480”

What we need to do is go through and only down the bottom remove any reference to 24 bit colour depth, change it to 16 and we need to remove all the modes like 640×480, all we wnat left is 16 bit at 1024×768.

we end up with a section like this

Section “Screen”
Identifier “Default Screen”
Device “Chips and Technologies F65555 HiQVPro”
Monitor “Generic Monitor”
DefaultDepth 16
SubSection “Display”
Depth 16
Modes “1024×768”

save it top the home directory then copy it over the top of the old one with

sudo cp /home/username/xorg.conf /etc/X11/xorg.conf

and thats the desktop taken care of. Now lets fix the sound which isnt really broken it just hasnt auto detected the sound card so didnt load the driver no diffrent to windows, a quick tweak of another config file and we are in business.

This time open up /etc/modules and add this line to the end


save the file to your home directory and then copy it with

sudo cp /home/username/modules /etc/modules

Type in the following command to reboot yes only one reboot 🙂 and thats it, see a lot easy then windows.

sudo reboot

Oh and when it asks for a password for sudo just use the password for you own account you created during the install, thats an admin account.

Hope this helps you out

First post from my linux box

I finally got around to installing Linux on the laptop tonight, after a day at the dentist with two extractions and then a major bleed that required coagulant dressings stiched in to the gum :(.. So in pain and cant sleep what to do but install Kubuntu.

So far pretty painless, I had to tweak the xorg.conf to 1024×768 as it was defaulting to 800×600 leaving a black border around the screen.

I dont have sound yet but the wireless is running great. I will work on the sound later..

I have got some bits and pieces from using the site linux on laptops might be worth a look.

Linux borris 2.6.15-26-386 #1 PREEMPT Thu Aug 3 02:52:00 UTC 2006 i686 GNU/Linux

Geek By Nature Linux by Choice

Well I finally took the plunge at around midnight and started to install Debian gnu/Linux.

I cant do things the easy way (my laptop is only a P II 300 with 160 MB and a 3 gig HDD) so I got the business card install about 40-50 MB and did a net install, I am using an old XIRCOM real port that overheats, it was high 30’s (celcius) today so I have the pedestal fan blowing on the card until I get the base install done and then get the Orinoco drivers running for my wireless..

Oh and I am doing a custom install to save space..

Wish me luck and lets hope that those swimming penguins can keep me afloat