Posts

Showing posts with the label programming

Attaching a WiFi Dongle to an AR Drone 2.0 (a.k.a. Compiling Drivers for ARM Based Devices)

Correction (4/24/2014): for your driver to work the AR Drone 2.0 you have to compile the kernel version provided by Parrot which can be found here https://devzone.parrot.com/projects/show/oss-ardrone2 One of the down sides of "out of the box" AR Drone 2.0 is that you can't control multiple drones from the same machine. Another down side is that you can't attach USB devices except flash memories and some other predefined devices due to the limited nature of the busybox deployed on the drone. To over come the first down side without manipulating the WiFi configurations of the built-in WiFi card (i.e. you don't want to mess up your new drone), you will need to overcome the second problem (i.e. install a WiFi dongle and its driver manually). In this tutorial, I try to walk you through the steps to do just that. I assume that you are working a Linux machine (seriously we are not going to compile drivers on Windows). Ubuntu is preferable ! Because the Drone has a...

Event driven programming

Most programmers think “Threads” when they are told to make a piece of code that should run concurrently. Also it hits them right in the face the last time they tried to make a threaded programs when they were faced by the usual problems (Races, deadlocks, etc) which are hard to detect, debug and at some time to reproduce. The behavior of threads is too unexpected as it's fully controlled by the threads scheduler not by the programmer. Another issue, the overhead of creating threads which sometimes is painful which produces an important question “What is the alternative ?” Lets think of concurrency in the following way: we will receive all the requests at the same time and queue them. Then we will assign each of them to a specific function. When this function blocks (i.e. for IO requests) or finishes we will make another one start till it blocks or finishes and so on. The question you'll have in mind “Wait a minute, that's not concurrency!!” Well, think of it this way. You ...