Xin-Mo Controller & Encoder

Dual Players Game Controller

    If you install these software successfully, make the device in Programmer mode and next  run xm_setup.py. If you see this screen means the software communicated successful with the device via USB protocol. If you hope this device as a keyboard+trackball and custom keyboard keys, you need to edit the xm_setup.py before run it. Other mode no need edit. 

How to enter programming mode? 
    Whatever which kind of device mode, keep the 28th pin of P2 connect to GND before power on  the device will enter  the programming mode. The configuration software only can communicate with Programmer mode. 
​​

---------------------------------------------------------------------------------------------------------------------------------------------

---------------------------------------------------------------------------------------------------------------------------------------------

Feature:
    It supports 2 players at same time. Player 1 has 20 buttons and player 2 has 18 buttons. Direction control can switch by mode button. 

    What is the quadrature encoder signal? A pair of signal include two identical pulse signals, differ in phase by 1/4 cycle. So, X axis has 2 pins, X1 and X2. Likewise Y axis.
    I recommend using this interface trackball. It is simple, only mechanical and optics, no additional chip.
Fast response and low cost. 

---------------------------------------------------------------------------------------------------------------------------------------------

---------------------------------------------------------------------------------------------------------------------------------------------

    In the development process, I found the PyUSB occasionally shows failed messages under Windows OS. So when you run the configuration program failed, try more times. 

Feature:
It has 8 way analog input with 12bits(0—2^12-1) accuracy.
It has 17 buttons and 17 LEDs. Every button can control a LED. The LEDs have 3 different effects: 
        Always light on;
        LEDs light on when buttons are pressed;
        LEDs light off when buttons are pressed;
The LEDs effect configuration can store in the device when power off. Using UP + Mode to switch LEDs effect.
    When the device power on, all LEDs will blink a few times. This will help to check the wiring of LEDs is correct or not. If you are watching more careful you will find the blinks are Morse code 73, means best regards. Yes, I am a HAM.
    When it works in digital input mode, direction control can switch between X/Y axis and Point of View Hat by mode button. Even power off the device will remember your choice.

This product can be separately configuration as 4 different devices. The 4 devices are:

        Customizable Keyboard and trackball(mouse);


        Single player game controller with LED;


        Dual players game controller; (default)


        Custom HID;


When you configure the device as a keyboard and trackball, you can custom the key value of the keyboard as your wish.

 
It has the following characteristics:

        USB 2.0 protocol interface;

        Faster response;

        Micro USB type B female connector;

        More pins;

        LED has 3 kinds of effects;

        8 ways analog input and every way have 12 bits (0---2^12-1) accuracy;

        Configuration software is open source, means you can continue to develop;​


The configuration software was written by Python. Download from here


The USB communication section is implemented by PyUSB. How to install the Python and PyUSB library, refer to this:


       
https://www.python.org/


       
https://github.com/walac/pyusb/blob/master/docs/tutorial.rst;


PyUSB depends on libusb. How to install libusb in windows series platform refer to this:


        How to install libusb in windows.pdf

 

 About how to install these software in Linux, Mac, Raspberry Pi or other system, you can google it. 

Single Player Game Controller with LED

---------------------------------------------------------------------------------------------------------------------------------------------

---------------------------------------------------------------------------------------------------------------------------------------------

Customizable Keyboard + Trackball

Custom HID

---------------------------------------------------------------------------------------------------------------------------------------------

---------------------------------------------------------------------------------------------------------------------------------------------

    This looks a little more complicated. Let me explain.
    Array data has 40 elements. The index number is from 0 to 39. It represents the configuration file of the array named keyvalue. The character behind colon is the default keyboard input characters. You can edit the xm_setup.py file let the keyboard input what you want input character. This function is very awesome. Means the USB protocol support characters, all can be defined, including less common. So you can customize a dedicated input keyboard for yourself.

HID Encoder

    You can connect a variety of sensors to collect data via input pins, or send control signals to the other device via output pins. I wrote a short demonstration program in Python. Code is very simple.
    First, send command 0x03, this means the data afterward are control data. OUT data total 32 bits, so control data have 4 bytes. In demonstration file the control data were: 0x04, 0x05, 0x06, 0x07. If the bit is 1 means output high voltage, 0 means low voltage.
    after send command 0x03 the device will transfer data back. The send back data total 6 bytes. The first four bytes are followed just behind 0x03 transmitted control data, after the execution of read back to check whether all the execution really complete.  The next two bytes from the IN PINs. IN2[4] = 0, forever.

Note: USB port provided current is 100mA max.

Product Name: HID Encoder


Type ID:XM-07

LED wiring method:

About trackball input interface, X and Y axis of trackball input signal are quadrature encoder signals.

      From January 1, 2017, the HID encoder vid and pid has been changed, consistent with the XM-02, the recalbox users can directly use. In the single player model, I added the ps button( button 13) .

Order and price from Here.

---------------------------------------------------------------------------------------------------------------------------------------------

---------------------------------------------------------------------------------------------------------------------------------------------