NeoPixel LED screen using openFrameworks (C++) with x-OSC

July 9th, 2014 by Tom Mitchell

The latest firmware for x-OSC includes support for Adafruit NeoPixel RGB LED arrays which come in a variety of formats including strips, rings and matrices. As a quick demo we made a 24 x 16 pixel screen by connecting six NeoMatrix panels together. I then made a simple openFrameworks program based on the videoGrabberExample which captures a webcam video feed and down samples the image format to 24 x 16. Each frame of the video feed is then packed into an OSC blob packet using Ross Bencina’s oscpack library and sent to x-OSC over WiFi. The results are shown in the video below.


RGB Control With Processing

February 22nd, 2014 by Seb Madgwick

Adam Spiers just sent me the source code for his first “Hello World” x-OSC project showing how to control the on-board RGB LED using Processing. In his demo video, he shows the LED colour tracking the mouse cursor as it moves over a 256×256 pixel colour wash. We don’t have a message sending example for Processing yet so hopefully this example will be of use to others getting started with x-OSC. Thanks Adam!

The Processing sketch requires the oscP5 library to send and receive OSC messages. To use this library, copy the entire oscP5 directory (.zip available in the project repository) into a directory named “libraries” in Processing Sketchbook location (see: File > Preferences > Sketchbook location). A tutorial for sending and receiving OSC messages in Processing is available on the codasign website.


Using x-OSC with Ableton Live

November 19th, 2013 by Tom Mitchell

This video shows a quick and neat demonstration of how to use x-OSC to control parameters in Ableton Live on OS X. The method shown bypasses the need for programming with the handy junXion tool, developed by the gurus at STEIM, which is used here to map OSC messages from x-OSC to MIDI control change messages. This would also work well with any other MIDI compatible DAW.


Oscillatory Motion Tracking With x-IMU

November 3rd, 2013 by Seb Madgwick

Tracking position using an IMU is extremely difficult to achieve. This is because the an IMU is only able to provide a direct measurement of acceleration (from the accelerometer) and the position must be derived from this through ‘double integration’; the accelerometer is first integrated to yield a velocity and then again to yield the position. This dead reckoning process means that even the smallest measurement errors result in an exponentially increasing error in the position.

However, it is possible to use an IMU to track position if constraints of a specific application can be exploited. In a previous post I showed how an IMU attached to a foot can be used to track the wearer as they walk around a building. This is made possible by zeroing velocity errors each time the foot is detected as … Read More »


WiFi arcade controller (x-OSC Java demo)

October 3rd, 2013 by Tom Mitchell

With a craving to play old Commodore 64 games and all my game controllers tangled into a interlaced web of wires, I figured I’d build a new one without wires using x-OSC. And so, the WiFi Arcade Controller was born…

The video above demonstrates the arcade controller in action with the laptop joining x-OSC’s ad hock network with a command line application written in Java converting the received OSC messages into emulated key strokes. These keystrokes are then fed to the Vice emulator running my favourite Commodore 64 game: Thrust. Thrust is an amazingly addictive game which was well known for its advanced physics processing (for the time) and an outstanding soundtrack. The aim is to weave your way down through a maze, assisted by gravity, to collect a pod with your tractor beam and then ascend to the heavens … Read More »


Gait tracking with x-IMU

September 2nd, 2013 by Seb Madgwick

I explored many applications of IMU technology during my Ph.D research but spent most of the first year focusing on gait analysis. I had read several papers by Xiaoping Yun et al and seen how an IMU attached to a foot could be used to track position through dead reckoning and integral drift corrected for each time the foot hit the ground. There was not enough enough information to recreate the algorithm described in the paper but I was able to create my own algorithm based on the same principles. I used an x-IMU attached to my foot to log data and MATLAB to generate a 3D animation of the foot’s motion. After a bit of tweaking the tracking seemed to be fairly accurate so I uploaded a video to YouTube demonstrating the system.

Since uploading … Read More »


GyroScratch – Gyroscope audio playback with Max/MSP

August 13th, 2013 by Tom Mitchell

GyroScratch is an open source application that uses an x-OSC and a gyroscope attached to a 7″ record to play and scratch audio files. The demo can be downloaded from the project repository, which provides a good starting point for connecting x-OSC to Max/MSP.

The Max/MSP patch uses readings from an IMU 6DOF Razor to control the playback rate of an audio file so that when the record spins clockwise the music plays forwards and when the record spins anticlockwise the music plays backwards. The Razor in this demo was modified to bypass the high-pass filters on the gyroscope to prevent the output drifting to zero when spinning at a constant speed. To demonstrate full-duplex messaging the current audio level is also indicated on a VU meter made from 16 yellow LEDs mounted on stripboard.

This demo was inspired … Read More »


IR Theremin – Using distance sensors with Pure Data and Max/MSP

August 7th, 2013 by Tom Mitchell

IR Theremin is a simple application that uses x-OSC and a pair of infrared proximity sensors from sparkfun to recreate a basic Theremin. The demo patches are available in the project repository and provide simple starting points for connecting x-OSC to Pure Data (Pd-extended) or Max/MSP.

The Theremin was developed in the 1920s by the Russian scientist Léon Theremin. The instrument is notable as it does not require any physical contact to be played: pitch and volume are controlled by the proximity of the players hands to a pair of antennas (or IR distance sensors in our version). The resulting tones can be quite eerie and have featured in the soundtrack for the film Death Wish II and the opening sequence of the TV show Midsomer Murders.

The IR sensors have three connections: power (red), ground (black) and signal (yellow), … Read More »


DressCode – e-textiles festival workshop

July 27th, 2013 by Seb Madgwick

DressCode is an e-textiles and electronics workshop where participants will sew LED lights into their clothing to make interactive costumes that react the sounds and music around them. Using conductive thread to sew electrical connections into the fabric of masks, t-shirts, gloves, leggings and hats, participants will learn basic electronics as well as sewing skills. The workshop will be first held at Shambala Festival 2013 and is open to people or all ages, abilities and interests. The project is in collaboration with Vincent Akkermans and Sophie McDonald of MzTek, and Hannah Perner-Wilson and Mika Satomi of kobakant.

Participants can bring there own garments be hacked into reactive costumes but we will also be providing materials and templates for masquerade masks. Hannah and Mika used these templates to create two beautiful masks made from felt and decorated with … Read More »


OSC-illoscope – Display analogue inputs with Processing

July 19th, 2013 by x-io Technologies

OSC-illoscope is a simple example to show how to interface to x-OSC using Processing. The sketch plots received analogue input values on up to 16 graphs in real-time. This application is a handy development tool for viewing the data provided by analogue sensors and peripherals. The demo video shows OSC-illoscope being used to plot data from a membrane potentiometer, light sensor, triple-axis accelerometer, piezo transducer, IR distance sensor, and a data glove incorporating 8 flex sensors.

The Processing sketch requires the oscP5 library to send and receive OSC messages. To use this library, copy the entire oscP5 directory (.zip available in the project repository) into a directory named “libraries” in Processing Sketchbook location (see: File > Preferences > Sketchbook location). A tutorial for sending and receiving OSC messages in Processing is available on the codasign website.


x-IMU to OSC bridge

June 25th, 2013 by x-io Technologies

Jamie Bullock, a researcher at the Birmingham Conservatoire, contacted us to share his x-IMU to OSC Bridge. It is a software application that connects to the x-IMU via USB or Bluetooth and send received data over the computers network (Ethernet or WiFi) to any other network device as Open Sound Control (OSC) messages. It is a simple solution for interfacing the x-IMU to just about any software on any platform able to connect to a network. The official OSC website lists some of the many supporting OSC libraries available.

The software is compiled for MAC OS and currently supports only messages for Euler angles and calibrated gyroscope, accelerometer and magnetometer data. A USB connection requires that the FTDI drivers are installed. The projects is available to download on GitHub and more documentation available in Jamie’s original … Read More »


XYZ Stickers

May 15th, 2013 by Seb Madgwick

I’ve been working with inertial sensors for several year now and it seems I am endlessly marking XYZ axis on objects to keep track of sensor alignment and relative orientations. To make things easier, I designed a book of XYZ stickers and they just arrived in the post today! Each page contains 6 stickers, one for each orientation of the axes. The axes follow the right-hand rule and the common ‘RGB = XYZ’ colour convention where: Red is X, Green is Y and Z is Blue.

The stickers were designed in PowerPoint and uploaded to moo.com to layout the sticker book. They will print a book or 15 pages for £4.29. Unfortunately it is not possible to share my design on moo but I have uploaded all the source files to GitHub so others can recreate … Read More »


Serial oscilloscope

April 6th, 2013 by Seb Madgwick

Printing data to a serial terminal is a useful debugging tool when developing embedded systems but often the data of interest is a continuous stream of numbers that is of little use displayed as text. For example, this might be data from a sensor or real-time statistics such as bandwidth performance. Serial Oscilloscope is a Windows application that plots comma-separated variables within any incoming serial steam as channels on a real-time oscilloscope. The application also functions as a basic serial terminal, received bytes are printed to the terminal and typed characters are transmitted. The project uses Michael Bernstein’s oscilloscope library to plot up to 9 channels on 3 different oscilloscope with view and trigger menus.

Serial Oscilloscope is compatible with any serial stream containing comma-separated values terminated by a new-line character (“\r”). For example, “11,22,33\r” will be interpreted as values 11, … Read More »


DAQ32 – 32 channel oscilloscope & data logger

March 4th, 2013 by Seb Madgwick

During my Ph.D I developed sensor fusion algorithms for kinematically redundant accelerometer arrays. Empirical investigations required data from ten separate triple-axis accelerometers to be logged with a high level of accuracy. There was no suitable equipment available for the task so I created the DAQ32. The DAQ32 and accompanying PC software function as a 32 channel oscilloscope and data logger. The PCB has header pins for 32 analogue input channels and a USB socket to connect to a PC. On-board dip switches allows the number of active channels to be selected, the throughput is then equal to 32.768 kHz divided by the number of active channels. The PC software allows individual channels to be displayed in real-time using Michael Bernstein’s oscilloscope library or logged to a comma-separated variable (CSV) file.

All DAQ32 resources are open-source and available on GitHub. The article … Read More »


Dummy micro SD card

January 9th, 2013 by Seb Madgwick

Dummy SD cards are often used as place holders to protect the electrical contacts and mechanical mechanism of a card socket. During the development of the x-IMU I found a very different need for dummy SD cards. The x-IMU features a magnetometer and is sold fully calibrated. However, the spring loaded mechanism in the x-IMU’s SD card socket would create different magnetic distortions dependent on whether and SD card is present or not. In would be impractical to repeatedly recalibrate the x-IMU depending on whether an SD card is inserted or not. Use of a dummy SD card would mean that the magnetic distortions of the SD card socket could remain constant when the SD card logging functionality is not required.

It was surprisingly difficult to find a supplier of dummy micro SD cards and in the end I decided to … Read More »


Quaternions

July 31st, 2012 by x-io Technologies

3D orientations are commonly represented using rotation matrices and Euler angles. Quaternions offer an alternative representation that is computational more efficient than rotational matrices and is not subject to the problem of a singularity (AKA gimbal lock) that can make an Euler angle representation hazardous. The resources below include a document summarising this use of quaternions and an accompanying MATLAB library.


Open source IMU and AHRS algorithms

July 31st, 2012 by x-io Technologies

In 2009 Sebastian Madgwick developed an IMU and AHRS sensor fusion algorithm as part of his Ph.D research at the University of Bristol. The algorithm was posted on Google Code with IMU, AHRS and camera stabilisation application demo videos on YouTube. The algorithm received thousands of downloads but the code project was never maintained or updated. All resources are now provided and maintained here. The algorithm source code is available in C, C# and MATLAB. The source code also includes Madgwick’s implementation of Robert Mayhony’s ‘DCM filter‘ in quaternion form.


Open source AHRS with x-IMU

September 27th, 2011 by x-io Technologies

The x-IMU‘s propriety on-board IMU and AHRS sensor fusion algorithms provide a real-time measurement of orientation relative to the Earth. Many projects require access to algorithm source code so that it may be run off-board, modified or used to post-process sensor data and take advantage of non-real-time techniques. This open source project implements Madgwick’s AHRS and IMU algorithms in C# and demonstrates their real-time performance alongside the x-IMU’s own propriety algorithm. The source code also includes Madgwick’s implementation of Robert Mayhony’s so called ‘DCM filter‘ in quaternion form.


Rolling ball tracking with gyro

July 24th, 2011 by x-io Technologies

This open source project demonstrates how an x-IMU mounted within a rolling ball can be used to track the ball’s position on a surface. The PC application created using the x-IMU API uses the gyroscope data, orientation data and known radius of the ball combined with a simple kinematic model to calculate the planar kinematics and update a 3D graphical output. The project also demonstrates an example mouse application where the ball’s motion controls the mouse cursor and taps detected with the accelerometer represent mouse button clicks.


‘Wii Mote style’ mouse for PC

May 25th, 2011 by x-io Technologies

This open source project demonstrates how the x-IMU can be used as a ‘Wii mote style’ mouse for the PC. The x-IMU auxiliary port mode is configured as digital I/O to interface to 2 external switches functioning as the mouse left and right buttons. These buttons were created with 2 tactile switches, a small piece of stripboard and header connector to attached directly to the auxiliary port. The PC application created using the x-IMU API automatically connects (and re-connect) to the x-IMU and parses the received orientation and button data to Windows as a mouse input.


x-IMU binary file converter

April 18th, 2011 by x-io Technologies

The x-IMU logs data to the SD card as binary files. These files can be converted to Comma Separated Variable (CSV) text files using the x-IMU GUI or this x-IMU Binary File Converter. Simply run ‘x-IMU Binary File Converter.exe’ in any directory and it will find and convert all binary files within that directory. The executable may also be called with optional arguments from a command line for automated conversions, for example from MATLAB or a Windows .cmd file.


Camera control and stabilisation via PC

March 14th, 2011 by x-io Technologies

This open source project demonstrates how the x-IMU can be used to control and stabilise a 3 DOF camera mount for either control via tracking or stabilisation where the x-IMU is fixed to the camera mount base. The camera mount is built using parts from ServoCity and the R/C servos are powered and controlled via USB using a Pololu USB servo controller. The PC application created using the x-IMU API uses the orientation data received from the x-IMU in Euler angle form to set servo angles via the Pololu USB servo controller.


RECENT
New Interfaces for Musical Expression 2014
New Interfaces for Musical Expression 2014

Seb and I recently attended the 14th International Conference on New Interfaces for Musical Expression (NIME2014) at Goldsmiths, University of London. This was my...

NeoPixel LED screen using openFrameworks (C++) with x-OSC
NeoPixel LED screen using openFrameworks (C++) with x-OSC

The latest firmware for x-OSC includes support for Adafruit NeoPixel RGB LED arrays which come in a variety of formats including strips, rings and...

Tutorial: x-OSC and VDMX
Tutorial: x-OSC and VDMX

Motion graphics and video artist Will Reardon at Polymath Design has been working on a number of exciting VJ projects connecting x-OSC with VDMX....

RGB Control With Processing
RGB Control With Processing

Adam Spiers just sent me the source code for his first “Hello World” x-OSC project showing how to control the on-board RGB LED using...

Using x-OSC with Ableton Live
Using x-OSC with Ableton Live

This video shows a quick and neat demonstration of how to use x-OSC to control parameters in Ableton Live on OS X. The method...

Oscillatory Motion Tracking With x-IMU
Oscillatory Motion Tracking With x-IMU

Tracking position using an IMU is extremely difficult to achieve. This is because the an IMU is only able to provide a direct...

WiFi arcade controller (x-OSC Java demo)
WiFi arcade controller (x-OSC Java demo)

With a craving to play old Commodore 64 games and all my game controllers tangled into a interlaced web of wires, I figured I’d...

Solar wind chimes – The first x-OSC project
Solar wind chimes – The first x-OSC project

Ealier this year, I went to the Pervasive Media Studio in Bristol to give a lunchtime talk about x-OSC. After the talk I...