Go Down

Topic: Arduino-izing the AVR Butterfly (Read 25895 times) previous topic - next topic


For some reason that I can't fathom, I thought I'd get a notification when this thread got posts. This may be one of the stupidest things I've done lately because I thought that this thread had died back in November! Okay, now I'll check the notify box and see what happens.

I am going to carefully read all the posts I've missed then try out all the code thats been done so far.

I'm really tickled to see that this work is being done and let me apologize for the brainfart that caused me to ignore it.



Welcome back Smiley!

If you'd like to commit changes you're more than welcome to join the Google Code project I set up to host the code.

The code is more or less functional, but I haven't put much (or any, really) effort into polishing it to make it elegant or efficient. There's plenty to do, and most of it isn't even hard.


I copied stuff yesterday and now I need to set up a study platform to see how everything is working. I also want to take a hard look at Google Code and see if it is something I want to use. I've got other commitments so this will take a few days.


I checked in some minor updates today.

Changed Timer2_RTC from being a namespace to a class. I was playing with the idea of making it a namespace rather than an instance of a class, but that results in weird syntax for the user.

I had some PROGMEM tables stored in C files to avoid a compiler warning that happens if they are in the CPP file with the usual syntax. This works, but unfortunately Arduino wants to include those files when you ask it to add the library. Doesn't hurt, but looks weird. Referencing the AVRFreaks thread I found a way to put the PROGMEM tables in without generating the warning, so I updated the temp sensor class and the LCD driver class.

I also updated the examples that were affected by these changes.


Hi guys, its seems that u folks have been doing a great work to get the buttterfly working under arduino..

Can anyone of u guide me how to connect the butterfly to the computer using a fdti cable( I guess its just tx,rx,gnd and vcc on the butterfly)  and which pin  is digital pin 1-13 and analog pin 0-5(this is the jtag connector or?)

cheers Kim


Best thing to do is grab Smiley's Butterfly guide from


Look in the menus on the left, near the bottom in the 'Downloads' box, get the 'New Quick Start Guide' and check out figures 3 and 6 on pages 15 and 18.

The 'Butterfly Alternate Pin Uses' document may also be useful. That'll show you where all the various pins come out.


Well, i know which pin is PB1 etc on the butterfly, can I wirite like digitalwrite(PB1,HIGH) or are these constants not defined in the arduino?

I have and ftdi cable, but can I connect this directly to uart or do I need to remove some level convertion on the butterfly? A boarduino tutorial for beginners would be great:)
Is the joystick implemented? Is it possible to use hash tables or arraylist to make menus for the joystick? If u are on mainmenu number 3 and press the center a certain function is called(events)



Feb 24, 2009, 12:13 am Last Edit: Feb 24, 2009, 12:16 am by DaveK Reason: 1
You can take a look in pins_butterfly.h to see what pins are pre-defined for you. I tried to make sure everything that would be useful would have a name.

I'm not familiar with the FTDI cable, but if it's a typical USB->Serial cable you just need to connect ground, tx and rx. The Butterfly will handle the level conversion. It doesn't have the best level converters on board, so sometimes it doesn't work with some USB adapters, but it shouldn't hurt to try.

There are pin names for the joystick center, A and B, not sure now why I didn't map in the other two joystick pins. Hm. I probably need to go back and do that.

But yes, with the stupid exception of not having two of the 5 joystick pins accessible from digitalread, you could use them however you'd like.

Anyone happen to know where those last two joystick pins are connected?


where can you buy a butterfly?


Nick, I saw your update for IDE v0015. Are there any outstanding issues for it? I should update the project description from v0012 to v0015 if not.


Any news on buttuino latelely, any example project with it, temperature logger for instance?



I haven't looked at this since august. I think there were issues with a change in how arduino was storing its files ( on the mac it is now using an application package).

I think it is a simple change in how to install the butterfly support files but I have been distracted by other projects lately and not had the chance to look at it.



I just got mine back out with the intention of using it as a temperature logger. I'll see if I can get butteruino working with 0017.

Alas, somewhere in the shuffle of moving computers I've lost my collection of Arduino libraries. I'll have to go find all the goodies again  :P


excellent.. is it somehow possible to remove the level converters on the butterfly so i can use a standard lilypad usb connector to it? What fuse setting should i use in avr studio when i am burning the bootloader to it?

Go Up