I want a head mounted stereoscopic camera that records at 60fps. I have research POV cameras for RC planes and the 3D GoPro setup. POV cameras for RC planes are very poor quality and horribly analog. The 3D GoPro system is heavy, only records at 30fps, and costs hundreds of dollars. There must be a better way! Well, there is, with the Raspberry Pi and open source hardware!

Two Raspberry Pi's!

Two Raspberry Pi's!

Enter the Raspberry Pi, the amazing $35 computer. It has a $30 camera module that can record 720p60fps video, although, a single RaspPi only supports one camera module. The solution? Two Raspberry Pi's! They each run off an identical image of Raspian Linux with my own python scripts written to start on boot. Those scripts simply wait for a button press on a certain GPIO pin, and then start recording a video! It looks something like this. Just, pardon the mess on my desk at the moment. This is a verrrry early post for this project.

2 raspberry pi's each with their own camera, and my messy desk

2 raspberry pi's each with their own camera, and my messy desk

You can see the record button on the back of the breadboard. The question I had after setting this up was, "Running identical hardware and software, if triggered by the same button press, will the video from each camera be in sync?" So say, if I clapped my hands over the cameras, would my hands meet on the same frame on each video? To get a general answer to this question I shot this video.

The left camera is on the top, and the right one is on the bottom. I moved a post-it note across a ruler, and if the videos are in sync, then when paused on any given frame the post it note should be on the same notch of the ruler. And it turns out, it is! By this test, the camera's appear to be in sync when triggered by the same button.

Problems and limitations of this crude test:

This video was actually shot at 1080p30fps, because the software update to allow the Raspberry Pi to record at 60fps is still forthcoming ( Higher frame rates may reveal more problems. Measuring the post-it on the ruler is also not pixel perfect, it only appears correct to the naked eye. If the camera's were placed correctly and the footage was made into a 3D video, the brain may over time notice some out-of-sync error.

Improvements to this setup:

The python script I'm using now checks the button state every 5ms. I can likely check much faster than this. If I really needed to, I could do some inter-rasp-pi communication over GPIO pins to synchronize a "camera clock" and really be sure they start recording at the same time, but for now I don't think that's necessary

What's next and what the heck is this for anyway?

Why I'm glad you asked! The head mounted stereoscopic camera is part of a larger project I have started that I am very excited about! Along the way, I just might make what will probably be the cheapest solution for an HD head mounted stereoscopic camera on can buy or build. If I knew much much more about electronics I'm sure I could build such a camera with a single CPU and not need weird inter-pi synchronization, but I am sure you cannot beat this in terms of being a fast, inexpensive, and effective prototype. Also, Raspberry Pi's are awesome! I'll post again about this soon, so stay tuned!

Seat Cushion Controller and Oculus Rift United!

I finally tried what I've wanted to do since first making Chair Simulator and the Seat Cushion Controller, playing a game with it in the Oculus Rift! And what game did I try? My absolute favorite game for the Oculus, and well known title...


There's nothing quite like base jumping in VR, and AAAAAAaaaAAAaCULUS!!! is an amazing immersive experience. Although perhaps where it falls short is in controller input, a problem for most modern Oculus games, but I find especially while free falling, that I want to have my hands up in the air and not on a controller!

Using the new Arduino Leonardo talked about in my previous posts, I set up the Seat Cushion Controller to emulate the mouse and keyboard input for the game, giving you that's hands free experience! I filmed a demonstration below.

The exact controls are as follows. Tilting yourself on the seat mimics WASD input to move you in that direction, and spinning the chair left/right mimics mouse movement turning you left/right. With these controls, the player does not have nearly the precision as a traditional mouse/keyboard or controller, but for now I'm satisfied with how much more fun it is to have your real world movements reflected in VR. I also tried the Chair Simulator video game control scheme, which was to lean back to go forwards, with no strafing supported, but this turned out to be even worse, because strafing is important.

What is next for Chair Simulator? There are better sensors I can use for detecting user tilt on top of the cushion. I still need to add an accelerometer to supplement the gyro, and I am considering testing a network of force pads to detect the user's center of balance. On the software side, right now the arduino is emulating a mouse and keyboard, which means that movement is WASD with binary movement speed. Ideally, the controller would be a DirectInput device like a standard joystick. I have read a little about modifying the Leonardo's USB drivers to make this possible, so stay tuned!

I also have some new pieces of hardware in the works for the future. My next project involves a few raspberry pi's, a 3D printer, and the Oculus! I promise this one won't disappoint, so stay tuned, and thanks for reading!

Super Hexagon with No Hands!

I have rebuilt the Seat Cushion Controller from Chair Simulator with the Arduino Leonardo as described in my last post, so now the controller can appear to be a physical mouse and keyboard to a computer, which makes it very simple to make work for a wide variety of games. The first game I built a control profile for is Super Hexagon!

Super Hexagon is a small game where you spin a cursor around a hexagon to avoid incoming obstacles, all set to a kick'n chiptunes soundtrack. 

Super Hexagon is a small game where you spin a cursor around a hexagon to avoid incoming obstacles, all set to a kick'n chiptunes soundtrack. 

The first control scheme I tried was, while the chair is turned left, the cursor rotates left, and visa versa for turning right. Super Hexagon is already a very difficult game to play with a keyboard, and this method of control made it impossible. With this setup, the player has to recenter the chair to make the cursor still. This takes time, and in the time the player is turning the chair to the angle which will move the cursor, the player dies, quickly.

I am much happier with the second control scheme I tried, which is demonstrated in the video below.

This control scheme rotates the cursor left while the player is spinning the chair left, and visa versa for turning right. The player does not have to recenter the chair to stop moving, the player just, stops spinning the chair. The sensitivity on the Seat Cushion Controller is so high that the cursor responds very quickly to small quick adjustments critical for playing Super Hexagon.

But this was still too difficult for most new players, and although Super Hexagon is supposed to be that difficult, I decided to try something to make it a little easier. When the player spins the chair slowly, instead of emulating the left or right arrows being pressed down, it presses and presses the arrow keys at a higher frequency than any player could do by hand, resulting in the movement keys being only pressed 50% of the time, and the cursor moving at 50% its regular speed. With this, I created a sort of variable movement speed for a game not designed to have that as a feature. Yes, this is kind of cheating, but the game is still plenty difficult, and most importantly, its fun!

Stay tuned for what I game I adapt to work with the Seat Cushion Controler next, because with this simple game under my belt, I'm going to start using the Seat Cushion Controller and the Oculus Rift together!

The Next Seat Cushion Controller

For this past winter break I worked on the next version of the Seat Cushion Controller from Chair Simulator. The goal for this version was to make it work with games besides Chair Simulator. And how did I plan on doing it? With this,

The Arduino Leonardo

The Arduino Leonardo

The Arduino Leonardo has several technical advantages over the Arduino Uno I used for the first incarnation of the Seat Cushion Controller, although the key feature for this project is the Leonardo's feature to emulate a mouse and keyboard over USB. This means, that instead of using a proprietary serial communication system that I designed specifically for the game Chair Simulator, the leonardo can give input to the computer as a mouse and keyboard.

How will this look in a game? Well, imagine a first person game with typical WASD movement and mouse to look. Turning your seat left and right will move the first person camera horizontally, and shifting your weight around on the seat will be turned into WASD input to move around. One would not want to play a first person shooter game like this, but paired with an Oculus Rift to give the player control over looking vertically, this could create a very interesting VR experience in the right game, and I have a few in mind to try! So stay tuned! I am working on a video demo right now!