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.

  • hassan.orion

    m using rhino 4 sr8, which grasshopper version will firefly 3 works? firefly 4 wasnt working withit nor is 3?
  • Andy Payne

    Hi Hassan,

    I'm a little confused by your question.  Are you saying that Firefly 1.003 or 1.004 are not working on your machine (with Rhino 4 SR8)?  Have you made sure to remove any previous installation files?  Check these locations to make sure any old installations of Firefly have been removed:

    C:\Program Files (x86)\Rhinoceros 4.0\Plug-ins\Grasshopper\Components

    C:\Users\username\AppData\Roaming\Grasshopper\Libraries

    Then, go to www.fireflyexperiments.com and download the latest version (which is 1.005... released last week).  Please follow the installation instructions found on the download page (you have to copy/past two files into the proper directory).  If this is still not working, could you please post a screenshot of the error message or provide a little more information so we can help you debug this problem.

    Thanks,

    Andy

     

  • hassan.orion

    Hi ,

     Thanks for helping me out... i just checked , i have rhino Sr7.  my error is same as this one http://www.fireflyexperiments.com/discussions/post/1232576.

    Error something about newer version ... SDK...

    Its mentioned over there that firefly will work on 0.7.0053, but this version is asking for SR8. Now the prob is SR8 s askin for Key which i hav lost ... where can i find SR8 or is there any way of running Firefly on my current settings ( SR7 + 0.6.0059)  as this version is supporting geco and rabbit too

  • Andy Payne

    Hi Hassan,

    Unfortunately... there was a big shift in the core infrastructure between the older builds (0.6.0059) and the newer ones 0.8 and higher.  The move was made to make Firefly compatible with the newer version because all future versions of GH would be using this new Rhino common... so unfortunately, Firefly will not run on older versions of GH.  You could try to download and install an evaluation version of Rhino (http://download.rhino3d.com/rhino/4.0/evaluation/download/).  This is a fully functional version, but it will only allow you to save 25 Rhino files.

    HTH,

    Andy

  • hassan.orion

    Hi,

    I bought Arduino UNO just 2 days back. i tried some LEDs it was fine. now when i am upto Stepper motor, i cant afind any logic to feed numbers in grasshopper that does cyclic rotation. i have moved it in Arduino software ( processing type) . now i want to have controlled radian rotation.

     

    hassan

  • hassan.orion

    can anyone tell me how to run a stepper motor from arduino uno???  its working fine in processing and ardunio sketches
  • Andy Payne

    Hi Hassan,

    Sorry for not responding sooner.  Jason posted a stepper solution on the Firefly Experiments website.  Check out this discussion and let us know if you need more help:http://www.fireflyexperiments.com/discussions/post/1438445

  • hassan.orion

     

    Can the definition work without the Easy driver board. ?  Please guide me how to run it through grasshopper?? i cant buy any more boards...i just need to feed (1000 0100 0010 0001 ) numbers in sequence to stepper through Gh. i hope this will get it running... isnt this possible in gh....?

     

  • Andy Payne

    Hassan,

    The generic Serial Write component allows you to send any string you want out to the board... So, you can send the value (1000 0100 0010 0001 ) very easily just using the generic serial write (as in the stepper example).  The only tricky part is you have to parse through the data being sent over the serial port and get it into a format that can be read by the board.  Please look through the stepper example code, as this is taking the data sent over from the board and processing it so it can control the easy driver board.  I'm assuming that since you know exactly how you want the data to be sent to the board, that it shouldn't be too hard. 

  • hassan.orion

    i download  " easy drive stepp potentiometer  code" its still not working... can u send me any simple def. that just roates a 4 wire stepp motor.Untitled.png... m a newbe n m stuk since 2 weeks
  • hassan.orion

    could you please giude me step by step. i ll be very thankfull
  • hassan.orion

    i m uploading standat firmata2_2_for uno_3... just mentioning if there s any prob with that.

     

  • hassan.orion

    ok. thanks, i ll be waiting
  • claudemit

    hi,could I upload some data to pachube directly with firefly without processing? I receive some data from sensors through arduino,make some deal with them and want to send some of the data to pachube .It's a little trouble that doing the same thing in two software.
  • Andy Payne

    Hi claudemit,

    At the moment, there is no way (with Firefly) to post data to Pachube.  Its been on my list of something to consider implementing into the tool set, I just didn't know if there was a lot of demand for it.  But, I can take a look at it.  It will likely be a little more complicated as it requires more information to create a feed (than just downloading the current values).  I'll try to take a stab at it, but I don't know when I'll have a time-frame on the next release.  Sorry that I don't have a better solution at the moment, but thank you for your feedback.

    Cheers,

    Andy

  • claudemit

    hi andy,

    Thanks for your reply.I think we can download the date of some existing buildings from pachube,and then make some simulation and different optimizations in grasshopper or Physical models.It will be funny to show the comparison diagrams on pachube.well,it's just some random thoughts about the "demand".

  • Gia Djahaia

    Presentation of «Branchpoint: Interaction» Workshop on Strelka School 2011 student project of Interactive cluster.
    Arduino+2 Infrared Proximity Sensors, Firefly(Grasshopper), Kinect, vvvv.

    Students:
    Aleksandr Stepanov
    Maksim Pesov
    Anna Misharina
    Nelly Kareva
    Ekaterina Kapatun

    Mentors:
    Eduard Haiman
    Vadim Smakhtin
    Giya Djahaya

    Branchpoint.ru
  • Gia Djahaia

    Branchpoint Interaction Workshop on Strelka 2011.
    Interactive cluster workflow.

  • Andy Payne

    Hi Giya,

    Great videos... Very fun.  I really like the dance floor visualization. Congrats!

    -Andy

  • Gia Djahaia

    Thank you. Btw we were lacking of some features in firefly while developing speedometer based on two proximity sensors and arduino.

    We had to rewrite the bang (TogEdge) component and FlipFlop component like they are in vvvv to grasshopper in order to perform needed boolean operations. And grasshopper timers are awful. We need normal flexible counters!

    So my "wishlist" for next firefly release is about adding this features. I will appreciate if you implement these things.

    Cheers.

    -Giya.

  • Andy Payne

    HI Giya,

    Thanks for the suggestions. I have to admit that I'm not an expert in vvvv and as such I don't exactly know how the TogEdge and FlipFlop components work.  If you could describe how they work (and how they might be applied in a normal setting) I could definitely look into adding this functionality into Firefly.  Also, if possible, I'd like to move this discussion over to the Firefly forum so it can be tracked more closely: http://www.fireflyexperiments.com/discussions/post/1579096?lastPage...

    Thanks again for your input.

    Cheers,

    Andy

  • EliseElsacker

  • claudemit

    hi,I meet a problem,when i  send some data to grasshopper with the serial read,the UNO read shows error:solution exception:conversion from string "23.20" to type 'integer' is not valid. How can i solve this problem?

  • Andy Payne

    Hi claudemit.  Do you think you could upload a screenshot of your definition?  I'm just curious to know how you setup your definition/arduino sketch to see how I can help troubleshoot your problem.

    Cheers,

    Andy

  • claudemit

    hi andy,I use the DPin2 connect a Temperature &Humidity sensor AM2302 with  the library written by  http://www.ladyada.net/learn/sensors/dht.html. if I send the result to firefly meanwhile i use the "UNO read " ,it just show "solution exception:conversion from string "23.20" to type 'integer' is not valid" and not work.I have tried to change the type of the result ,as integer and  float,but it comes out similar error . So i reedit the arduino file like this,it seems to solve my problem.Firefly_UNO_Firmata.pde Please give me some suggestion.

  • Andy Payne

    Hi claudemit,

    There's two different approaches you could take to get this to work.  The first, and I believe the easiest in this case, would be to use the Generic Serial Read component instead of the Uno Read.  The Uno Read has been specifically set up to work with the Firefly_Firmata and expects that the data being sent over from the Arduino has been formatted properly.  If you just try to use the code from the LadyAda tutorial, then the data doesn't match what the Uno Read component is expecting, and it throws you an error.  The Generic Serial Read component is much more flexible... Essentially, it will return anything coming over the serial port (looking for a carriage return and new line feed as the end of line marker).  I haven't test this, but you should be able to use the code (as is) from the LadyAda tutorial, and just use the Generic Serial Read to return the data.  You'll need to open the port first (just like before) but just use the Generic Read instead of the Uno Read.

    The other option is hacking up the Firefly firmata to get it to work with the DHT library and so that the data is properly formatted correctly.  It looks like you were fairly close... but here are a few problems that I see. First, I see you commented out the DPin2 sensor reading line... which is completely fine... but farther down you're actually adding two sensor readings (humidity and temperature).  The Uno Read component is looking for a string with a certain amount of elements in the buffer... so if you're sending two new sensor elements, you need to comment out two of the other lines.  So, I would recommend also commenting out the DPin4 sensor reading line.  Also, I see you changed the delimter between the sensor elements to a semi-colon (;) instead of a comma (,).  The Uno Read uses the comma to determine where to parse up the string coming over from the Arduino... Thus, these need to remain as commas and not semi-colons.  As far as I can tell, the rest looks good.  Hopefully this helps.

    Cheers,

    Andy

  • claudemit

    Hi andy,

    Thanks for your reply.
    I have tyied just sending one of the sensor readings to GH each time using the Generic Serial Read component. The problem occurs when I use the uno Read component to read the other pins at the same time. So I change the Firefly firmata file to send all the information to GH using the Generic Serial Read component. I find that the Uno Read uses the comma to determine where to parse up the string coming over from the Arduino...so I change it to a semi-colon (;) ,and segment them in GH.I don't know why I can't send somthing by Generic Serial Read component and use the Uno Read at the same time.

  • Andy Payne

    Hi claudemit,

    I guess I'm a little confused as to what it is you would like to do.  How many sensors do you have in your setup?  There are a few different ways to tackle this problem... I'm just trying to find out the most efficient way to do it.  

    As I said, the Uno Read has been setup specifically to work with the Firefly Firmata.  If you modify the Firmata (which is totally fine to do) just know that the data being sent over to Grasshopper has to be formatted the same as the original Firmata sketch.  The Uno Read component uses commas as the delimeter (where to split the data).  If you add in some of you're own data, make sure it's separated by commas and not semi-colons.  The Uno Read component isn't really that different from the Generic Serial Read component.  The biggest difference is that the Uno Read has already been setup to parse through the string of data, splitting it up at the commas and sending the values out to the right output pin.  The Generic Serial Read component just returns the overall string of information (without doing any post-processing on the string data).  So, I don't know why you would want to use both of them at the same time.  I would recommend using one or the other.  If you use the Generic Serial Read, you can basically send any string of data over the serial port... however, you may need to do some post-processing on this data (such as splitting the string up at the commas).  If you use the Uno Read, then the string has to be formatted in the exact same way as the original firmata sketch (so the same number of sensor values separated by commas).  Otherwise it will throw you an error.  Does this make sense?

  • Philipp

    Hey, i have two requests for the nest version.

    First, i played aroud with a kinect node and it is awesome. Altrought, i think it will be nice to have another one just with customizable grid of points, their depth and color.

    Second idea is actually already realised bu David here - it is a node which works same as "if button pressed" but instead "if object selected"/ But now it works bit slowly, maybe you`l find how to speed it up (  just rewrite it in c#?) 

  • Andy Payne

    Hi Phillip,

    Thank you for your suggestions.  I have been working on a whole new suite of computer vision components... and your Kinect suggestion would work well here.  It's something I plan to implement... I just I have to find the time to work on it.  But thank you for bringing it to my attention.

    I will also look into the second idea... But I was wondering if you could describe the application for such a component.  It looks like you want to find the GUID from the geometry in a Rhino file, and when a certain piece of geometry is selected, then this component would return true, otherwise it would return false.  Is this correct?  Do you want this to drive a light? motor? start a counter? all of the above?  I'm just curious as to where you might want to use this type of component.

    Cheers,

    Andy

  • Philipp

    Andy, thank you for quick reaction. oh yeah, it will be great to implement some face/hand recognision components...)

    Yes, actually i just wanted to "separate" data 0 to show only the data   connected to selected point or face, or start a reaction algorithm (kangaroo or spm, lets say). But it will be cool also to connect this to firefly to actuate led or servos, you are right.

     

  • Pablo0o0oo0o000oo

    KINECT+FIREFLY INSTALATION

    In this post pretty well explains the work done during the workshop of parametric motionthat was used for grasshopper + kinect

    I HOPE U LIKE IT...

  • Mårten Nettelbladt

    The current download link has a typo: http://www.fireflyexpreiments.com/

  • Andy Payne

    Thanks Marten!  The link has been fixed.

  • Mehmet Ali

    I am looking for a way to connect Grasshopper to Lego Mindstorms NXT robotic kit. Does firefly have a functionality on this fact?

  • Andy Payne

    Hi Mehmet,

    Unfortunately, I have no experience with Lego Mindstorms so I don't know if it's possible to control it or not.  I can say that I haven't built any tools specifically for this functionality... but that's not to say it couldn't work with some modifications.  Firefly essentially works through serial communication so if Lego Mindstorm can receive information using the serial protocol then it's possible it could work.  You will probably want to use the Generic Serial Write component for this (as the Uno Write is specific to the Arduino and the Firefly Firmata).

    -Andy

  • Scott Davidson

    Mehmet -

    You may want to look at this blog post on Lego Mindstorms: http://www.robotshop.com/gorobotics/articles/lego-mindstorm-nxt-ard...

  • Andy Payne

    Regarding Ryan's questions:

    Hey Andy, I'm curious what drivers you are using for the PS Eye?
    Thank you,
    ryan


    You can download the PS3 Eye camera drivers from (http://codelaboratories.com/downloads/) At the bottom of the page, you'll see a link for the CL Eye Platform Driver (for single cameras).  This should be what your looking for. 

    HTH,
    Andy 

  • kleerkoat

    Thanks Andy, I forgot about the discussion area right above here.  Still having problems with the C_sawapan_media.dll not being found.  Any ideas?  Thanks.