www.keyestudio.com
Upload test code successfully, LED gradually becomes brighter then darker,
like human breath, rather than turn on and off immediately.
(6) Code Explanation
When we need to repeat some statements, we could use FOR statement.
FOR statement format is shown below:
FOR cyclic sequence:
Round 1:1 → 2 → 3 → 4
Round 2:2 → 3 → 4
...
Until number 2 is not established, "for"loop is over,
After knowing this order, go back to code:
for (int value = 0; value < 255; value=value+1){
...}
for (int value = 255; value >0; value=value-1){
...}
71