Categories
Computers Lab

Dual Satellite NTP server with Navspark

A friend from NIST recently told me about a Raspberry Pi Stratum-1 NTP server project, and that reminded me of the experiments I did with the Navspark dual GPS+Beidou receiver module. Navspark is a small, Arduino-compatible module that besides GPS can also receive data from China’s Beidou 北斗 satellite navigation system , that is currently being built. I thought it would be fun to build a Beidou-powered Stratum-1 NTP server to see how does it compare to GPS.

Hardware

To have a really good really good, satellite-powered reference clock, I have to have access to a 1-pulse-per-second (1PPS) signal from the receiver. The pure USB-connected receivers don’t really seem to do that yet (looks like plenty of opportunities there!), instead I have to use separate hardware for it.

The Navspark module has a 1PPS pin (GPO3 below), and the only other pin I’ll really need is a serial pin to receive the NMEA stream of the satellite lock data (TXD1 below).

Detailed Navspark pinout with pin functions
Navspark pinout from the User Manual
Categories
Learning Programming

Language of the Month: Rust

I found it hard to believe, that it’s been 4 years now since I finished the previous installment of “language of the month” column, in which I pick a programming language and dive in for a month to see something new. In that 4 years I have learned a lot of programming for sure – though probably very little computer science, and barely any new languages. It’s time to chance, and for the revival of this I’m checking out Rust.

Categories
Programming Taiwan

Taiwan WWII Map Overlays

A while ago I came across the Formosa (Taiwan) City Plans, U.S. Army Map Service, 1944-1945 collection, in the Perry-Castañeda Library Map Collection of the University of Texas in Austin. I’m a sucker for maps, enjoy learning about history a lot, and I have a lot of interest in my current home, Taiwan – so you can call this a magic mix of cool stuff.

There are 26 maps in the collection, made by the US Army by flying over different parts of the island, and mostly I guess stitching together aerial photographs. The maps themselves were not that easy check in an image viewer, since there’s no context, zoom is clumsy, and have no idea where about half the places should be located. Instead, I thought it would be great to have them as an overlay on top of current maps and satellite imagery on Google Maps.

The result is Taiwan City Maps overlays, which does exactly that. Feel free to click the link and explore right now! In the rest of this post, I try to first show how that page was made, and also some history lessons I gained by making it.

Categories
Maker Programming

A window to IRC with Edison and Resin

After trying Resin.io briefly with a SomaFM Streaming Application, I was eager to experiment more with their cloud deployment platform. Maybe some new hardware, maybe some more complex project… In the end, it became a little bit of both: here’s MrEdison, and portable IRC chat display based on Intel Edison.

Checking out the chatter on the #ubuntu channel
Checking out the chatter on the #ubuntu channel

The idea came from the fact that we have an IRC channel for the Taipei Hackerspace, #taipeihack on Freenode, just it is not very well (or rather: at all) frequented by people. I wanted to break that channel out of the computer, and put a physical window to it in the ‘space, so people can see what’s going on, and hopefully want to get on too!

Categories
Computers

Magic for the Internet of Things: Resin.io

I have my fair share of playing with embedded Linux and Internet of Things projects these days, but the real treat is finding projects occasionally that just blow me away. Through some Hacker News comments I ended up checking out Resin.io, a tool that brings cloud deployment and management to embedded applications. That might simple (boring?), but here’s the workflow in a nutshell:

  1. Start a new application and download an image file for your chosen single board computer (1 of 5 choices at the moment: Raspberry Pi 1 & 2, Parallella, Intel Edison, and BeagleBone Black)
  2. Flash the image onto an SD card, connect the board to the network, and boot it up
  3. The board shows up in the cloud management console, and you get a git repo address
  4. Make an application (Docker, Node.js, etc.), do a git push: voila, your board’s running your app
  5. Flash a few more SD cards, connect the devices to the network, all of them will run your application
  6. Modify the app behaviour through environment variables, either all of them at once, or customize each
  7. Check status, logs, updates, online, and enjoy that things just work!

I cannot emphasise enough how good any service feels that 1) runs by git pushing code, and 2) just works.

SomaStream

To try it all out, I’ve put together a very simple application: SomaStream – the SomaFM internet radio streaming app.

SomaStream device status
SomaStream device status (image uploading)

Grabbed my RaspberryPi that didn’t do much lately, plugged an earphone in it, and started to look for some examples in the docs how to make it play some streaming music.