
スポンサーサイト

上記の広告は1ヶ月以上更新のないブログに表示されています。
新しい記事を書く事で広告が消せます。
tag: 新しい記事を書く事で広告が消せます。
#include <DmxSimple.h>
void setup() {
/* The most common pin for DMX output is pin 3, which DmxSimple
** uses by default. If you need to change that, do it here. */
DmxSimple.usePin(5); // 回路のinputのピン番号を指定
/* DMX devices typically need to receive a complete set of channels
** even if you only need to adjust the first channel. You can
** easily change the number of channels sent here. If you don't
** do this, DmxSimple will set the maximum channel number to the
** highest channel you DmxSimple.write() to. */
DmxSimple.maxChannel(4); // チャンネルの数 (研究室のディマーは4chまで)
/*照明にはチャンネルがたくさんある場合があります
LED照明の場合1:Intensity 2:Red 3:Green 4:Blue 5:Orange 6:White 10:Strove
等のように、チャンネルを指定して値を設定出来ます。
*/
}
void loop() {
int brightness;
/* Simple loop to ramp up brightness */
for (brightness = 0; brightness <= 255; brightness++) {
/* Update DMX channel 1 to new brightness */
DmxSimple.write(1, brightness); // DmxSimple.write(チャンネル番号, 0~255の値);
/* Small delay to slow down the ramping */
delay(10);
}
}