Control the kitty’s movement through Joystick.
Read X-axis and Y-axis simmulation values of Joystick and control kitty’s movement in all directions according to different values.
- Setup 1：Stack CoreUSB and Sensorhub
- Setup 2：Connectt Joystick to analog port A0 and A1. There is pin description on two sides of Sensorhub, to which you can connect sensors correspondingly.
- Setup 1：Build Scratch programming environment.
- Setup 2：Start programming. Example program download: File:Move Cat.zip
- Setup 3：Code description—Detect values of Joystick for one part and the kitty will make correspsonding movement according to the values.
- You need to create two variables to save Joystick data.
- Move the kitty according to two variables.
Move around the Joystick and you can see corresponding movement of the kitty on Scratch.