Units – Joystick Unit MEGA328P I2C/Grove Connector



Description


JOYSTICK, we have two types of JOYSTICKs one is build on a panle compatible with FACES Kit, this is the M5Unit version of JOYSTICK

JOYSTICK is very similar to the ‘analog’ joystick on PS2 (PlayStation 2) controllers. The X and Y axes are two 10k potentiometers which control 2D movement by generating analog signals. The joystick also has a push button that could be used for special applications. Therefore, the entire Unit can output X-Y motion signals in both directions and Z direction.

As designed in the schematic, the Joystick X dimension is connected to pin A0 of MEGA328, the Joystick Y dimension is connected to pin A1 on MEGA328, the Joystick Z dimension is connected to pin A2 on MEGA328.

This Unit communicates with the M5Core via the GROVE A interface. It’s I2C address is 0x52. By reading the data transferred from JOSTICK, you can obtain the motion information of JOYSTICK.

 

Feature


  • Output value of X, Y direction: 10 ~ 250
  • Output value of Z direction is (0: released; 1: pressed)
  • Software Development Platform : Arduino, UIFlow(Blockly, Python)
  • Two Lego-compatible holes

Application


  • Game Controller
  • Robot remote control

 

Source PinMap


 

M5Core(GROVE A) GPIO22 GPIO21 5V GND
JOYSTICK Unit SCL SDA 5V GND

Include


  • 1x JOYSTICK Unit
  • 1x Grove Cable