2016-03-25 16:47:20 -07:00
# strobe light activity
Develop shapes with a for loop.
### ~avatar avatar
2016-05-26 15:24:10 -07:00
2016-03-25 16:47:20 -07:00
Welcome! This guided tutorial will teach how to develop shapes with a for loop. Let's get started!
### ~
2016-11-01 17:44:37 -07:00
Create a `for loop` that will loop from 0 to 4 to indicate the x-coordinates of the @boardname @ display.
2016-03-25 16:47:20 -07:00
```blocks
for (let i = 0; i < 5 ; i + + ) {
}
```
2016-11-01 17:44:37 -07:00
Create another for loop that will loop from 0 to 4, indicating the y-coordinates of the @boardname @ instead. This for loop will light each LED by column.
2016-03-25 16:47:20 -07:00
```blocks
for (let i = 0; i < 5 ; i + + ) {
for (let j = 0; j < 5 ; j + + ) {
}
}
```
We will light up each LED by plotting them individually.
```blocks
for (let i = 0; i < 5 ; i + + ) {
for (let j = 0; j < 5 ; j + + ) {
led.plot(i, j)
basic.pause(200)
}
}
```
The pause will add a delay between lighting each LED.
2016-03-30 15:54:19 -07:00
```blocks
for (let i = 0; i < 5 ; i + + ) {
for (let j = 0; j < 5 ; j + + ) {
led.plot(i, j)
basic.pause(200)
}
}
```
2016-03-25 16:47:20 -07:00
### ~avatar avatar
2016-04-13 08:27:45 -07:00
Excellent, you're ready to continue with the [challenges ](/lessons/strobe-light/challenges )!
2016-03-25 16:47:20 -07:00
### ~