GithubHelp home page GithubHelp logo

stm32f103-usb-joystick's Introduction

STM32F103 USB joystick with gestures

This project implements a USB joystick with gestures recognition. That means that you can use the joystick to recognise gestures and then send them via USB to your workstation (you can also use UART if you prefer). The gestures can be composed with up to JOYS_SAMPLES_MAX samples and each sample can be one of the following:

  • U : up
  • D : down
  • L : left
  • R : right
  • UR : up - right
  • DR : down - right
  • DL : down - left
  • UL : up - left
  • B : button press

Each gesture is transmitted via USB with following prefix:

DATA=

and a \n (newline) at the end of the string.

For example, this is a full circle on the joystick

DATA=U,UR,R,DR,D,DL,L,UL,U

You can see a sample video in here

How to compile and flash

You need cmake to build this project either on Windows or Linux. To setup the cmake properly follow the instructions from here. Then edit the cmake/TOOLCHAIN_arm_none_eabi_cortex_m3.cmake file and point TOOLCHAIN_DIR to the correct GCC path.

e.g. on Windows

set(TOOLCHAIN_DIR C:/opt/gcc-arm-none-eabi-4_9-2015q3-20150921-win32)

or on Linux

set(TOOLCHAIN_DIR /opt/gcc-arm-none-eabi-4_9-2015q3)

Then on Windows run build.cmd or on Linux run ./build.bash and the .bin and .hex files should be created in the build-stm32/src folder. Also, a .cproject and .project files are created if you want to edit the source code.

To flash the HEX file in windows use st-link utility like this: "C:\Program Files (x86)\STMicroelectronics\STM32 ST-LINK Utility\ST-LINK Utility\ST-LINK_CLI.exe" -c SWD -p build-stm32\src\stm32f103_wifi_usb_psu.hex -Rst

To flash the bin in Linux: st-flash --reset write build-stm32/src/stm32f103_wifi_usb_psu.bin 0x8000000

FW details

  • CMSIS version: 5.3.0
  • StdPeriph Library version: 3.6.1
  • STM3 USB Driver version: 4.1.0

stm32f103-usb-joystick's People

Contributors

dimtass avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

raypopo

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.