“Joystick Controls Kitty”的版本间的差异

来自Microduino Wikipedia
跳转至: 导航搜索
(Created page with "{{Language| Joystick Controls Kitty}} {| style="width: 800px;" |- | ==Objective== Control the kitty’s movement through Joystick. ==Principle== Read X-axis and Y-axis simmul...")
 
(没有差异)

2015年5月21日 (四) 03:16的最新版本

Language English

Objective

Control the kitty’s movement through Joystick.

Principle

Read X-axis and Y-axis simmulation values of Joystick and control kitty’s movement in all directions according to different values.

Equipmemt

Hardware Buildup

  • 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.

Software Debugging

  • Setup 1:Build Scratch programming environment.
  • Setup 2:Start programming. Example program download: 文件: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.

Result

Move around the Joystick and you can see corresponding movement of the kitty on Scratch.

Video