Bluetooth Joystick : A wireless joystick with ESP-32 microcontroller and Dual Axis Joystick Module using the Bluetooth connectivity.

Overview

BluetoothJoystick

Bluetooth Joystick : A wireless joystick with ESP-32 microcontroller and Dual Axis Joystick Module using the Bluetooth connectivity.

Table of Contents

About The Project

Aim

This aim of the project is to make a Bluetooth Joystick using ESP32 which establishes Bluetooth Low Energy (BLE) Connection with the host device to provide controls by providing inputs. The ESP32 is capable of getting a unique signal for each key press. Accordingly it will transmit the signal information over bluetooth to the host device.

This image illustrates how our hardware looks like at the current stage

Hardware

Tech Stack

The following technologies have been used for the making of this project.

File Structure

.
├── main                    # Contains files used for building and flashing
├── docs                    # Documentation files (alternatively `doc`)
│   ├── report.pdf          # Project report
│   └── results             # Folder containing screenshots, gifs, videos of results
├── src                     # Source files (alternatively `lib` or `app`)
├── ...
├── test                    # Test files (alternatively `spec` or `tests`)
│   ├── benchmarks          # Load and stress tests
│   ├── integration         # End-to-end, integration tests (alternatively `e2e`)
│   └── unit                # Unit tests
├── ...
├── tools                   # Tools and utilities
├── LICENSE
├── README.md 
├── Setup.md                # If Installation instructions are lengthy

Getting Started

Prerequisites

To flash this project install ESP-IDF: https://github.com/espressif/esp-idf

Cloning the repository

Clone the project by typing the following command in your Terminal/CommandPrompt

git clone https://github.com/Krishna-13-cyber/BluetoothJoystick.git

cd BluetoothJoystick

Hardware

Connections

Connect the ESP32 to your desktop via USB to flash the code in it. And connect the Joystick to ESP32 as per the table given below. Connection Illustration

JoyStick Pin ESP32 Pin
5V 3V3
GND GND
VRx GPIO39
VRy GPIO34
SW GPIO25

You are all set to flash the code after completing the connections.

Usage

After following the above steps , use the following commands to: Build

idf.py build

Flash

idf.py -p (PORT) flash monitor

Configuration

idf.py menuconfig

Theory and Approach

Theory:

  • The main motto of the project is to make the setup wireless.This can be achieved by using the ability of ESP-32 to have BLE within it with which it can be connected over bluetooth to the Computer System and returns the value according to the movement of the joystick.
  • The esp-idf(Espressif's official IoT Development Framework)which was the main resource for our project, has all the information about the pinning system and channels present have to be read and their use have to studied from here.The framework tells us the about the channels which can be used,the usage of pins for different functions(ADC,DAC,GRD) and the channels which are more efficient in bluetooth connectivity are to be used,which is ChannelNo.1 in our case.
  • There is a dual-axis high quality JoyStick Module . It can be used to sense movements in 2 directions(axes). It also has an inbuilt switch which can be activated by pressing the stick.This is the joystick module which we are using in the project.
  • The values received from the ADC are the voltage values(raw values),as voltage values which are analog are first converted to binary and then to digital format,So it is obtained in the raw form.The ADC values are ranging from 0-4095 as it works on 12 bit,that is it has 4096 values.The values returned depend on the movement of joystick and returns extreme values for the end point movement. The joystick, depending on the requirement of the game or task,its use can be changed and modified in 2-D constraint(joystick supports 2-D movements only).

Approach:

  • The approach of the project is quite simple and understandable,first of all its aim is to make a bluetooth joystick.To take a look at the hardware stuff we need a joystick module(2-D module in this project),a ESP-32 microcontroller(according to the version kitc the pinout may vary),jumper wires for connection.
  • For the bluetooth establishment we tried by connecting our esp32 as a mouse.To understand when the connection is established,how does the mouse behave as in the cursor.Next we start to connect the proper pinout connection of the ESP-32 to the Joystick. So we want the system to know that if a joystick is moved the ESP-32 send or returns some value,for that we have the concept of ADC,this continuously sends the instant voltage values and when we move our joystick in different direction(2-D) it returns different values(extreme values are expected for end movements).
  • Then finally we have integrate both together that is the bluetooth part and joystick returned values(which will tell the movement respective to our code).According to the condition we want(the range of values), we can assign a function to send mouse the values(cursor speed,specifications).This will complete our project and can be modified to be used in games.This can be used in games where there is only a 2-D requirement as the joystick supports 2-D use only.

Code Flowchart

Flowchart

Results and Demo

These are the output obtained in initial stage as shown in the link attached to the below mentioned video.

These are the Output of the Games played with help of Joystick Module. Mouse-Game Mouse-Game2

Future Work

  • The following developments are yet to be achieved
  • Establishing BlueTooth Connection
  • Obtaining ADC Values
  • Moving the Cursor
  • Controlling a Game
  • Using it to send keyboard keys
  • Adding more buttons to it

Troubleshooting

While Configuring for the first time if you face any problem, check the ESP-IDF's Menu Configuration

idf.py menuconfig

Then go to components/bluetooth and enable bluetooth Press ctrl+s to save the configuration then

idf.py build

Contributors

Acknowledgements and Resources

License

The License Used for this Project.

Exploits the Wii U's bluetooth stack to gain IOSU kernel access via bluetooth.

BluuBomb Exploits the Wii U's bluetooth stack to gain IOSU kernel access via bluetooth. For a more detailed write-up see WRITEUP.md. Not to be confuse

null 94 Jun 30, 2022
ESP Insights is a remote diagnostics solution that allows users to remotely monitor the health of ESP devices in the field.

ESP Insights is a remote diagnostics solution that allows users to remotely monitor the health of ESP devices in the field.

Espressif Systems 28 Jun 21, 2022
Veml7700-esp-idf - VEML7700 Light Sensor driver for ESP-IDF

VEML7700 Light Sensor driver for ESP-IDF Overview This project aims to provide a very simple interface for configuring and reading data from the VEML7

Kristijan Grozdanovski 3 Apr 4, 2022
imGuIZMO.quat is a ImGui widget: like a trackball it provides a way to rotate models, lights, or objects with mouse, and graphically visualize their position in space, also around any single axis (Shift/Ctrl/Alt/Super)

imGuIZMO.quat v3.0 imGuIZMO.quat is a ImGui widget: like a trackball it provides a way to rotate models, lights, or objects with mouse, and graphicall

Michele Morrone 254 Jun 12, 2022
This is a project from my Embedded Systems Lab course. It's made using C and intended for the MSP430FG461 microcontroller.

This is a project from my Embedded Systems Lab course. It's made using C and intended for the MSP430FG461 microcontroller.

Ben Bruzewski 1 Dec 21, 2021
mCube's ultra-low-power wake-on-motion 3-axis accelerometer

MC3635 mCube's ultra-low-power wake-on-motion 3-axis accelerometer Based on mCube's Arduino demo driver, this sketch is specific for the MC3635 3-axis

Kris Winer 3 Jun 2, 2021
A simple example for 'Arduino' compatible boards to interface with I2C to the MPU-6050, a 6-axis micro-electromechanical IC

Arduino-MPU-6050 A simple example for 'Arduino' compatible boards to interface with I2C to the MPU-6050, a 6-axis micro-electromechanical IC ==About==

Ivan 1 Oct 19, 2021
Fix some extrinsic parameter importing problems. 6-axis IMU works now. Lidar without ring works now.

LVI-SAM-MODIFIED This repository is a modified version of LVI-SAM. Modification Add function to get extrinsic parameters.The original code assumes the

null 64 Jun 22, 2022
My DIY 3 Axis Camera Slider Project

3Axis Camera Slider My DIY 3 Axis Camera Slider Project Authors NEWTech-Creative * Myles Newton GitHub YouTube Original project inspiration from * Raj

NEWTech Creative 7 Jun 11, 2022
This repository is a drone attitude measurement solution with 9-axis

This repository is a drone attitude measurement solution with 9-axis

Xianhao Ji 2 Feb 14, 2022
Code of 4-axis cube robot.

CubeRobot In 2017, Zeguang Chang and I built a cube robot using DSP and STM32. We open source all the code of CubeRobot in this repository. You can fi

Shunli Wang (王顺利) 7 May 3, 2022
Design files and resources for building a wireless N64 controller

wireless-n64-controller This project and its documentation is a Work-In-Progress. I'm still working on writing everything down and working out kinks i

Spencer Fraint 32 Jun 18, 2022
My new zigbee project. Wireless temperature and humidity mini sensor with electronic ink display 2.13 inches, low power consumption, compact size, enclosure with magnets.

My new zigbee project. Wireless temperature and humidity mini sensor with electronic ink display 2.13 inches, low power consumption, compact size, enclosure with magnets. The device use SHTC3 sensors, chip CC2530, battery CR2477.

Andrew Lamchenko 13 Feb 22, 2022
gr-nrf24-sniffer is a tool to receive and decode wireless traffic from nRF24L01(+) modules

gr-nrf24-sniffer What is this? gr-nrf24-sniffer is a tool to receive and decode wireless traffic from nRF24L01(+) modules (or older nRF24xxx) using GN

null 5 Jun 22, 2022
WT32-ETH01 LAN 8720 RJ45 wired Wireless-tag

WT32-ETH01 LAN 8720 RJ45 ESP32 wired Wireless-tag WT32-ETH01 +/-7 Dollar ESP32 with Ethernet jack https://www.google.com/search?q=WT32-ETH01 Buy it fr

Dirk Luberth Dijkman 49 May 29, 2022
Wireless remote controller for Klipper 3D printers

StacKlipper Wireless remote controller for Klipper 3D printers Description StacKlipper is a remote controller for Klipper (Moonraker installed) 3D pri

null 16 Apr 4, 2022
Code for our ECE445/ME470 design: Wireless Charging Table with Automatic Alignment

Qi Wireless Charging Table with Automatic Alignment Code for ECE445/ME470 Senior Design Project SP21 at ZJUI. Team 24: Kaiwen Cao, Tianyi Han, Tingkai

Zikai Liu 2 May 1, 2022
A wireless control for an RGB LED based on emotions found in discord messages.

Sample project (See the README.md file in the upper level 'examples' directory for more information about examples.) This is the simplest buildable ex

Fernando Mendoza 2 Dec 1, 2021
Wgeo, or "wi-fi geolocator", is a cross-platform C/C++ library for wifi-based device geolocation, utilising public wireless access point location databases

wgeo Wgeo, or "wi-fi geolocator", is a cross-platform C/C++ library for wifi-based device geolocation, utilising public wireless access point location

Xavier Maruff 2 Jan 30, 2022