SunFounder ESP32 Starter Kit
• So when the value of the digital pin 2 (Line Following module) is 1 (black line detected), then switch the costume
to Black.
• Otherwise toggle the costume to White.
5. Scripting for Heart sprite
Heart sprite is protected inside Square Box, and by default is a red costume. When the Arrow1 sprite is touched, the
game ends.
648 Chapter 4. Play with Scratch