keyestudio
www.keyestudio.cc
35
Serial.begin(9600);
}
void loop()
{
for(val=255; val>0; val--)
{
analogWrite(11, val);
analogWrite(10, 255-val);
analogWrite(9, 128-val);
delay(1);
}
for(val=0; val<255; val++)
{
analogWrite(11, val);
analogWrite(10, 255-val);
analogWrite(9, 128-val);
delay(1);
}
Serial.println(val, DEC);
}
//////////////////////////////////////////////////////////
Result
Directly copy the above code into arduino IDE, and click upload
, wait a few seconds, you can
see a full-color LED
Summary of Contents for Basic starter kit
Page 1: ...1 ...
Page 10: ...keyestudio www keyestudio cc 8 Connection for 2560 R3 ...
Page 17: ...keyestudio www keyestudio cc 15 Connection for 2560 R3 ...
Page 21: ...keyestudio www keyestudio cc 19 Connection for 2560 R3 ...
Page 25: ...keyestudio www keyestudio cc 23 Connection for 2560 R3 ...
Page 29: ...keyestudio www keyestudio cc 27 Connection for 2560 R3 ...
Page 39: ...keyestudio www keyestudio cc 37 Connection for 2560 R3 ...
Page 62: ...keyestudio www keyestudio cc 60 Connection for 2560 R3 ...
Page 66: ...keyestudio www keyestudio cc 64 Connection for 2560 R3 ...
Page 77: ...keyestudio www keyestudio cc 75 Manual for LED segment display ...
Page 78: ...keyestudio www keyestudio cc 76 Connection for R3 Connection for 2560 R3 ...
Page 90: ...keyestudio www keyestudio cc 88 Connection for 2560 R3 ...
Page 94: ...keyestudio www keyestudio cc 92 ...
Page 95: ...keyestudio www keyestudio cc 93 Connection for R3 Connection for 2560 R3 ...