Grasshopper

algorithmic modeling for Rhino

Hi there,

I'm new here so first I'd like to say thanks to all the developers working on these amazing projects. I'm really excited about Grasshopper & Firefly (I just wish I knew how to use them a bit better!)

I've created a gh sketch based on the embarrassingly simple premise of an array of 3d objects rotating to 'face' a moving target - modelled in this case by a point (eventually planning to use Kinect Skeleton tracker for this)

espoSpinners.gh - for full excitement you'll need to draw yourself a point and an XYplane base curve in Rhino viewport - I like triangles

I want to take these output angle values in the panels on the RHS and use them to drive servos via an arduino.

I don't want to use steppers, because a.) I want loads of them b.) I'm too poor, and c.) I don't need super accuracy

I've got one of the Adafruit 16 channel PWM Servo drivers http://www.adafruit.com/products/815 and I was wondering how I would go about running it from gh/firefly via arduino?

Do I have to export these angle values somehow and pull them up in a Python script? Should I be doing the whole thing in ghPython? (bearing in mind I have perhaps five hours total python programming experience, that's gonna be the hard road)

or has someone already made a gh component for this :) 

I'm sure some of this is RTFM stuff but I was hoping some of you clever folks could point me in the right direction?!

Kind regards,


Ed

Views: 691

Replies to This Discussion

Hi Ed,

three years later, did you ever figure out how to do this? I think I'm actually looking to do a very similar thing (I even have the same servo driver) and wondering how to set it up. Any lessons learned?

hey,

i connected 8 servos without the adafruit thing to arduino, you´ll need a external power supply for the servos, if you not put this, the arduino will disconnect every time if more of two are in action at same time. the script in gh with firefly is easily made with the descriptions in internet- getting the values and remap.

Hi Chapulin,
Thank you for replying to the question. The reason I am using the Adafruit driver is that I actually need to connect 100 servos. The challenge I'm running into is not hardware based as far as the hookup or power but rather software based in that I'm not sure how to expand the number of available pins through the components available in Firefly. I am chaining 5 of the Adafruit drivers which is allowing me to turn two Arduino pins into 98. The trouble is that I don't know how I would access each of these pins through the firefly components. At this point I'm interested in finding out if anyone has actually done this or if I need to switch to an entirely different approach to solving the problem. Any thoughts would be greatly appreciated!

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service