After unboxing my crazyflie, I didn’t have time to assemble it but, I just couldn’t stand not doing something with it. So, here’s what I did:
1) I grabbed a USB-A male to USB Micro-B cable from a pair of bluetooth headphones I own (not Beats).
2) I opened the widest mylar bag, which held the crazyflie pcb (which is also the nano-quadcopter’s airframe) and fired up my Bitcraze 0.5 VM.
3) In one of the other six mylar bags was the crazyradio. I pulled that out, attached the antenna, then plugged it into my MacBook Air (where the Bitcraze VM is running). VMware Fusion showed a dialog asking if I want to connect the Nordic ASA Crazyradio USB Dongle. I checked the checkbox next to the text: “Remember my choice and do not ask again,” then I clicked the “Connect to Linux” button.
4) I started the cfclient on the VM by double-clicking (or right-clicking and selecting “Execute”) on the “Crazyflie PC client latest” shortcut on the Xfce Desktop. The resolution on my VM is only set to 800×600 right now so it can fit on my MacBook Air screen. Because of that, the bottom is cut off a bit. No worries though, we’ll run the VM in Fusion’s Unity view when it matters and that will give us more vertical real-estate. (There is still some anomalous behavior in the display of the VM. Widths greater than 1024 cause strange artifacts. If I find a fix for it, I’ll post that on this blog.)
4) I plugged the crazyflie into my computer. I found the following sequence be important, so read carefully. The crazyflie’s startup process involves testing its sensors. If you want this test to actually work, you need to make sure the crazyflie is very still during the test. This means resting the airframe on a stable surface like a workbench, table, or chair. Your hand, leg, dog or other unstable surface is not recommended. While I only once experienced an error similar to what is mentioned at the above link, I did find that the flight data display (artificial horizon) did not reflect the movement of the crazyflie nearly every time I started the crazyflie without ensuring it was perfectly still during self-test.
- Plug the USB Micro-B connector into the crazyflie.
- Set the crazyflie down on a workbench or desk.
- Plug the crazyflie into a powered USB port on your computer (most of them are powered) or into a wall outlet (like an iPhone charger or RaspberryPi power adapter – they’re all 5v and as long as it delivers 500mA or greater, it will work).
That was easy enough, right?
5) The moment of truth inched ever closer when I connected the crazyflie client software to the crazyflie. In the Bitcraze VM, I clicked the “Connect” button, which opened the “Connect to Crazyflie” window and started scanning. After scanning for a second maybe, the crazyradio found the crazyflie.
I knew the crazyradio found the crazyflie because its URI showed up in the “Connect to Crazyflie” window where the word “Scanning…” used to be. The URI format goes something like this:
In my case this was:
…and this translates to:
- Radio: self-explanatory, use the radio interface
- 0: use the USB dongle 0 (I guess we can have multiple dongles plugged in)
- 10: use radio channel 10
- 250K: use 250 Kbit/s
…and for now, I’m leaving these all default.
6) Finally, it was time to make the connection! I clicked, ummm… the “Connect” button.
7) Sure enough, it connected and the “Link quality” indicator and artificial horizon on the client showed it! I picked up the crazyflie and watched how the artificial horizon reacted as I moved the airframe around in space.