Welcome to Building:bit Superkit repository
1.15 About rocker module
About rocker module
1. Introduction to the joystick module
The joystick module can be regarded as a potentiometer with two channels, which can output analog values of the X-axis and Y-axis. The initial output X value and Y value are both 512. Due to the differences in the factory of each joystick, the initialization value may be slightly different. The joystick value of the X-axis direction of the joystick module increases from left to right, and the joystick value of the Y-axis direction increases from bottom to top. The output analog value range of the X-axis and Y-axis is: 0~1023.
The area close to the terminal opening is the lower part of the Y direction, which is used as the standard to distinguish the X and Y directions of the joystick module. For example, when the X-axis moves to the left, the output X value is smaller, and when it moves to the right, the output X value is larger. When the Y-axis moves upward, the output Y value is larger, and when it moves downward, the output Y value is smaller.

2. Sensor parameters