SunFounder ESP32 Starter Kit
2. Scripting for Rocketship
The Rocketship sprite is to achieve the effect that it will appear at a random position and then be controlled by the
joystick to move it up, down, left, and right.
The workflow is as follows.
• When the green flag is clicked, have the sprite go to a random location and create 2 variables x and y, which
store the values read from pin33 (VRX of Joystick) and pin35 (VRY of Joystick), respectively. You can let the
script run, toggling the joystick up and down, left and right, to see the range of values for x and y.
4.16. 2.13 GAME - Star-Crossed 573