|
本帖最后由 lettle 于 2010-4-8 12:12 编辑
grasshopper的插件FireFly 萤火虫 不知道有人发过没有,如果有 版主删了吧。。。。
来自于http://www.liftarchitects.com/journal/2010/3/11/firefly-beta-release.html#comments
安装到x:\Program Files\Rhinoceros 4.0\Plug-ins\Grasshopper\Components里面
对计算机语言无感 貌似是连接Arduino与grasshopper的 具体翻译如下How to use the Serial Read component:
The Serial Read component allows you to retrieve a value coming over the Serial Port. There are three input nodes for this component.
The P-input (Port Number) has to be the same Serial Port assigned in the Arduino IDE. The default port is set to 3 (ie. COM 3) although
this port value may vary depending on computer configurations. The B-input (Baud Rate) value should match the speed set in the Arduino
sketch. Standard values include: 4800, 9600, 14400, 19200, 28800, 38400, 57600. The N-input requires an integer in order to (0) Open Port,
(1) Get Value, or (2) Close Port. You can connect a Timer component to the Serial Read component to retreive values at a given interval.
Note: you should only turn the Timer component "On" after you have opened the port(0) and then retrieved the first value (1). The output
for this component will return a string. If you have sent a numeric value to the Serial Port, you will need to cast the string output of
the Serial Read component into a numeric value. To do this, simply feed the output of the Serial Read component into a Number or Integer
parameter (Params/Primitive).
How to use the Serial Write component:
The Serial Write component allows you to write a string value to the Serial Port. There are four input nodes for this component. The
N,P, and B inputs are the same as the Serial Read (see above for more information). The D-input is the data you wish to write to the
Serial Port. Note: This component does not need to use a Timer component to update at a given interval if you are sending slider information
to the Serial Port.
如何使用串行读组件:
串行读取组件允许您检索一个值通过串口来。这有三个组件的输入节点。
该P -输入(端口号)必须在同一串口IDE中的阿都伊诺分配。默认的端口设置为3(即COM 3个),尽管
此端口值可能取决于计算机的配置。这架B -输入(波特率)值应匹配的Arduino设定速度
素描。标准值包括:4800,9600,14400,19200,28800,38400,57600。的N -输入需要一个整数,以(0)开放港口,
(1)获取的价值,或(2)关闭端口。您可以连接一个Timer组件的串行读组件retreive在给定区间值。
注意:您应该只打开“后,你已经打开的端口(0定时器组成部分”),然后检索到的第一个值(1)。输出
此组件将返回一个字符串。如果你有一个数字值发送到串行端口,你将需要把字符串输出
串行读取内容纳入一个数字值。要做到这一点,只需馈入一个数或整数的分量输出的串行读
参数(Params /原始)。
串行写入组件允许你写一个字符串值到串行端口。这有四个组件的输入节点。该
氮,磷和B输入为串行读相同(见上面获取更多信息)。该D -输入的数据,你想写信给
串行端口。注意:此组件并不需要使用一个Timer组件更新在给定的时间间隔,如果你发送信息滑块
到串行端口。 |
评分
-
查看全部评分
|