algorithmic modeling for Rhino
Hello,
I have a program with four two-way faders controlling servos and LEDs that I'm having trouble perfecting. I need to find a way to start the faders offset from one another, so that one begins its cycle while the other three are dormant. When the first reaches its peak the next one should begin its cycle, and so on. Currently I can only get them to function in unison.
Is there a way to delay the start of the fader cycle? There is no on/off input in the two-way fader component and I don't know any other way to enable/disable the component.
This is all being exported to my arduino via code generator. Maybe I should just rewrite the code in the arduino program?
Tags:
Can you upload the code that your getting?
My guess would be that adding a delay in the code would be the simplest thing to do.
Definitely, here it is. I'm not very experienced with writing code which is why I was doing it in Grasshopper
Two ideas and not having the hardware I cant relay test this (my experience is mostly guess and check only knowing enough to be dangerous)
1- in the code there are the lines
void setup() {
Fader2_StartTime_0 = millis();
Fader2_StartTime_1 = millis();
Fader2_StartTime_2 = millis();
Fader2_StartTime_3 = millis();
Fader2_StartTime_4 = millis();
Fader2_StartTime_5 = millis();
Fader2_StartTime_6 = millis();
Fader2_StartTime_7 = millis();
try giving the time you want in milliseconds so 1000=1sec? for each fader between the ()
idea 2
if idea 1 don't work
in the void loop add the line
delay(1000);
with whatever time you want between each fader starting in the ().
it looks like it is all kinda happening at once so you might need to sort out which servo goes with which fader.
hope this helps
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