Posts

  • Moving to Github Pages and Jekyll

    Yesterday I moved the site from WordPress.com to Jekyll/Github Pages. I just want to quickly jot down my thoughts on the process. Pros of Jekyll “Closer to the metal”. With Jekyll, you’re essentially managing a collection of files that will eventually be converted to another collection of files (which are...
  • Online demo of photographic mosaicker

    Recently I’ve been playing around with web development and it’s been a lot of fun! Most of my work has been algorithmic development that’s more or less silo-ed off to a corner of the world, but it seems to make sense from a societal perspective for the benefits of one’s work...
  • How to write a simple photographic mosaicker

    Today we'll learn how to write a simple photographic mosaicker! You've probably seen those large pixelated images that are composed of tiny irrelevant images, like a portrait of Obama that comprises tiny cat pictures. These are known as photographic mosaics. Here I'll describe a very simple approach to creating such a mosaic,...
  • Single boot MacBook Air running Ubuntu 14.04

    Motivation For a long time, my MacBook Air was set up to boot up to both Mac OS X Maverick and Ubuntu 14.04, i.e., dual boot. What happens is you just hold the alt/option button on startup, and the screen will prompt you to choose either the Maverick or Ubuntu...
  • UAV Software Recipes I: Hardward-in-the-loop simulation

    3DRobotics IRIS+ Background Hey everybody! Today I want to write about simulating an unmanned aerial vehicle (UAV, popularly known as “drones”) with hardware in the loop (HIL, HITL). I’m not sure about the nitty gritty details but as far as I can tell, HITL is when you place the flight stack that sits in...
  • Rise of the Machines - how jobs are being replaced by machines

    I recently gave a short talk on job automation. It was really well received, so I'm sharing it here.   ReferencesPrediction: 47% of jobs are highly likely to be replaced in the next 10-20 years. Frey & Osborne, 2013 [PDF] [via The Atlantic]Daimler's self-driving semi-truck. O'Kane, 2015 [The Verge]Claim: driving in...
  • Street Fighter 4 Character Detection

    I like watching Street Fighter 4 game replays on YouTube. In fact that’s probably my biggest time sink. So one day I was watching a piece of commentary by Capcom (creators of the game) on a match, and the commentators essentially said, “I wish there was a way to measure...
  • Build OpenCV 3 on Mac OS X with Python 3 and ffmpeg support

    Today I’ll be talking about… exactly what the title suggests! I got an idea a couple of days back for a video processing project and I decided that I was going to use Python 3 and OpenCV 3, because I like shiny new things. I ran into a little bit...
  • Install Eclipse on Mac OS X 10.9.4

    Greetings, my fellow human beings. I am now on the other side of the globe in Madison, Wisconsin. Now that I've settled down I'm hoping to continue pushing out content. I recently bought a MacBook Air, having never used a Mac in my life, and today I'll talk about how...
  • Navigate a line in Vim Normal mode

    Unfortunately, I won't be writing on my robotics pet project for a while, because I'll be heading over to the University of Wisconsin-Madison for my Master's in Computer Science, and in preparation for the move I've dismantled TOHNKATSU. Ah well.Nevertheless, I'll be sharing some small tips about Vim today, which...
  • Delete current word in Vim Insert mode

    Problem You’re typing away in Vim’s Insert mode and just typed a word wrongly. That’s a very common scenario right? If you come from a MS Word background (like me), your first instinct may be to hit Shift+Backspace. In Vim, however, that doesn’t work. I’ll give two methods that do....
  • Stack Arduino Uno over Raspberry Pi

    If you're working on a system that involves both the Raspberry Pi and Arduino Uno, particularly a mobile one, you'll probably want to stack the two boards up vertically. It saves space and in turn, the wiring (arguably) becomes easier. I'll be describing my method for doing this.Ingredients(M3 thread size...
  • Update on TOHNKATSU

    Woohoo! It's time for another update on my pet robot. In a previous post it was called Ardupi but I've now decided to call the robot TOHNKATSU. If you know Japanese or Japanese cuisine, you may know that tonkatsu (豚カツ) is Japanese pork cutlet, but TOHNKATSU has a 'H' in it. It's...
  • DIY vertical rack for electronics

    I'll be describing how I made a vertical rack out of corrugated cardboard, to house my handphone and battery-holder. I'm just going to give a image sequence of the process. The method should be pretty self-explanatory. The end result looks like this:Cardboard rack, housing a smartphone and a battery-holderIngredientsCorrugated cardboardPenknifeRulerPaper...
  • Command a DC motor with Raspberry Pi

    I did it! I've been wanting to do this for a while and finally got down to doing it. It's definitely not hard, but still, it takes a bit of effort if you don't have the background.Here's my set-up:Circuit diagram to command a DC motor with Raspberry PiFor those not...
  • Vim keyboard shortcuts to comment and uncomment

    Here's how to set keyboard shortcuts to comment/uncomment in Vim. The same shortcut will work for block comments and block uncomments.SIMPLE VERSIONInclude the following in your vim settings file, which is probably ~/.vimrc on a Linux machine.map <C-C> :s:^:#<CR>map <C-T> :s:^#<CR>Now Ctrl+C maps to comment and Ctrl+T maps to uncomment....
  • Pictures of the Ardupi!

    Hello ladies and gentlemen, tuan-tuan dan puan-puan, I have pictures! I'm tentatively calling the robot the Ardupi, since it doesn't have any distinguishing features besides having an Arduino and a Raspberry Pi. I'm 100% sure this name has been used by many others already, but hey.Here it is!The difficult-to-Google ArdupiThe...
  • Laptop to Arduino over serial USB

    The last time I wrote, I talked about how the Arduino seemed to be reading serial information slower than the Raspberry Pi was writing it.After reading the TLDP Serial HOWTO, I learnt that my suspicion on the serial buffer is true: it is a FIFO queue. That makes it quite...
  • Raspberry Pi to Arduino over serial USB

    Today I was playing around with sending data from the Raspberry Pi to an Arduino over serial USB, but there was an issue with the receive rate of the Arduino - it was lagging very badly behind the send rate of the RPi.Here's a bit of background. To start this...
  • Android phone as orientation sensor for Raspberry Pi

    A project that I've started working on for about a month, and one that I've wanted to do for about a year now, is to create an intelligent robot from scratch. By "from scratch", I mean from the component level of microcontrollers, motors, wires, etc. I'm not going to build...
  • Willkommen

    Welcome to my website! My name is Jia Shen, I’ll be your host for tonight. I work for a research and development company in Singapore as an engineer. I intend to go to graduate school soon. In this site I’ll be sharing some of my personal projects and maybe some...