Category Archives: Uncategorized

If programming languages were music instruments…

This post is inspired by this blog post by Nathan Rice . Wich talks about if programming languages were cars .

Me and my friends from work liked it very much , and we have imagined , how will programming languages look like if they were musical instruments ?

In our toughs we tried to capture the spirit of the language and the instrument itself , also just for our entertainment .

Assembler :

Very basic stuff , but experienced players can do pretty serious things with it … Damn you can even play it with a pair of spoons and an empty pot .


Sticks to basics , still needs experienced pair of hands ..


Basics x2 …


Tries to give a modern look to the old ideas ..


Some older  musicians may find it fun to play on concerts  … but me , home ? really ??!


Keeps it simple with very pleasant music in the right hands…


Yes i will buy this game to play it …


Had a feeling of a game , but people started doing pretty serious things with it ..


Gives a feeling like the angels them selves have been playing on it .


You need to be pretty serious motherf*er  to play on that .. but once you  know how to play , its gorgeous .


Where did you get this thing ? How do i play it ?


Does the job with many fancy stuff …


Nice and elegant , can play snake music !!! 🙂


Some find it more romantic …

Shell Scripting

Very simple .. but some people find it to be a very spiritual instrument …


This one is taking an interesting approach .


Well this makes some noise , but i want to see you playing music with it !

This were the languages that we are familiar with , so we cannot judge on other languages that exist .. Feel free to post your comments , i will add your suggestions to this list to make it complete .

Remember , this is only our point of view as we see the things . you may feel that some instruments represent their related languages wrong .

(Bus)Pirate Arduino


Usually i make a lot of small projects like this led blinking and play with some sensors but i have never documented the process only YouTube uploads of some to share with close friends , but from today i will start doing it and i will post each project on my blog .

I realized that with all of my projects i find myself googling a lot for piece of information and almost all the time i find the info i need on Forums or Blog’s of other people that decide to share . Now i think it is a time to stop only using the machine and start contributing to the whole thing .

I sincerely hope that this information will come handy to anybody or just be interesting material to read , thats my first attempt to write a blog about something , so wish me luck on this 🙂

In the first post i want to show you how i got Breadboard Arduino assembled . i was thinking about it for a long time , because i want to make a finished project and put it in my collection but buying an Arduino board for each one is not an option for me . Also before switching to Linux only i dropped the PIC programming deal and started a new clean page with Atmel chips . What i liked about Pic is that i could stick this one chip to breadboard and start messing with a lot of wires , its just seems more right to me , i don’t know why .

Anyway as i decided to stick Atmega 328P to my breadboard i realized that i didn’t have any programmer on hand and lucky me , i bought a Bus Pirate from SparkFun about year ago .Great tool that another time proved to me how great it is .

The Bus Pirate 5.10 is fully supported by AVRDude from version 5.8 and could be used to load Arduino bootloader to my chip .

After some breadboarding as described on Arduino site i got it assembled and it was time for Bus Pirate connecting .

As i found earlier there are two types of ribbon cable used by SparkFun and Seeed Studio . Mine was purchased from SparkFun so the cable colors are backwards from the Seed Studio arrangement . Adafruit probe set has identical colors to Seeed .

Here are the color codes for both of them :SparkFun Cable , Seeed Cable .

I dont have any ISP headers on hand so i just connected it with jumper wires directly into the Bus Pirate’s cable . The connections for Arduino ISP are as following :


After all connections are set its time to program a bootloader using AVRDude . New Arduinos come with Optiboot bootloader that you can get here , i have downloaded optiboot_atmega328.hex but you can choose the right one for you .

It’s time to check if the connections are right and i have not messed anything . To do this i am running a command from a terminal : “avrdude -c buspirate -p m328p -v -P /dev/ttyUSB0” .

If everything went ok we should see output something like this :

avrdude: Version 5.10, compiled on Jun 29 2010 at 21:09:48
Copyright (c) 2000-2005 Brian Dean,
Copyright (c) 2007-2009 Joerg Wunsch

System wide configuration file is “/etc/avrdude.conf”
User configuration file is “/home/rapt0r/.avrduderc”
User configuration file does not exist or is not a regular file, skipping

Using Port                    : /dev/ttyUSB0
Using Programmer              : buspirate
AVR Part                      : ATMEGA328P
Chip Erase delay              : 9000 us
PAGEL                         : PD7
BS2                           : PC2
RESET disposition             : dedicated
RETRY pulse                   : SCK
serial program mode           : yes
parallel program mode         : yes
Timeout                       : 200
StabDelay                     : 100
CmdexeDelay                   : 25
SyncLoops                     : 32
ByteDelay                     : 0
PollIndex                     : 3
PollValue                     : 0x53
Memory Detail                 :

Block Poll               Page                       Polled
Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
———– —- —– —– —- —— —— —- —— —– —– ———
eeprom        65     5     4    0 no       1024    4      0  3600  3600 0xff 0xff
flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

Programmer Type : BusPirate
Description     : The Bus Pirate

BusPirate: using BINARY mode
BusPirate binmode version: 1
BusPirate SPI version: 1
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.06s

avrdude: Device signature = 0x1e950f
avrdude: safemode: lfuse reads as FF
avrdude: safemode: hfuse reads as D2
avrdude: safemode: efuse reads as 5

avrdude: safemode: lfuse reads as FF
avrdude: safemode: hfuse reads as D2
avrdude: safemode: efuse reads as 5
avrdude: safemode: Fuses OK
BusPirate is back in the text mode

avrdude done.  Thank you.

if returned an error check your connections and try again . if everything was ok then you should unblock bootloader section on the chip by entering this command :

avrdude -c buspirate -p m328p -P /dev/ttyUSB0 -U lock:w:0x3f:m"

After the chip is unlocked you should set the fuses and burn the bootloader :

"avrdude -c buspirate -p m328p -P /dev/ttyUSB0 -U efuse:w:0x05:m -U hfuse:w:0xD2:m -U lfuse:w:0xFF:m -U flash:w:optiboot_atmega328.hex"

Now you must lock the bootloader section again :

avrdude -c buspirate -p m328p -P /dev/ttyUSB0 -U lock:w:0x0F:m"

Thats it , now you can burn arduino sketches to the chip . Also worth mentioning that for Fuse bits you can use this Fuse Calculator if you plan to make changes in this design or just burning a blank atmega chip for the first time .

Also i would like to mention that after doing this i found another way of burning the bootloader but this time from Arduino environment itself . You can choose the way that looks right to you . As i said earlier i just like to mess with stuff 🙂

To do this you must make some changes to Arduino IDE configuration files . First go to your arduino folder , usually it can be found at “/usr/share/arduino” if not there just type “whereis arduino” in terminal window . From there you should go to “ARDUINO_FOLDER/hardware/arduino” and you will find 2 files there that we will need to make changes to : boards.txt and programmers.txt . First lets edit the boards file , open the file with your favorite text editor , i just use Gedit for this kind of stuff . Also make sure that you have a permission to write to this file .

After the file is open just add the following lines :

############# Pirate Atmega328 16MHz



############ Pirate Atmega328 8MHz



This should add the ability to select Bus Pirate board from boards list in Arduino IDE . You can use Bus Pirate to program your Arduino chip or connect a FT232 USB to Serial if you have it on hand , i prefer to use it over a Bus Pirate for everyday programming , but if you don’t have any of these on hand you can program it with bus pirate only , i find the speed to be little slower but it should do the job fine .

next you should edit the programmers.txt file and add the following lines :

######################## Pirate Real


Thats it save the file and go to your Arduino IDE to check if everything works as it sould , Select Bus Pirate Atmega 328 from The Tools > Boards menu , set the Serial port and Burn a bootloader with Bus Pirate option .

Here some Photos from the actual setup : Image1 , Image2 .

It is too late now so i am going to think what to do next with the board tomorow . stay tuned .