I was one of the early backers of the C.H.I.P. $9 computer even though I didn't really have a project in mind because who doesn't want a $9 linux machine? The feature set was impressive and since it was announced before the Raspberry Pi Zero, there was really nothing else close in price.
What really sold me is how perfect this hardware aligns with IoT:
Initially I had all kinds of problems with my CHIPs and thought I had bricked them at one point. I checked out the forums and found that the dev team had been working hard on a stand alone tool to fix some firmware issues seen in the early versions.
So now that the CHIP is working it's time to find a project for it.
I've been using a Raspberry Pi 2 to track and plot local aircraft traffic and feed it up to a real-time flight tracking service (flightradar24.com). It uses a USB wireless receiver dongle to read ADS-B transponder data from passing aircraft, so the RPi2 is complete overkill; and since I only have a single RPi Zero at my disposal I decided it would be worth trying to get this ported over to the CHIP.
The CHIP is very picky when it comes to power, so you will need to use a good (2A) power supply and a powered USB hub. Since the NooElec dongle only needs about 500mA or so, you can go with the cheapest powered USB hub you can find.
First thing you want to do is reflash the CHIP to a console-only debian OS (may not be required, but I wanted to trim as much of the fat as possible). This requires setting up a VM with an SDK which goes way beyond the scope of this tutorial, but is covered in detail by the CHIP documentation. Once you have the SDK setup, plug in your CHIP (with the FEL jumper grounded) and send the commands:
cd ~/CHIP-tools ./chip-update-firmware.sh -d
You should now be able to connect to your CHIP directly over serial and setup your WiFi settings. If you're skipping the re-flashing step, this is where you start.
First, update the default passwords for the chip and root users:
sudo passwd chip sudo passwd root
With the default passwords reset, we can now put this on the network. I like using the text based ui for NetworkManager (which is installed by default).
Now that your WiFi is setup, we can start with the install. The first time I went through this, I updated everything through apt-get and then installed the pre-reqs/drivers for the wireless card. Since then, I've found that Flightradar24 has a script that automatically installs/updates the required drivers and software, configures NTP, and dumps you into a setup wizard. So save yourself some time and just run this:
sudo bash -c "$(wget -O - http://repo.feed.flightradar24.com/install_fr24_rpi.sh)"
Once you get to the wizard, stop there and set up a flightradar24 premium account (free since we'll be feeding flight data).
To complete the wizard you will also need your latitude/longitude/elevation of your location (Enter your address here to get all that info).
In the wizard, just select all the defaults since we will configure everything in the webUI after first boot. Once the wizard completes, start the service for the first time by entering:
sudo service fr24feed start
To access the webUI for modifying settings, open up your browser and go to:
You should see this settings page:
Once you have everything configured as above, click Save and then Restart.
After a 30 seconds or so, try opening up http://<IP.of.your.CHIP>:8080 in your browser, and you should see something like this (you will need to reposition the map over your location the first time):
Now when you go to flightradar24.com you can view your feed status which should show "Online" along with the statistics for the flights you have tracked.
That's it, now you can track local air traffic up to 100 miles of your location. By feeding data, you also unlock some premium features like seeing every commercial flight in the entire world in near real-time (5 minute delay).
I hope to expand on some of the functionality offered by the CHIP, specifically the battery backup feature so this will continue running during a power outage, or be easily moved to other locations without downtime.
Did you replicate this project? Share it!I made one
Love this project? Think it could be improved? Tell us what you think!