Skip to content
jsaPublic

About

USB joystick to PPM using Raspberry Pi

Resources

Stars

84 stars

Watchers

16 watching

Forks

Latest commit

 

History

68 Commits

Folders and files

Repository files navigation

flystick

A python script for Raspberry Pi that reads a USB joystick (with pygame) and outputs a PPM signal to RC transmitter (with pigpio).

For the mandatory blinky-blinky, supports VERY FANCY (or so) visualizations for Scroll pHAT.

The input/output-mapping and visualization are highly configurable.

YouTube screenshot

Motivation

I wanted to try out how it's to fly FPV with a joystick. Project https://github.com/Iezious/rcjoy/wiki did seem very interesting, but I wasn't that thrilled about the low-level, hardware-specific approach; I wanted a simpler and more future-proof solution.

When the Raspberry Pi Zero came out, it seemed like a perfect hardware component for solving the problem. And then with the python libraries, the whole set came together very nicely — with very little code.

Setup (on Raspberry Pi)

Installation

  1. sudo apt-get install python-pygame git

  2. http://abyz.co.uk/rpi/pigpio/download.html

  3. Optional: from https://github.com/pimoroni/scroll-phat:

    curl -sS https://get.pimoroni.com/scrollphat | bash

  4. git clone https://github.com/jsa/flystick.git

Configuration

  1. Calibrate joystick, see jscal. Also the related jstest, jscal-store, and jscal-restore.

  2. Configure channel mapping.

  3. Configure Pi for safe unplugging.

  4. Insert to /etc/rc.local BEFORE THE LINE exit 0:

    pigpiod
    
    cd ~pi/flystick
    python flystick.py &
    cd -
    

Wiring

  1. 5V → Raspberry Pi

  2. Raspberry PPM output → transmitter trainer port

About

USB joystick to PPM using Raspberry Pi

Resources

Stars

84 stars

Watchers

16 watching

Forks

Releases

Packages

Contributors

Languages