Grasshopper

generative modeling for Rhino

Information

Firefly

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.

Website: http://www.fireflyexperiments.com/
Location: Cambridge, MA
Members: 316
Latest Activity: on Monday

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

Remembering values with rotary switching 10 Replies

Hi Everyone.I am using a rotary switch with firefly that sends values to a stream gate. I want to remember the last set of data sent via the stream after switching. Can VB scripting do this? In the image below stream 1 is reading data but stream 2…Continue

Tags: gate, stream, switching, firefly

Started by Scott Mayson. Last reply by Andy Payne May 14.

Serial read problem in Firefly 6 Replies

Hi guys,I'm communicating with a 3D printer via Grasshopper / Firefly (and eventually) Silkworm.So far, I can quite happily send G-Code move commands to the printer  - which is a Leapfrog Creatr, based on Arduino Mega / RAMPS electronics - via the…Continue

Tags: GCode, Read, Serial, Firefly

Started by fergal.coulter. Last reply by fergal.coulter May 10.

Possible to connect 12 micro servos to Arduino Uno board and control each one separately? 4 Replies

I am as much of a novice to Firefly and Arduino as one can get. I have 12 servos and an Arduino Uno board... is it possible to connect them all to a single board and control their rotation values in Firefly...? I'm investigating myself as of writing…Continue

Started by Adam Roark. Last reply by Andy Payne Apr 23.

Pleated Skin Actuation

Hi I'm trying to actuate the pleated skin shown in this model. I am planning on using servos to move the pleated skin in the form of a sin wave. I have a series of structural columns in the model that would be the base for the servos, but I was…Continue

Tags: pavilion, firefly, pleats

Started by Nicholas Murao Apr 9.

News


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

Comment

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

Comment by Andy Payne on November 22, 2012 at 1:02pm

Hi Phillip,

Have you installed the Accel Stepper library?  There is a ReadMe.txt file included in the Stepper folder which explains how to do this.

Comment by philipp hornung on November 22, 2012 at 12:55pm

hi,

i am new to arduino/firefly..

and trying to build a kinetic modell, run two-axis's each by a stepper motor.

thats the hardware i am using:

2x stepper nema17

http://datenblaetter.physicalcomputing.at/StepperNEMA17.pdf

---

arduino mega2560 r3

http://arduino.cc/en/Main/ArduinoBoardMega2560

---

2x stepper drivers polulu

http://www.pololu.com/catalog/product/1201

http://www.pololu.com/file/download/a4983_DMOS_microstepping_driver...

i tried to do the wiring like shown in this picture:

http://www.physicalcomputing.at/.media/825136296502.png

and here you can see the wiring in my setup:

i tried to upload the quadstepper firmata onto my arduino board but without success. (uploading the firefly firmata seems to work on the first look.)

i allways get the following errors shown in the screenshot.

what i am doing wrong? is there something incompatible... what could be the problem?

i hope someone knows the problem/a solution/hint..

thank you in advance!

philipp

Comment by lmnts on October 26, 2012 at 12:18pm

I'm trying to get more speed on a stepper motor through the Quadstepper Driver.  The max speed I can get at the moment for a Vexta Nema 17 (http://www.interinar.com/vexta-px243m-03aa.html) is about .3 rotations per second.  If I test the quad stepper on a smaller stepper like this one ((http://robotics.reefat.com/wp-content/uploads/2008/08/PF35T-48L4.pdf), I'm able to get faster speeds.

At first I thought this was a hardware/power supply issue, but I tested a sample sketch from this site: http://lusorobotica.com/index.php/topic,106.0.html on the Vexta NEMA 17 and was able to get the increased speeds I was looking for.

I can't get higher speeds than .3 rotations per second using the Quadstepper Component.  Is there any way there a line in the code which is limiting the max speed?  

Thanks for any help.

-Erick

Comment by Philipp on October 10, 2012 at 3:35pm

it will be really nice not only to test colors for similarity but also find a most similar color in the list

Comment by Andy Payne on October 4, 2012 at 8:36pm

Hi David,

I haven't seen this behavior before... but I haven't used the Engine component much (since David re-wrote the GH Timer some time ago)... although I can see the benefit of using it because of the customized timing intervals.  Out of curiosity... does the number your sending to the motor fail at a given number? Say, something outside the bounds of -32,768 to 32,767.  Or does it just fail after a given number of intervals?  Do you want to share a definition?  Also, it might be helpful to start a discussion post on this topic so we can keep all of the comments in a specific thread.

-Andy

Comment by David Stasiuk on October 4, 2012 at 5:05am

I'm trying to send timer-triggered strings through the quad stepper motor controller and am having some difficulty...it will work for several timer steps, and then simply stop driving the motors...so, for example, every second I'd like to pulse my 1st motor by -250 steps using a 1000 max speed and 1000 acceleration. The string list goes as follows:

-250,0,0,0,1000,1000,1,0

-500,0,0,0,1000,1000,1,0

-750,0,0,0,1000,1000,1,0

-1000,0,0,0,1000,1000,1,0

etc.

Using Giulio Piacentino's "theEngine" script to drive a list selection of these string instructions, one by one, results in the motor being correctly pulsed for a variable number of changes in the timer value (which is actually dependent on the timer interval itself...the longer the interval, the fewer pulses will work...in this case, if I set the interval at 1000, 8 pulses work, if I set it at 100, 42 pulses work...so strange).  But really I'm trying to feed quite a long list of changes through...we're using this to drive a wire bending machine that relies on a feeder motor, a z-rotation motor, and a bending motor.

So the motor runs for these few pulses, then simply cuts out, although the arduino LED that indicates it's reading incoming information continues to pulse along with the timer.  Anyone have any idea what may be going on?  Something about the buffer in the arduino firmata script getting overloaded?  I have no idea!

Comment by Steve Moody on August 23, 2012 at 6:02pm

I'm unaware of how to link a file in one of these posts so I'll send an email with the gh file and the TouchOSC file I've been using with it to the  info@fireflyexperiments.com address for you to check out.

Steve

Comment by Andy Payne on August 23, 2012 at 4:59pm

Hi Steve,

I think downgrading to Rhino 5.0 32-bit should solve the issue with the toolbar.

As for the OSC problem... Do you think you could send me a file that shows the issue you described.  In theory, nothing in the list should be removed (and re-added) since the messages are stored in a dictionary (key, value) and only updated if the incoming message key matches one already stored in the dictionary.  Again, nothing (from a Firefly perspective) has really changed in that regard.  Perhaps something in the Grasshopper core changed, which is causing this issue.  If you have a working file that you could send... that would be helpful so I could try to diagnose the problem.

Cheers,

Andy

Comment by Steve Moody on August 23, 2012 at 4:55pm

Thanks for the quick reply,

I am using R5 64bit, the arduino and utility tools appear, but no networking, and none of the .dlls are blocked.  When I boot up Rhino 4, all of the components are there.  I'm going to try to reinstall to see if I can get the networking stuff into R5, as that's really what I need.

On a somewhat related note, I'm trying to upgrade so I can try the updated osc listener because I ran into problems with this component when I upgraded to grasshopper 0.9.  After the upgrade, the output of the osc listener toggles between the received data and an empty list at the rate of the attached timer.  Before it would simply update the values based on the timer, but now it seems to clear all the values and reload them with each tick of the timer, and this breaks the rest of my script.  Is there a way to avoid this?

If you have any tips they will be much appreciated, otherwise I think I will just downgrade both grasshopper and firefly till everything is worked out.

Thanks again!

Comment by Andy Payne on August 23, 2012 at 4:33pm

Hey Steve,

Sorry to hear your having trouble.  Are you using Rhino 5 32-bit or 64-bit?  Just curious.  All of the components should work in 32-bit and the Arduino, Networking, and Utility tools should work in both versions.  I've tested them in Rhino 5 and they work on my machine.  If your screen looks like CarloMaria's, can you double check that all of the .gha files and .dll's have been unblocked.  To do this, right-click on each of those files (included in the installation folder) and select Properties.  On the pop-up menu, at the bottom of the page, you should see a button that says Unblock (this only appears if they are currently being blocked).  For some reason, downloading files off the internet causes some of the files to get blocked... and Rhino 5.0 is more picky about loading them in that instance.  Let me know if that helps.  Also (and I found this out recently from another user)... it's better if you don't have both 32-bit and 64-bit versions installed on your machine at the same time.  It seems that sometimes this can cause a conflict too.  When the other user uninstalled the 64-bit version, everything loaded fine in the 32-bit application.

There' haven't been any major changes to the OSC components.  I did add a couple of features mainly to parse up some of the messages sent from other applications... notably from GyrOSC (http://www.grasshopper3d.com/video/gyrosc-kangaroo).  Some of the messages are sent as lists of 4 values (like the quaternions sent in that app) or lists of 9 values (like the matrices sent using that app).  Anyway, other than adding datatype parsers for these, I didn't change anything else about the component... so it should work as before.  Let me know if you're still having trouble.

Cheers,

Andy 

 

Members (316)

 
 
 

Translate

Search Grasshopper

Photos

  • Add Photos
  • View All

© 2013   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service