algorithmic modeling for Rhino
Is there a quick way to combine the Quadstepper Firmata with the Firefly Firmata? I'm noticing the Quadstepper Component cannot work at the same time as the Uno/Mega Read/Write Components, either the Firefly or Quadstepper Firmata needs to be uploaded.
Tags:
In this case I'm trying to send a Quadstepper command (speed, acc, M1, M2, M3, M4) and then ask GH to wait for the motors to complete the step, and then send a new command. I'm having trouble setting this up, so any help would be much appreciated.
Hi Erick,
Right now, the Quadstepper Firmata and the standard Firefly Firmata are separate sketches. The primary reason is the pin configurations dealing with the stepper are a little different than how the standard Firmata works. It's definitely possible to modify either sketch to incorporate some features of the other sketch. I think it would be relatively easy to modify the Quad Stepper sketch so that you can read the analog sensor data... however, most of the digital pins are already taken up for stepper control... so you might not be able to use all the digital pins for input. As a side note... have you looked at the commands in the Accelstepper library? I believe there are some functions that are non-blocking (which is what I'm using)... but there are others which are blocking. Blocking functions means it will wait until the command is finished processing before moving to the next line. So, if you changed the functions to blocking, then that might do what you're after (without the need for sensor inputs). I haven't tested the blocking functionality with the Grasshopper workflow... but this might be one solution to look for.
Cheers,
Andy
The blocking functions are just what I'm after. Thanks for the tip!
Great. Did you get it to work? Let me know if you need any help.
-Andy
I took a look at blocking, but the blocking doesn't seem to work for simultaneous commands. With a 3d printer or router, I want to send one command to x,y, and z motors, have that command finish, and then send the next command. I think blocking would only work for one motor at a time? Or maybe there's a basic syntax for multiple commands that I'm missing.
Also, I still couldn't get the stepper speeds I need when going from GH to Arduino. The Accelstepper library seems to be much slower than just writing HIGH, delay, LOW, delay in the Arduino IDE. Still not sure what's going on there.
Yesterday I took a shot at using GH to generate gcode, send that to a .tsv file, and then using Processing to send the commands to Arduino. That seems to be working well for the moment. I'll keep you updated with any progress. Thanks for checking in.
Erick
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by