GithubHelp home page GithubHelp logo

touchgadget / flight_stick_tinyusb Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 2.0 1.04 MB

USB Flight Joystick Arduino Library Using Adafruit TinyUSB XAC compatible

License: MIT License

C++ 100.00%
arduino flight-stick joystick tinyusb usb-controller xac xbox-adaptive-controller rp2040

flight_stick_tinyusb's Introduction

USB Flight Joystick Arduino Library Using Adafruit TinyUSB

Create USB flight joysticks using Arduino and Adafruit TinyUSB. This has only been tested on RP2040 boards such as the Raspberry Pi Pico using the Earle Philhower RP2040 board package.

This may work on other boards supported by the Adafruit TinyUSB library but no testing has been done.

The 3D joystick has the following controls.

Control Description
X 10 bits, 0..1023
Y 10 bits, 0..1023
Z 8 bits, 0..255
Throttle 8 bits, 0..255
Buttons 12 buttons
Hat 8 way hat switch/direction pad

The HID report has been carefully chosen so it works with the Xbox Adaptive Controller(XAC). All the other open source XAC joysticks I have seen use 8 bits for X and Y. When used with XAC, only the X, Y, and 8 buttons are supported. This is a limitation of the XAC.

Install this library by downloading a zip file from this repo. Use the IDE "Add .zip library" option.

Dependencies

Use the IDE Library Manager to install the following libraries.

  • "Adafruit TinyUSB Library"
  • "Adafruit NeoPixel"

Install this project as a library by download it as a ZIP file from https://github.com/touchgadget/flight_stick_tinyusb. Then use the Arduino IDE option to install the ZIP as a library.

Troubleshooting

If the following error message appears when compiling, change the USB Stack to "Adafruit TinyUSB" as it says in the message.

   32 | #error TinyUSB is not selected, please select it in "Tools->Menu->USB Stack"
      |  ^~~~~

flight_stick_tinyusb's People

Contributors

touchgadget avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

kanwa001 ultozon

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.