Giter VIP home page Giter VIP logo

joystick_controller's Introduction

JoyStick-Controller Example

[δΈ­ζ–‡]

Board Support Status
ESP32-S3-BOX NO
ESP32-S3-BOX-Lite NO
ESP32-S3-BOX-3 YES

This project is developed based on Espressif's ESP32-S3-BOX-3 and ESP32-S3-USB-Bridge, aiming to create an open-source project that caters to both gaming controllers and remote control for model aircraft.

This guide will assist you in quickly getting started with ESP-JoyStick and provide all the detailed information about the project.

More information is on ESP32-S3-BOX-3-JoyStick.

This guide includes the following sections:

  • Project Overview
  • Hardware Reference
  • Application Development
  • Related Documentation

Project Overview

The ESP-JoyStick hardware system comprises the ESP32-S3-BOX-3 development board, JoyStick controller, and ESP32-S3-USB-Bridge receiver. The ESP32-S3-BOX-3 serves as the main controller, connecting to the JoyStick controller and ESP32-S3-USB-Bridge receiver through a PCIe interface. The system operates in "Game Mode" and "RC Remote Control Mode." In Game Mode, it supports USB-HID and BLE-HID protocols for computer gaming control, as well as an NES emulator mode. In RC Remote Control Mode, it utilizes the ESP-NOW wireless communication protocol to pair with ESP32-S3-USB-Bridge(Purchase link: TaoBao or Aliexpress) and other Espressif development boards(where the ESP32-S3-USB-Bridge or other Espressif development boards act as the model aircraft receiver), enabling wireless control of RC cars and ESP-Drone quadcopters.

ESP-JoyStick Overall Physical Diagram

  • Game Mode:
    • USB-HID Mode: Connect to the computer using a Type-C data cable, control computer games through the USB-HID protocol, and customize joystick and button functions.
    • BLE-HID Mode: In this mode, the JoyStick is connected to the computer via Bluetooth using the BLE-HID protocol, enabling control of computer games with customizable joystick and button functions.
    • NES Emulator Mode: In this mode, games from the NES emulator can be displayed on the screen of ESP32-S3-BOX-3.

ESP-JoyStick control computer games

  • RC Remote Control Mode: ESP-JoyStick establishes a paired connection through the ESP-NOW wireless communication protocol with other Espressif official development boards (receivers) such as ESP32-S3-USB-Bridge. This enables wireless remote control for RC cars, ESP-Drone quadcopters, and other model aircraft.

ESP-JoyStick remote control the ESP-Drone

ESP-JoyStick control the RC car

Hardware Reference

To ensure that ESP-JoyStick has a comfortable grip, this project has optimized the PCB board shape and designed a matching 3D enclosure for it.

The following is a map of the main components of the ESP-JoyStick.

ESP-JoyStick Front

ESP-JoyStick Back

Application Development

ESP-JoyStick has two joysticks. Each joystick, functioning similarly to a variable resistor, has varying resistance values at different positions. Utilizing the series voltage divider principle, the joystick's position can be inferred by detecting the voltage value. To capture the attitude, two ADC channels are used for each joystick. In addition to this, each joystick has a membrane button that developers can utilize.

ESP-JoyStick has a total of 16 physical buttons. Each button operates with a high logic level when not pressed and a low logic level when pressed. Due to the limited number of IO ports available on ESP32-S3-BOX-3, this project employs two 74HC165D parallel-to-serial shift registers. Developers can simulate SPI communication using three IO ports to read the status of all the buttons.

The vibration motor is controlled through a transistor (S8050). Developers simply need to configure one IO port as an output mode. When the port outputs a high logic level, the motor vibrates, and when it outputs a low logic level, the motor does not vibrate.

For specific pin assignments, please refer to the schematic diagram of ESP-JoyStick.

Related Documentation

joystick_controller's People

Contributors

thunder-m-y avatar

Watchers

 avatar

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.