Flying Hubsan X4 using Arduino

This blog post is about a recent class project I have been doing with my team mates for the DIY Intel Galileo class. The main aim of the project was to replicate the already existing projects on flying a Hubsan X4 using Arduino on an intel galileo gen 2 board.

The RX/TX circuit design was built using A7105 Trans receiver.

Our circuit connections using A7105 with Arduino pins. Pin numbers are for Arduino.
Our circuit connections using A7105 with Arduino pins. Pin numbers are for Arduino.

In the process of doing so we ended up first trying out using the available resources on an Arduino Uno board. The details of our project and how we proceeded using some existing libraries and circuit design are mentioned on our wiki page at:

Phase 1:

Getting the circuit to work with the code using Arduino Uno. I had to modify a bit of the excellent library written andihit at by

Here is the demo:

Phase 2:

This phase included getting the full fledged code working and we demoed it in our class. Here is the footage.

Phase 3:

Using the library we have implemented the keyboard control solution for controlling the quad.

Issues with Intel Galileo Gen 2:

We wanted to port this same code and circuit on the Intel Galileo Gen 2 using its Arduino Pins.

However we faced a major issue in the SPI pin configuration. Pin 11 on the Galileo was not acting the same way as Pin 11 on the Arduino. We checked the voltage across major pins on both arduino and galileo and found the difference only on Pin 11 which is connected to the SDIO pin on A7105. The voltage on Pin 11 is 0 when using on a galileo but on arduino it gives a good 3.79 volts. We have detailed all that info on our Wiki page mentioned above.

Thanks a lot to my team mates Ishita and Abhinav for their effort in making this project a reality. Hopefully we will be able to get this running on galileo with some tweaks.


Clone SVN repository to GIT using TortoiseGIT on Windows

I enjoy using git because of its simplicity and speed. Recently, I have been working on a project of ours which uses SVN as a default version control system.

I proposed to my team to switch to Git as we can also use GitHub after that for making our code public. So, I decided to take the initiative to convert our SVN repository ready for GIT. There were 2 solutions to this:

  • I use the latest stable code and then check it into the latest GitHub repository.
  • I convert the whole SVN repository into Git repository.

I wanted to do the latter as I want to ensure that the commit logs are maintained across the clone.

So, after looking on the internet I found a few solutions using git-svn. The github site gives a good link on how to do it on a linux machine:

However, I was looking for some Windows based solution which is easy to use and GUI based as I have to show it to my team as well. So, I decided to use TortoiseGIT [] which is a Windows based tool for git repositories.

Here are the steps I used using tortoiseGit to clone my SVN repository as a Git repository.

  1. Install TortoiseGit
  2. Create a new folder where you want to clone the repository.
  3. Now right clock on the folder and select the “Git Clone …” option.
  4. You will see a clone screen. Choose “From SVN Repository” and uncheck all boxes.Image
  5. Click OK.

It will take some time depending on your SVN repository size but in the end you will be presented with a Git repository in your folder.

One problem which you will face is that now in the tortoiseGIT menu you will see SVN options as well.

In order to remove that the following steps provide a solution:

  1. Create a bare git repo using git init –bare
  2. Add this repo as remote to the SVN pulled repo.
  3. Push the SVN pulled repo to the git bare repo.
  4. Now clone the bare git repo to a new repo.

New repo will not have SVN options.

Using git-hooks to update the cloned repo when the bare repo is updated.

Inside hooks folder in the bare repo create a file post-receive

Add the following content to the post-receive file

cd /home/<user>/<test_repo>
GIT_DIR=.git git pull origin master

Now whenever you push something to the bare-repo then the changes are already reflected in the git repo whose path is given in post-receive file.