Giter Site home page Giter Site logo

hubsan's Introduction

Python A7105/Hubsan X4 library

Python 2 library for controlling a Hubsan X4 quadcopter, based on the Deviation firmware.

Usage

  • Get a C232HM-DDHSL or equivalent MPSSE cable. Make sure you get one with a 3.3v VDD or you might fry your A7105.
  • Attach the cable to your A7105 chip according to the instructions below.
  • Install libmpsse.
  • Enjoy!

Wiring

A7105 pinout

A7105 wire color
vdd VCC red
gnd (both pins) GND black
sdio DO yellow
sck SK orange
scs CS brown
gio1 DI green

hubsan's People

Contributors

chpatrick avatar

Stargazers

 avatar boguslav avatar  avatar  avatar tomvijfhonderd avatar Bernard Van Haecke avatar Mike Causer avatar Zack Kismarton avatar Candy Chiu avatar Ian Galope avatar Steven Wright avatar Luke Alex Reeve avatar  avatar Cyril Engmann avatar Younes Hamdoud avatar  avatar Nathan Krantz-Fire avatar Paul Wilson avatar  avatar Wadih Frederick Khairallah avatar Yuan avatar Zach Adams avatar Michael Newman avatar Jay avatar Geoff Russell avatar Nenad Rakocevic avatar Akira MATSUDA avatar Maxime G avatar Carden Bagwell avatar Rangel Ivanov avatar  avatar Ian George avatar Nandor Licker avatar Vincent Lark avatar Kaspar Emanuel avatar Christopher Humphries avatar Tim K avatar

Watchers

Arto Bendiken avatar Kaspar Emanuel avatar  avatar James Cloos avatar Christopher Ngo avatar edisno avatar Nathan Krantz-Fire avatar Maxime G avatar  avatar

hubsan's Issues

Hubsan Q4 support?

Hey, thanks for sharing this!

Having some trouble using this to bind to a Hubsan Q4 though. Gets stuck at binding. The blue lights go from alternating to in-sync flashing (like they should) but then go back. I tried increasing the timeout at hubsan.py line 78 but that makes it worse.

Works fine with the controller that comes with the X4 -- it should be the same protocol. I'll try with an X4 soon but do you have any other ideas?

Output with loglevel set to DEBUG in test.py:

DEBUG:a7105:reset()
DEBUG:a7105:read_reg(MODE, 00)
DEBUG:a7105:read_reg(GIO1S, 19)
DEBUG:a7105:initializing registers
DEBUG:a7105:read_reg(MODE_CONTROL, 63)
DEBUG:a7105:read_reg(FIFO_1, 0f)
DEBUG:a7105:read_reg(CLOCK, 05)
DEBUG:a7105:read_reg(CLOCK) == 05
DEBUG:a7105:read_reg(DATA_RATE, 04)
DEBUG:a7105:read_reg(TX_II, 2b)
DEBUG:a7105:read_reg(RX, 62)
DEBUG:a7105:read_reg(RX_GAIN_I, 80)
DEBUG:a7105:read_reg(RX_GAIN_IV, 0a)
DEBUG:a7105:read_reg(CODE_I, 07)
DEBUG:a7105:read_reg(CODE_II, 17)
DEBUG:a7105:read_reg(RX_DEM_TEST, 47)
DEBUG:a7105:calibrating IF bank
DEBUG:a7105:read_reg(CALIBRATION, 01)
DEBUG:a7105:read_reg(CALIBRATION) == 00
DEBUG:a7105:read_reg(IF_CALIBRATION_I) == 06
DEBUG:a7105:calibration complete
DEBUG:a7105:calibrating VCO channel 00
DEBUG:a7105:read_reg(PLL_I, 00)
DEBUG:a7105:read_reg(CALIBRATION, 02)
DEBUG:a7105:read_reg(CALIBRATION) == 00
DEBUG:a7105:read_reg(VCO_CALIBRATION_I) == 14
DEBUG:a7105:calibration complete
DEBUG:a7105:calibrating VCO channel a0
DEBUG:a7105:read_reg(PLL_I, a0)
DEBUG:a7105:read_reg(CALIBRATION, 02)
DEBUG:a7105:read_reg(CALIBRATION) == 00
DEBUG:a7105:read_reg(VCO_CALIBRATION_I) == 11
DEBUG:a7105:calibration complete
DEBUG:a7105:strobe(STANDBY)
DEBUG:a7105:set_power(_30mW)
DEBUG:a7105:read_reg(TX_TEST, 17)
DEBUG:a7105:strobe(STANDBY)
INFO:hubsan:binding started
DEBUG:a7105:write_id(55 20 10 41)
DEBUG:a7105:read_reg(PLL_I, 14)
DEBUG:hubsan:bind stage 1
DEBUG:a7105:strobe(STANDBY)
DEBUG:a7105:write_data(01 14 5f f1 28 56 00 00 00 00 00 00 00 00 00 1d)
DEBUG:a7105:strobe(RESET_WRITE_POINTER)
DEBUG:a7105:strobe(TX)
DEBUG:a7105:read_reg(MODE) == 1a
DEBUG:a7105:strobe(RX)
DEBUG:a7105:read_reg(MODE) == 19
DEBUG:a7105:read_reg(MODE) == 19
DEBUG:a7105:read_reg(MODE) == 19
DEBUG:a7105:read_reg(MODE) == 19
DEBUG:a7105:read_reg(MODE) == 19
DEBUG:a7105:read_reg(MODE) == 19
DEBUG:a7105:read_reg(MODE) == 19
DEBUG:a7105:read_reg(MODE) == 19
DEBUG:hubsan:bind stage 1
DEBUG:a7105:strobe(STANDBY)
DEBUG:a7105:write_data(01 14 5f f1 28 56 00 00 00 00 00 00 00 00 00 1d)
DEBUG:a7105:strobe(RESET_WRITE_POINTER)
DEBUG:a7105:strobe(TX)
DEBUG:a7105:read_reg(MODE) == 1a
DEBUG:a7105:strobe(RX)
DEBUG:a7105:read_reg(MODE) == 19
DEBUG:a7105:read_reg(MODE) == 19
DEBUG:a7105:read_reg(MODE) == 19
DEBUG:a7105:read_reg(MODE) == 19
DEBUG:a7105:read_reg(MODE) == 19
DEBUG:a7105:read_reg(MODE) == 19
DEBUG:a7105:read_reg(MODE) == 19
DEBUG:a7105:read_reg(MODE) == 19
DEBUG:hubsan:bind stage 1
... 

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.