Hello,
I am still pretty new to grasshopper and very new to scripting. I have a wall skin ghx that is supposed to respond to body temperature sensors to open up pockets in the wall for a semi-private nook to duck into in a public space if, for instance, one had to make a call.
The definition works generally. I have data from 3 temp sensors corresponding to 3 possible nooks in the wall written to a serial port by arduino. I'm using andy payne's fire fly to read the data in grasshopper and output a position for various control points of splines lofted to make up a wall surface.
The splines currently change states at set threshold values. I scripted the threshold values as if/then/else statements in vbscript.
The model works conceptually in that control points change position to open up pockets in response to temperature change. HOWEVER, the motion is a jump in position and not a smooth transition.
To address this, I'm looking at two options and ask for any help or advice with either OR perhaps suggesting a better way to approach the problem overall.
OPTIONS EXPLORED CURRENTLY:
- 1 -
use Giulio Piacentino's continuous redraw engine -- (have hooked it up but is not working -- not sure what is wrong --- my suspicion is that the use of a timer to read the data coming in over the serial port is resetting the engine before it has a change to execute its sequence --- not sure if this is right diagnosis yet and if so, if there is a work around
- 2 -
add loop to existing vbscript such that once threshold value is achieved, the position of each respective control point steps through values i+1 <= max and the next x number of readings from the serial port are ignored (enough time for the position of each control point to step all the way through its sequence, about 2-3 seconds)
My file and ghx are attached
Any advice is greatly appreciated.