Giter Club home page Giter Club logo

flystick's Introduction

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

flystick's People

Contributors

jsa avatar

Watchers

Tim Ma avatar James Cloos 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.