This can be changed to any value between 1 and 127 using the I2C command It reduces the amount of data transmitted and makes it easier to process at the receiving device.It is very useful for transmission of the data via XBee to a remote device.
The HEX option converts the SERIAL output into single Hexadecimal bytes and adds a CRC checkdigit. This directly creates the values needed for the Arduino Servo commands. This is useful for instance if you are directly controlling servo's from an Arduino board as the SCALE setting can be set to 180 to give an output of 0 - 180 with 90 being the center position. This feature allows you to alter the output to match your controlling program. With the joystick in the center position the output will be half this value. SCALE sets the maximum value for the joystick axis. The USB Host board will communicate over serial TTL at the following baud rates Commands take effect immediately and are stored in Eeprom on the board. Either by microcontroller or via a terminal program and a suitable serial TTL connection. The last two entries are the joystick manufacturer VID and PID.The output is comma delimited and the format looks like the following $JOY,90,90,180,90,90,90,90,90,90,0,0,0,0,0,0,0,0,0,0,0,0,0,0,07B5,0316 Configuration SettingsĬonfiguration can be done by sending commands via the serial port. The serial output corresponds to the axis and buttons above with the axis displayed in order first, followed by the buttons. Move the joystick around and click each button and note which value changes. The best way to see which axis and buttons are available, is to monitor the serial output.
The software will identify all the major axis and buttons/switches used. Some joysticks have only basic X and Y axis and a few buttons, whilst some have many more axis of movement and many more buttons. I2C makes for an easier interface to implement directly from a microcontroller but serial TTL is a good choice if you want to use the joystick as a remote control device sending signals wirelessly. This can give you much more functionality than a traditional Radio Control system and it is much easier to access the control inputs directly in a microcontroller.Īll the analog stick and button presses are available using either standard serial TTL or via I2C communication.
The USB Joystick software for our USB Host board allows you to easily read the analog stick inputs and all the switch inputs from a USB Joystick. See the USB Host Board and IC product pages for details on pricing and installing this software. To order, simply select which of our boards or IC products you wish to have the software loaded onto. Please note: This software is free to download but only works on one of our USB boards or chips which must be bought separately (see below).
This is a free software download for our USB Host Board and USB Host IC's ( SOIC, DIP, SSOP). The USB Joystick Software allows you to connect a USB Joystick to the USB Host Board and read the analog stick inputs and button presses using I2C or serial TTL