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: 381
Latest Activity: on Sunday

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

generic serial read/write: no response

Hi All,Am trying to do generic serial call/response with firefly and an arduino uno. The intention is to use it later for g-code type read/write.The arduino sketch running is the sample serialCallResponse. In the arduino serial monitor, the feedback…Continue

Tags: serial, firefly, arduino

Started by Lennard Ong Apr 10.

Problem loading multiple Arduino uno boards 2 Replies

HiI've been searching and have not found a way to do this so yet so any help would be great. My goal is to have 16 stepper motors all connected to Arduino boards and I need to have these connected with reset pins to zero the motors. The problem I'm…Continue

Started by Nathan Barnes. Last reply by Nathan Barnes Apr 3.

It's some problom for me to use the firefly

Once I open the grasshopper it comes this errors.....And I open the…Continue

Started by Jason Zhang Mar 23.

Kinect on Win7 running on a Mac with parallels problem.. 1 Reply

I am trying to connect kinect on win7 that is running on my Mac with parallels.Even if it seems that windows recognises Kinect and all, when I run the kinect software it shows no hardware connected, and also if i try to use firefly's skeleton…Continue

Tags: parallels, mac, firefly, kinect

Started by Ed Tibuzzi. Last reply by Neel Jain Mar 14.



Drag & Drop Programming

Using Grasshopper's visual programming interface, Firefly gives you the ability to create interactive programs and devices by manipulating elements graphically rather than by specifying them textually.  It attempts to bridge the gap between the digital and physical worlds by simplifying the prototyping process for interactive objects.  It combines a specialized set of components with a novel communication protocol (called the Firefly Firmata, or Firmware) which together enable real-time feedback between hardware devices such as the well-known Arduino microcontroller and the Rhino / Grasshopper modeling environment.  All this happens instantly -  so there's no compiling.  Your program runs as you build it, making development and prototyping an extremely rapid process.


Advanced Code Generation


Leveraging Grasshopper's visual programming interface, Firefly gives you the ability to quickly mock-up and prototype ideas for interactive objects and devices.  It achieves this mostly by sending data back and forth over the serial port really quickly.  But, what if you want your device to stand-alone... meaning you don't want to be tethered to your computer by a pesky USB cable.  In order to do this, the microcontroller must be programmed, typically using some C++ or Arduino code.  

Fortunately, Firefly has an advanced Code Generation feature which translate the spatial representation of your Grasshopper code directly into Arduino compatible code.  And it does this all on the fly.  Now, you don't need to worry about writing all of that code yourself.  Simply, prototype your design as you normally would, and the Code Generator will work in the background writing all of the code necessary to make your design come to life!

Connect to Physical Devices​ in Real-Time

Firefly alleviates the hastle of interfacing with external hardware. The Firefly toolset has pre-built components that allow you to connect to many of the most popular hardware devices including data acquisition devices, mobile phones, cameras, game controllers (like the Wii Nunchuck and Microsoft Kinect) and audio interfaces to name but a few.


Computer Vision Tools


Firefly has an extensive suite of computer vision, analysis, and effects tools.  Integrate video feeds (now with multiple camera support), load individual images (.jpg, .tif, .png, .bmp, etc.), play video files and more.  Firefly also includes several filtering, graphic effects, and compositing tools to manipulate live image data.  In addition, you can create your own custom filters using convolution kernels.  You can also take advantage of computer vision algorithms such as optical flow, gradient vectors, contour vectors, and color analysis to make your next interactive project a visual success.

Comment Wall


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

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 simonlullin 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 :)

Comment by Nathan Barnes on March 25, 2014 at 3:08pm


Wondering if I can get some assistance. I'm trying to get the stepper and reset pin of the delta stratum printer working. I can run the stepper with the quad stepper sketch and I can run read the reset pin if I load the firmata, but I cant seem to load both at the same time.

Any ideas how to better go about it?

Comment by Andy Payne on January 11, 2014 at 5:49pm

Hi Shahriar,

Yes, it definitely should be possible.  In fact, the QuadStepper firmata already uses the AccelStepper library which is also a Adafruit library, so I imagine it's just a matter of using the correct methods for the library you intend to import.  Best of luck.

Comment by shahriar akbari on January 11, 2014 at 11:28am

hey Andy

Recently I bought a Adrafruit motor shield for arduino and did some examples with arduino to control Stepper motors. do you think that by edditing your arduino code for Quadstepper, its possible to control the motor shield in grasshopper? I used the AF_motor library for arduino to control the stepper and is pretty easy. 


Members (381)



Search Grasshopper


  • Add Photos
  • View All

© 2014   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service