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.
Andy Payne
Ryles,
So your using Rhino 4.0 (with the latest release of Firefly 1.0066 which was released just 2 days ago)? And you've made sure to copy all of the files in the installation folder (including the C_sawapan_media.dll into the Roaming Folder for Grasshopper (making sure to remove any prior versions of Firefly which may have already been installed)? And you've unblocked each of the files? If you've followed each of these steps, then I'll need to speak directly with Panagiotis, as his library should work on most machines. It's using DirectShow to automatically connect to your video capture device (BTW, have you tried disabling your default video capture device, if you have one... sometimes with the PS3 camera it will still try to default to an older one if it's installed and thinks that is the default camera... You can disable it in the Device Manager). Let me know if you followed all of these steps and are still running into issues, and I'll try to talk to Panagiotis about whether there is something in his library that would be causing the issue.
-Andy
Mar 16, 2012
Philipp
Hoorrah! Now waiting for kinect gestures components)
Mar 18, 2012
Mohammad Azinkia
Do u know how can we run over 4 servo motor by an Arduino!?Is it possible?
Mar 20, 2012
Andy Payne
Hi Mohammad,
Yes, you can easily drive more than 4 servo motors with a single Arduino Uno. Basically, the Firefly Firmata takes advantage of the Servo library which is part of the stardard Arduino IDE. With the Servo library you can control up to 12 servo motors using an Arduino Uno (there is one limitation in that the servo library disables PWM capabilities on pins 9 and 10). You can find out more about how the servo library works here: http://arduino.cc/en/Reference/Servo
The biggest issue in controlling more servo motors is the amount of power you need to supply to each motor. It's likely that a single Arduino powered directly from the USB cable will be able to supply enough power to control more than 2 motors. You will likely need to provide an external power supply that has the proper voltage and amperage specs to properly power your motors. I don't know which servos your using (and how many) but you should look at the datasheet and determine your power requirements. Adafruit sells a pretty beefy regulated (switching) power supply which may work for your application (http://www.adafruit.com/products/658). This one will supply up to 10 Amps of current and 5V regulated voltage. Does this help?
-Andy
Mar 20, 2012
Mohammad Azinkia
Thanx andy for taking your times! Actuly I want to know if we have many servoes about 50, how can we run them by arduino?
Mar 22, 2012
MiChaElLa
Is it me or does it take forever to load to the discussions?
Mar 25, 2012
Andy Payne
Hi MiChaElLa,
No, I haven't had any troubles loading the discussions. Is it just on the Firefly discussions? Or other groups as well? Is anyone else having trouble like this?
-Andy
Mar 26, 2012
Andy Payne
Hi Mohammad,
You can control up to 9 Servos using the Uno Write component and you can control up to 34 Servos using the Mega Write component. If you want to control up to 50 Servos, then you'll likely need to buy 2 Mega boards, or some combination of Megas and Unos. Again, power will likely be the most important consideration as each of those servos (if they're all going to be driven at the same time) will draw some amount of current, so you need to add up your loads to determine your power requirements.
HTH,
Andy
Mar 26, 2012
MiChaElLa
Hi Andy,
I get this when I try to post to the discussions:
Please keep this page open so we can finish uploading your files to the forum.
Meanwhile, feel free to open a new browser window and continue using Grasshopper.
It just spins and spins... and I can't seem to add to the discussion...
Mar 26, 2012
MiChaElLa
Hi Andy
I was trying to post to the firefly discussions...
Mar 26, 2012
Andy Payne
Hi MiChaElLa,
This sounds like a NING issue (the provider for the Grasshopper forum). What browser are you using? I typically use Chrome and haven't had any issues, but I feel like I've had some problems in the past with other browsers. Have you tried emailing the NING Technical support, or even Scott Davidson from Rhino (who setup the forum)?
-Andy
Mar 26, 2012
Danny Boyes
@ MiChaElLa,
I sometimes get this when I have the file open that I'm trying to load. As soon as I get the message and then go and close the image or gh file it completes.
I use Chrome as well.
Mar 26, 2012
MiChaElLa
Thanks for the info. I am using chrome as well. I'll email them. Perhaps in the mean time I can ask via the comments? or message you? what I am having issues with? Thank you.
Mar 26, 2012
Danny Boyes
I don't actual use Firefly that much I just joined the group to give you my insight on the uploading issue. I would suggest you start a discussion and use a website like Mediafire.com to upload your files to then you can post the links in the discussion.
---
In the interest of neutrality I would like to say that there are other file uploading websites available :))
Mar 26, 2012
kleerkoat
@ Andy... Got it working flawlessly with my PS Eye, guess my laptop's webcam is bunk.
Thanks for your help and the plugin!
Mar 26, 2012
kleerkoat
@Andy... this is really odd. it didn't work with my laptop's camera, plug in the PS Eye, and the laptop camera then works and it doesn't use the PS Eye. Tried disabling the laptop camera and it stopped capturing. No complaints, just thought i'd share that oddity. Main thing is, I can get it working now!
Mar 26, 2012
Mohammad Azinkia
Thanks andy!
Mar 28, 2012
Carlos B.M.
Hi!!!
I'm having problems With the "UNO READ": it 's red all the time and no data is collected. I can "Write" and control manually some Leds, but not through the data collected by my sensors. I have developed an equalizer definition, And I need to control it With a sound sensor.
Even When I change the position of the USB in other sockets, always recognize that I'm using COM 3. Is this normal??
I hope you could help me to make it work, before Friday! It's my project delivery day.
Thanks,
Carlos
Aug 1, 2012
Andy Payne
Hi Carlos,
For future reference, it's probably better to start a discussion (above) for more detailed questions... that way we can start a thread about the topic and track any questions all the way through. Nevertheless, the description of your problem makes me think that for some reason the data being sent from your arduino isn't being formatted correctly, and thus the Uno Read component is throwing an error when the incoming data doesn't match the expected format. You may have already tried this, but can you double check that you have loaded the Uno Firmata properly onto your board. You might have loaded the Mega Firmata onto your Uno board, in which case it may not be sending the right data over to Grasshopper. To see if the firmata is working properly, load it onto your board and then launch the serial monitor in the Arduino IDE (make sure your port is closed in Grasshopper and that the serial monitor baud rate is set to 115200). You should see a long string of data (separated by commas) streaming down the page. That is the string of data that is being sent over to Grasshopper... so if this is working properly, then you should be able to open the port in Grasshopper and then use the Uno Read component to retrieve that data and parse it up.
If this doesn't work, could you post a screen shot of your circuit, or provide more information about what type of sensor you are using? You mentioned a sound sensor (is that a microphone?). Hopefully we can figure this out before your deadline (although I'm currently out of town and do not have regular access to my computer... so I may be a little less responsive than usual).
Cheers,
Andy
Aug 1, 2012
Carlos B.M.
Ok Andy!! thank you very much for your suggestions, any way I changed my strategy, and I have used an other arduino board in the computer of my partner, to save up time. I will check forward these steps to try to knwo What-the-Fck is going on with mine!
Thanks for all!!
Aug 2, 2012
CarloMaria Ciampoli
This is not really the way it should look, right?
Is Firefly supported on R5 64-bit?
Thanks Andy
Aug 21, 2012
Andy Payne
Hi CarloMaria,
Unfortunately, Firefly isn't yet supported on 64-bit applications. Well, to be more accurate... the computer vision and audio tools aren't supported on Rhino 5 64-bit. This is because the C_sawapan_media.dll which is what Firefly uses to tap into the video capture devices and microphones isn't compiled for 64-bit applications (this was noted as a known bug in the ReadMe.txt file in the download zip file). It's on the list of things to work on over the next few months (it's actually a relatively big task to update that library)... but for now, if you want to use the Computer Vision and Audio tools, you have to use either Rhino 5.0 32-bit or Rhino 4.
Sorry for the confusion.
Cheers,
Andy
Aug 21, 2012
CarloMaria Ciampoli
Thanks for your reply Andy!
Aug 21, 2012
Steve Moody
Hey Andy, my Firefly tab looks similar to CarloMaria's, and I wanted to make sure there isn't something I'm missing. I've never been able to use the vision or audio tools in rhino 5, but the OSC components were invaluable to me and were working fine in 64bit rhino 5 until I upgraded to grasshopper 0.9 and the timer attached to the listener started going haywire. Are the OSC components also broken in 64bit now?
Thanks!
Aug 23, 2012
Andy Payne
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
Aug 23, 2012
Steve Moody
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!
Aug 23, 2012
Andy Payne
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
Aug 23, 2012
Steve Moody
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
Aug 23, 2012
David Stasiuk
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!
Oct 4, 2012
Andy Payne
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
Oct 4, 2012
Philipp
it will be really nice not only to test colors for similarity but also find a most similar color in the list
Oct 10, 2012
lmnts
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
Oct 26, 2012
philipp hornung
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
Nov 22, 2012
Andy Payne
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.
Nov 22, 2012
philipp hornung
hi andy,
thank you for your quick reply!
yes, i had installed the accelstepperlib..
what else could it be.. any idea?
thank you
Nov 22, 2012
philipp hornung
..thats outlined while trying to run firefly's quadstepper definition:..any clue?
thank you!
Nov 22, 2012
Andy Payne
Hi Phillip,
No, I do not think it has anything to do with the Code Generator (in your last image). The code generator is unnecessary unless you want the arduino to run autonomously (and not connected to your computer). As long as your board is connected to the computer via a USB cable, then we can send serial information back and forth.... so we can just use Firefly natively through Grasshopper.
I think the main issue is uploading the code onto your board. Nothing will work properly if the Quad Stepper sketch isn't loaded onto your board. In looking at the screenshots you've posted, it looks like all of the Firefly sketches (including the Firefly Firmata, Quad Stepper Sketch, and Wii Sketch) are located in your libraries folder. However, these should be placed in the root Arduino folder (in MyDocuments/Arduino)... not inside the libraries folder. You still need the libraries folder there, and in that folder should be the Accel Stepper library... but the Firefly sketches should be placed in the root sketchbook folder. I'm not exactly sure if this is what's causing the issue... but when you open the Quad Stepper sketch, you shouldn't see the other tabs (AccelStepper and FireflyFirmata) like it does in the original screenshot you posted. I think it's trying to load these sketches as well, and causing a conflict. Try the suggestion above and let me know if that fixes your problem.
HTH,
Andy
Nov 22, 2012
philipp hornung
hi andy,
great.. now it seems to work!
..and the upload worked too! thanks mate! :)
but unfortunately my setup is still not working.. wondering why...
have to check the polarity of the steppers... hmm..
but thank you so far andy!
will post something if i manage to get it workin..
best
philipp
Nov 22, 2012
philipp hornung
andy,
btw.. do you got experience with the polulu stepper driver? ;)
Nov 22, 2012
Andy Payne
No. Unfortunately, I haven't tried that particular driver. But as far as I know, it should work with the Firefly Quad Stepper sketch. Are you still having difficulty? BTW, it might be best to start an actual discussion thread (above) instead of on the general message board... that way we can track the entire conversation.
Nov 22, 2012
philipp hornung
yes, as far as i read thru the documentations.. it should work as well.
sorry.. you are rigth.. new thread.
Nov 22, 2012
Miguel Vidal
Hello! As there is a keyPressed component, is there other one for mousePressed?
what windows functions are you using for this tools in case I would need to use them in a script?
thanks!
Jan 23, 2013
Andy Payne
Hi Miguel,
The IsKeyPressed component makes use of the built in User32.dll Microsoft library (http://en.wikipedia.org/wiki/Microsoft_Windows_library_files) Once this library is imported into the project, you can tap into key events (and potentially other events... although I'm not sure this is entirely necessary for mouse events... Grasshopper is already doing some stuff for mouse events).
Jan 23, 2013
Miguel Vidal
Hi Andy!
Thanks for your reply, I´ll try that.
One more question: in the last version of Firefly, did you erase the functions for sound management?
Jan 24, 2013
Andy Payne
What do you mean, erase the functions for sound management? Are the audio components for Firefly not showing up?
Jan 24, 2013
Miguel Vidal
Exactly!
After installing the latest version of Firefly, the "Audio" Tab is not there.
Jan 24, 2013
Andy Payne
Are there other tabs missing (ie. Computer Vision)? What version of Rhino are you running?
Jan 24, 2013
Yoshi Fukumori
hello Andy! I have the same problem, I have Rhino 5 in 32 and 64, after installing the latest version of firefly the audio tab, computer vision tab and conexion tab are missing.
I check the component folder and all the files are unblock.
thanks for your help and as always thanks for sharing
your knowledge! :)
Feb 9, 2013
Andy Payne
Hi Yoshi and Miguel,
Sorry to hear your having troubles. It seems like for whatever reason it's not recognizing the Firefly_X.gha (which contains all of those components). My hunch is that the installer is not overwriting the existing files (even though that is set in the installer settings). Can you both try to manually delete all the existing Firefly files and dependencies (including the C_sawapan_media.dll) and try to re-install. I think if the files are not there, then the installer will copy the new files and it should work (at least I hope). Can you try this and report back. Thanks.
Feb 9, 2013
Yoshi Fukumori
Hello Andy! it works for 64, but for 32 I still have the problem.
Feb 9, 2013