Posts

Soldering new connectors for the drone

Image
If you're with me so far, in our Snapdragon Flight VR build, you might have noticed that the connectors that come with the motors do not match the connectors that come with the Snapdragon ESC. This means we need to replace the connectors so electrons can flow and power the motors. Remembering that the whole point of this is to get electrons to flow will make the concept easier. Copper is a conductive material, that's what wires are made up of. Solder is a metal material that is highly conductive with a low melting point and solidifies fast. So the idea is we want to use the molten solder to join the wires to the new connector. I personally favor damaging a cheap motor to damaging an expensive ESC, so I opt for doing the work on the motor connections themselves and highly recommend this path. While the minimum you'll need is 4 connectors, I am really good at making mistakes, so I wound up getting 10. The first step, is to cur the old connector off. Grab a pair of w...

Build Snapdragon Flight Drone

Image
In order to have a VR Drone, we must start building a real physical Drone. Snapdragon Flight offers a great light weight powerful platform we can do a lot with. While most home built Drones are built with very custom specs; I felt it necessary to make this very approachable by ensuring the Drone is built exactly as the specs outline. Our's looks slightly different, but hey Drone time! Let's start with the parts the Drone needs: Allen Wrench Hex Key Set Dynamite 5 pc Metric Nut Driver Assortment Generic M2.5 Nylon Hex M-F Spacer/Screw/Nut Assorted Kit Loctite Heavy Duty Threadlocker 2x clock wise motors 2x counter clock wise motors ac converter for battery charger battery charger Battery ESC (to control the 4 props) Frame Kit gps antenna 4 x DF3-3P-2DSA connector Wifi antenna Grey props: x2 Red props: x2 Before jumping straight into working with the hardware, a small house keeping task must be preformed. There's a small problem, If you have big ...

Connect to a USB Serial Connection

Image
In order to connect to a USB Serial connection as is the case in connecting to Snapdragon Flight , there's slightly different ways for each host operating system. I broke this up to a separate blog post to provide easy reference for any other project. I'd note that these instructions work equally well on Intel's Edison boards which also require USB Serial connections. If you're trying to connect from windows, here's some steps for you: Run putty Now configure Putty as follows: Click Serial under Connection Type In the Serial line field, enter the COM# for your board, such as COM12. NB: If you did not identify your COM# when setting up your board, navigate to the Device Manager and check for an entry called USB Serial Port (not Intel Edison Virtual Com Port). The COM# is displayed next to the USB Serial Port entry, as highlighted below. Give the Speed field a baud rate that seems appropriate: 115200 Your configuration screen should look like this: C...

Build custom arm model for VR

Image
It's time for some fun. An awesome use case in how to use quaternions to achieve portable results. If you aren't familiar with quaternions, please feel free to review them in my previous article. If that's confusing, it's no problem, you can use the code from below, but it might be a bit tough to understand without the prerequisite math knowledge. So let's write the inspiration: Notice that controller? One here too! In the world of mobile VR, the two main systems, Google's Daydream and Oculus' mobile GearVR, are both now shipping with a controller that is used much like a laser pointer in the virtual world. While both Google and Oculus provide an SDK for working with the controller, much of what it takes to work with it is missing in any form of documentation. Thus most apps rely upon other people's controller implementation and create a project wide dependency (Unity, Unreal) just for one very small aspect of the application. Also, my project...

Quaternions

Image
As I'm starting to put together the drone VR project, I've noticed that I've been remiss in explaining a facet of programming we're going to be depending upon; that while well understood among mathematicians, is viewed as too complex for most programmers. One of the many tasks that we often face in VR or game development is a need to know orientation. That is how to rotate objects so they appear oriented in a manner that we have planned. Now the easiest way to handle rotations is to use Euler angles. That is to say imagine a 3d cartesian coordinate system centered at the center of the 3d object we want to rotate. The straight forward way of doing it, is to say rotate it around the each axis a certain number of degrees in 3 separate steps. The above shows how a Gimbal works. They have the properties of being extremely easy to understand while also being susceptible to a very problematic detail. If one dimension rotates too close to another, then both dimension r...

Build executables for any ARM device

Android Studio has given developers a new IDE to create apps that work in Android. Now with the recent addition of CMake integration, it has also given us Embedded Developers something a bit more. We now have an IDE that can target not only Android but any device that runs linux on a supported ABI. Shock, horror, no, it's good to react with eagerness and let our inner hacker out. When building apps for Raspberry Pi, Snapdragon's family of boards, or any embedded device running linux, instead of creating a cross compiler; we can use the one that Google provided. In this blog post, I'm going to dedicate us to the lofty goal of a traditional Hello World compiled from Android Studio, and run on a Snapdragon 410c . It's simple really, so let's get started. 1st, create a module or new project, then get Android Studio to use CMakeLists.txt. From here, we need to start doing things that aren't part of the documentation. We need to create an executable. Howeve...

Android NDK with Google Test Part 2

I recently gave a presentation on using Google Test within Android Studio; Here's the slides I used. Thought it would be easier to see the code this way: The awesome thing about this is it is highly useful for the upcoming Snapdragon Flight drone controlled by Daydream running on a Snapdragon 820 powered Pixel XL. Being able to automatically determine if the various parts are working is essential for any complex program.