Grasshopper

algorithmic modeling for Rhino

I am trying to control 30 servos with Arduino Mega 2560 but it seems the servos only twitch as I slide through 0-180 to mega write, the output shows lown at 0, and high when the number is bigger than 0.

here are the tests and results I got working with Firefly and Firmata:

- connected 30 servos with external power and mega sensor shield, servos twitch.

- connected 1 servo to different digital pins in several times, servo twitches.

- connected 9 servos to Uno under the same setting, all servos functioned well.

and here is the test I conducted with Mega and Arduino IDE:

- sketched in Arduino IDE to have the servo/s turn 0-180 degrees, servo/s functioned well.

As a conclusion, the Mega board is functional, and Firefly works well with Uno, but not Mega.

I thought something must be missing from firefly and firmatta for mega to communicate with servos, and I came across this post in 2011:  http://fireflylabs.squarespace.com/discussions/post/1540044

the Firefly version I'm using is 1.0.0.70 64 bit, has anyone successfully controlled servos with Mega and the newest Firefly? 

Attached is the gh. definition

Views: 1206

Attachments:

Replies to This Discussion

Turned out I completely overlooked the setting of MegaWrite. Everything works after I right clicked the DPin # and checked "servo" instead of "digital", and the "out" would show the rotating angle instead of "High" and "Low".

Thanks for the help from Andy Payne.

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service