棕黑紅金 1K
------------------------------------------------------------------------------------------------------------------
呼吸燈
(http://yehnan.blogspot.tw/2012/02/arduino_16.html)
int brightness = 0;
int fadeAmount = 5;
int delayDuration = 30;
void setup() {
pinMode(3, OUTPUT);
}
void loop() {
analogWrite(3, brightness);
brightness = brightness + fadeAmount;
if (brightness <= 0 || brightness >= 255) {
fadeAmount = -fadeAmount ;
}
delay(delayDuration);
int potValue = analogRead(A0);
delayDuration = map(potValue, 0, 1023, 1, 50);
}
------------------------------------------------------------------------------------------------------------------
電磁砲
(http://tw.taobao.com/item/40133466195.htm?spm=a1z3o.7695283.0.0.0Rrn5h)


自己大概接的電磁砲 會在修改
沒有留言:
張貼留言