Category Archives: Computers

Useful avrdude commands

Avrdude is a command line tool for uploading to and downloading from AVR microcontrollers. It is used in the background by Arduino to upload sketches.

It’s also the tool we used to upload the bootloader to all of the atmega644p chips provided in the TVRRUG OMC electronics kits.

Here are some useful commands when using avrdude. Continue reading Useful avrdude commands

Compile/Build Errors in Arduino 0023 on Ubuntu

For a while now I’ve been getting build errors in Arduino-0023 on Ubuntu, so I took the easy way out and used Arduino-0023 on Windows because it worked. Finally I got around to investigating the issue, and thanks to Google have found a solution.

The error:

In file included from /usr/lib/gcc/avr/4.5.3/../../../avr/include/util/delay.h:44:0,
from /usr/lib/gcc/avr/4.5.3/../../../avr/include/avr/delay.h:37,
from /home/hannah/Documents/Software/Arduino_Linux/arduino-0023/hardware/arduino/cores/arduino/wiring_private.h:30,
from /home/hannah/Documents/Software/Arduino_Linux/arduino-0023/hardware/arduino/cores/arduino/WInterrupts.c:34:
/usr/lib/gcc/avr/4.5.3/../../../avr/include/math.h:426:15: error: expected identifier or ‘(’ before ‘double’
/usr/lib/gcc/avr/4.5.3/../../../avr/include/math.h:426:15: error: expected ‘)’ before ‘>=’ token

The solution:

Comment out line 79 of <arduino installation directory>/hardware/arduino/cores/arduino/wiring.h:

//#define round(x) ((x)>=0?(long)((x)+0.5):(long)((x)-0.5)) 

An alternative solution wraps the #define round(x)... line with a check for the problematic version of avr-libc:

#if __AVR_LIBC_VERSION__ < 10701UL
#define round(x) ((x)>=0?(long)((x)+0.5):(long)((x)-0.5))

Finally Fixed Jerky Flash Videos in Firefox on Kubuntu 11.04!

For months, ever since I installed Kubuntu 11.04 on my brand new shiny laptop, Flash videos have been jerky and frequently crashed the whole darn machine when played full screen. The “Official” advice regarding x64 Firefox and Flash didn’t help at all, but I never managed to get around to Googling the problem and finding a solution… Until now!

FlashAidSeveral threads on Ubuntu Forums suggested the Flash Aid Firefox Plugin, with many people reporting success. Now I am one of them! Although I didn’t achieve success at first, I had to do the following:

  1. Install FireAid plugin
  2. Restart Firefox
  3. Run FireAid Wizard
  4. In a command terminal, type:
    sudo apt-get remove --purge flashplugin-nonfree
    sudo apt-get remove --purge flashplugin-installer
    sudo apt-get remove --purge flashplugin64-installer
    sudo apt-get autoremove
    sudo updatedb
    sudo mkdir /etc/adobe
    echo "OverrideGPUValidation=true" >~/mms.cfg
    sudo mv ~/mms.cfg /etc/adobe/
  5. Reboot

Really I probably did it backwards and should have done 4 and 5 before 1, 2 and 3, but nevertheless it worked :)