Fugio Friday: Virtual Reality Smells

Happy Fugio Friday!

We have a new forum for discussing Fugio ideas and issues. It’s a bit quiet so far so do post up your thoughts and questions!

This Sunday (May 7th) I’ll be taking part in the Imperial College Festival, showing our Fugio based virtual reality experience that explores whole genome sequencing of bacteria.  Come along and say hello.

This new version, previously shown at Oxford’s Museum of History of Science (pictured), features smells that are blown towards the participant via motors with 3D printed fans at points synchronised to the audio narrative; their speed controlled by a Fugio timeline sending serial messages to an Arduino with a motor shield.

In other news, I asked the Fugio Users Group whether they were running 32 bit or 64 bit Windows.  The results were 100% 64 bit!  Until now I’ve just been building Fugio on Windows as a 32 bit application, but I’d like to support 64 bit too, so I put the basics in place, and also looked at cmake as an alternative to finding different libraries, the results of which are all on GitHub.

I’ll be in Amsterdam next week, so you can look forward to a “Fugio vrijdag” update.

Fugio 1.8.0 – Serial port and Firmata plugins

Arduino Uno

Happy Fugio Friday!

Today we have two new plugins that enable Fugio to talk to hardware that uses a serial port interface, which includes the Arduino range of open source hardware (like the Arduino Uno above), which means that we can control LED lights, motors, servos, and use sensors for touch, magnetism, temperature, and many more!

The serial plugin handles the raw data communication between the Arduino and Fugio, and can be used to implement any kind of custom protocol between the two, but we can go one further and use the rather nice Firmata plugin to talk directly to the Arduino pins without writing any Arduino code at all.

Download Fugio 1.8.0 for Windows and OS X

Get the source code on GitHub

I haven’t had time to do a tutorial video (yet), but here’s some pointers to get you started:

Setting up a Serial Port

  • In the new Devices menu, choose Serial Ports
  • Add an entry for your Arduino.  Make sure you choose the right port, and set the baud rate (the speed the serial port will work at) to 57600 (bits per second)
  • Remember to press the Enable button for the entry you’ve just added

Arduino Serial Configuration

Reading from the Arduino (without Firmata)

Upload the following code to your Arduino:

void setup()
{
  Serial.begin( 57600 );
  
  while( !Serial )
  {
    // wait for serial port to connect.
  }
}

void loop()
{
  Serial.println( "Hello, World!" );
  
  delay(1000);              // wait for a second
}

Create the following:

Fugio reading from Arduino

And use the following Lua program:

fugio = require "fugio"

PinInputStrings = fugio.input( "Strings" )

function main()
	local Strings = PinInputStrings:get()

	for i = 1,#Strings do
		fugio.log( i .. ": " .. Strings[ i ] )
	end
end

Setting up Firmata

Instructable for installing Firmata on Arduino

And here’s what you have to do in Fugio:

Quit the Arduino software and load Fugio:

  • Add a Serial Input node, a Firmata node, and a Serial Output node
  • Connect the Serial input and Serial output to the Firmata node
  • Connect a button to the Reset pin

Firmata setup

If everything is connected and configured properly, you should see the pins appearing on the Firmata node.  Check the logger window for additional messages.

Firmata with pins

If this doesn’t happen first time, you may need to close the patch and reload it.

At this point you should be able to read and write to the Arduino pins!

Click the Edit Pins button to configure pins for inputs (digital INPUT (true/false) and ANALOG input (0-1023)), and outputs (digital OUTPUT (true/false), and PWM mode is supported):

Firmata pins

I’m going to be showing a couple of artworks at the prestigious V&A Museum in London for the next few days with the High Altitude Bioprospecting team (and fellow members of the Institute of Unnecessary Research) for the Digital Design Weekend as part of the London Design Festival.

23rd September: 6-8pm
24th and 25th September: 10:30am-5pm

I’ll have Fugio on hand (creating music from genomic data) so come and say hello!

M YwldQ pW YZORh N lhct j