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.

list item

hello everyone,,

sorry for my english/

i have question, in my firefly output (uno write) is written (low,low,low,low,127,low,low,low,low). but i just want to use the number output (179) to my grasshopper definition. because it will replace a number slider. i have tried to using list item, but it doesn't work.


thx,

zaqi


  • up

    Khizer Ishtiaq

    Try connecting it to an integer component to filter the integer from the list...

    1
    • up

      Andy Payne

      It wont work because the output of the Uno Write component is a string (separated by commas).  You could use the String Split component to parse up this string at the delimeter (the comma) which would give you a list of items... from which you could then use a List Item to retrieve the item your looking for... Khizer is right that if you use this method, you'll still probably need to cast it back to an integer (after its been split out) by using an integer parameter.

      All of this though seems like a completely backwards way of going about this.  I can tell from your image that the number your hoping to extract is connected to the DPin9 input.  I can't tell from the image where this number comes from upstream, but if you follow that wire, to the next component upstream you should find the component that is creating that number 179.  Then, just use the number from there directly into whatever your trying to connect it too... There's no need to split the string up, etc... when you can find the value directly upstream.  Does this make sense?

      -Andy

      1