algorithmic modeling for Rhino



Firefly offers a set of comprehensive software tools dedicated to bridging the gap between Grasshopper, (a free plug-in for Rhino) the Arduino microcontroller and other input/output devices. It allows near real-time data flow between the digital and physical worlds – enabling the possibility to explore virtual and physical prototypes with unprecedented fluidity.

Location: Cambridge, MA
Members: 390
Latest Activity: on Saturday

Firefly Experiments

Firefly offers a set of comprehensive software tools dedicated to bridging the gap between Grasshopper (a free plug-in for Rhino) and the Arduino micro-controller. It allows near real-time data flow between the digital and physical worlds – enabling the possibility to explore virtual and physical prototypes with unprecedented fluidity.

As a generative modeling tool, Grasshopper offers a fluid visual interface for creating sophisticated parametric models, but by default, it lacks the ability to communicate with hardware devices such as programmable microcontrollers or haptic interfaces. Firefly fills this void. It is an extension to the Grasshopper’s parametric interface; combining a specialized set of components with a novel communication protocol (called the Firefly Firmata or Firmware) which together enable real-time communication between hardware devices and the parametric plug-in for Rhino.

A notable distinction for Firefly is that it is the first visual microcontroller programming environment designed specifically for a 3-D parametric CAD package (such as Rhino). This feature means that real-world data, acquired from various types of sensors or other input devices (video cameras, internet feeds, or mobile phone devices, etc.) can be used to explicitly define parametric relationships within a Grasshopper model. Firefly completes the communication feedback loop by allowing users the ability to send information from Grasshopper back to the microcontroller in order to incite specific actuations (ie. lights, motors, valves, etc). Ultimately, this workflow creates a new way to create interactive prototypes.

Discussion Forum

Screen LCD 2 Replies

Hi, I´m quite new in arduino, I´m using a redboard, works fine, I´m wondering if anyone know how to control a LCD screen from firefly, I have a 16 character and 2 lines screen.there is a way to import liquidcristal module at the same time that…Continue

Started by jorge sainz de aja. Last reply by jorge sainz de aja Jul 14.

Mapping frames or video to non-uniform grid 5 Replies

Hey Andy-I'm working on simulating a non-uniform LED mesh using your amazing Firefly tools and am so close! But i've run into a few snags and it's time to bring in the big guns (you).First of all i tried loading a video into the video player and it…Continue

Tags: video, firefly

Started by Dan Weissman. Last reply by Dan Weissman Jul 10.

New Firefly Website with Shop 2 Replies

Hi Firefly Community,I am excited to announce that there is a new an…Continue

Tags: Shield, Prototyping, Interactive, Firefly

Started by Andy Payne. Last reply by Andy Payne Jul 3.

Temperature sensors DS18B20 one wire digital 1 Reply

Hello, anybody has tried to read this in using firefly?thank yougContinue

Started by Galo Moncayo-Asan. Last reply by Simon Lullin Jul 2.


Comment Wall


You need to be a member of Firefly to add comments!

Comment by jorge sainz de aja on July 14, 2014 at 9:01am

Origami - grasshopper + arduino

Comment by Guido Maciocci on May 5, 2014 at 1:33am

Andy, some progress... 

I found your question on the Leap dev forums which pretty much outlined the same problem. 

So now, i moved the relevant .dll's to the same folder as the python script i'm running in Rhino Python. 

I use clr.addreference to add the LeapCSharp.NET3.5.dll and append the \\leap\\lib folder to sys.path to reference the libraries. 

Now i can add a controller, and a listener no problem. As soon as I try to poll a frame....rhino crashes!

Comment by Guido Maciocci on May 4, 2014 at 11:56pm

Hi Andy, 

I have a particular question related to the Leap Motion controller and its intergration with Rhino Python rather than a question specific to Firefly (sorry, but i don't know where else to post this). 

I am writing some python scripts based on the leap API to certain things in Rhino using the controller. As proof of concept scripts they are currently working outside of Rhino and I would like to begin integrating them via Rhino Python and Rhinocommon. 

My problem is that I am unable to get Rhino Python to speak to the controller, in that i keep receiving the following error:

"The type initializer for 'Leap.LeapPINVOKE' threw an exception"

Now, as far as I have managed to research, this error is usually related to the referencing of the wrong type of Leap libraries (x86 or x64). 

I have copied the Leap SDK .dll's into the same folder as the script I am trying to run. I have also included LeapCSharp.NET4.0.DLL, and Leap.pyc. 

The only way i can get the Leap module to load is by adding a clr.AddReferenceToFileAndPath pointing to LeapCSharp.NET4.0.dll assembly and appending the leap\lib forlder to sys.path. 

The Leap module imports but I get the PINVOKE error regardless of the x86 or x64 libraries I include in the folder. 

I managed ONCE to import the module and run the leap script but I can't remember how I did this. Also, when it ran, it did not print any Leap data to the console and Rhino tended to crash on running the script. 

Would you or anyone else have any advice to point me in the right direction?

Thank you so much for your help, 


Comment by jorge sainz de aja on April 3, 2014 at 7:55am

thanks andy, finally I bought a Arduino starter Kit with UNO, if everithing goes fine, then level up ;)

Comment by Andy Payne on April 2, 2014 at 8:40pm

Hi Jorge,

As far as I know, it should be compatible with Firefly... but I haven't run specific tests on it.  However, my understanding of the RedBoard is that it is almost identical to the Uno (and/or Duemilanove) both of which work just fine with Grasshopper.


Comment by jorge sainz de aja on April 2, 2014 at 12:22pm

is firefly Compatible with SparkFun RedBoard???????????????????

Comment by Andy Payne on March 27, 2014 at 8:52am

Thanks Simon!  

Comment by Simon Lullin on March 27, 2014 at 4:25am

Feedback time (sorry for my poor english)

Firefly is awesome, everything works just great...

For example the UDP reciever... I stream whatever for a data from my android phone and it works brilliantly. With gHowl just took ages and still not working. Kinect function are perfect. Really, a world with made out of stuff like Friefly would be a world wher I would be happy to live!

Arduino is working perfectely, in all ways.

I hope one day we will get full resolution for cameras (kinect, webcam or whatever)

Keep doing what you are doing, it's brilliant


Comment by Nathan Barnes on March 25, 2014 at 4:16pm

That is it precisely! I took Jasons workshop at Texfab 5 and I got a little understanding of how to code arduino's, so that is a route. My goal is to move 16 motors all with reset pins for zeroing. I will be tied up with Arduino boards as it is so combining the code would be great.

Thanks for such an awesome reply Andy

Comment by Andy Payne on March 25, 2014 at 3:58pm

Hi Nathan,

If I understand correctly, what you're saying is you have some motors that you want to control via the Quad Stepper Firmata... and you have some reset buttons (sensors) that you want to read from using the standard Firefly Firmata.  Normally, I would just tell you to add a few lines of code to the Quad Stepper sketch to read data from your buttons and then use the Uno Read component to get that data... but the Quad Stepper sketch already uses some serial commands to get call-backs from the GH sketch.  The easiest solution (for the moment) is to probably just use two different arduinos... one running the Quad Stepper sketch and connected to your motors... and the other running the standard Firmata and connected to your buttons.  You'll likely have to open both ports (to each board), but this is likely the quickest solution...although it isn't very elegant.  I'll try to think of an alternative solution, but it will probably take some re-working of the stepper sketch (which needs to happen anyway).... Just need to find time :)


Members (390)



Search Grasshopper


  • Add Photos
  • View All

© 2014   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service