void setup() {
// put your setup code here, to run once:
pinMode(3,OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
for(int i=0;i<=255;i++)//呼吸燈slow變亮
{
analogWrite(3,i);
delay(10);
}
for(int i=255;i>=0;i--)//呼吸燈slow變暗
{
analogWrite(3,i);
delay(10);
}
}
沒有留言:
張貼留言