SunFounder ESP32 Starter Kit
The Block1 sprite is not available in the PictoBlox library, you need to draw it yourself or modify it with an existing
sprite. Here we are going to modify it with the Button3 sprite.
• After adding the Button3 sprite, go to the Costumes page. Now delete button-a first, then reduce both the width
and height of button-b, and change the sprite name to Block1, as shown in the following image.
Note:
– For the width of Block1, you can probably simulate it on the screen to see if you can put down 8
in a row, if not, then reduce the width appropriately.
– In the process of shrinking the Block1 sprite, you need to keep the center point in the middle of
the sprite.
• Now create 2 variables first, block to store the number of blocks and roll to store the number of rows.
• We need to make a clone of the Block1 sprite, so that it displays from left to right, top to bottom, one by one,
4x8 in total, with random colors.
606 Chapter 4. Play with Scratch