Currently Browsing: Combining Technologies

Arduino a compass, serialproxy and Unity3d

I have been trying to connect my arduino to Unity3d 2.6 on both OSX and Windows.
Unfortunately the implementation of the SerialPort in the version of mono that Unity is using is broken on OSX.
I did have succes on windows, once I found out that the mono-serialport doesn’t support events and therefore is synchronous!!
The best way would be to use a native plugin, but that would mean you would have to use the Non-Free Pro version of Unity.
So.. In comes Tinkerproxy and  Sockets. Using a socket to relay the serial-data also means that you don’t need Unity to be on the same machine as the arduino.
I even managed to read the sensor data directly from an arduino with an ethernet shield!

So what happens if take a compass module and tie it to the y-rotation of a camera..
well here is a video of me sitting on a desk chair with my laptop and the compass on an seeeduino.
[ sometimes macbook interferes with the compass! especially when I placed the compass over the HD ]

Flash now talking to breadboard prototype

The Guys from Merapi pointed me towards their AS3-only branch on SVN.
It took me while the get my test running, mainly because I forgot to use the registerClassAlias function in flash, which ended up in Java not recognizing my messages.

After a succesful test, I quickly hacked a swf-module that could be loaded into version 2 of the Ukulele Chord Finder ( version 1 can be found at http://www.ukulele.nl ) that we have under development.
So now we can talk to Merapi Straight from the browser.

I also managed to turn the Java Side of the Merapi-Bridge into a Mac application.
So here’s a video of the things I made.

[Javascript required to view Flash movie, please turn it on and refresh this page]

First breadboard prototype finished

Well, it took a lot of wires but here’s the first breadboard prototype:

The Arduino with Protoshield and Breadboard with ledmatrix

The Arduino with Protoshield and Breadboard with ledmatrix

On the left we have an Arduino Decimila with a prototypeshield on top.
The prototypeshield contains a max7221 ic 2 capacitors and a resistor.
The breadboard contains 64 leds in a 8×8 matrix.
I was aiming for a 4×16 setup, but there was no way I could get the wiring done on one 1 breadboard.

The 8x8 ledmatrix

The 8×8 ledmatrix

So far this is just a worked out example of : http://www.arduino.cc/playground/Main/MAX72XXHardware

The Arduino is now running a simple loop.
Next stop is writing an intelligent layer like firmata.
So more to come soon……

[Javascript required to view Flash movie, please turn it on and refresh this page]

Merapi now open source, converted arduino experiment

At Flex360 The Merapi-project went open-source.
So I decided to convert the LivingColors Experiment back from a server client model (Wowza + flash client) back to a single machine setup.

So I got an arduino-board and custom shield, a java-application that connects to the serial port on one side and to an Air-app on the other via the Merapi Bridge. The Air app gets an average color from the center of a webcam image and sends it to the java, which in turn sends the number (color) to the serial port. That’s all.

I do need to tweak some stuff, so that there’s less jitter.

[update]
More on the Arduino – Livingcolors shield can be found here : http://static.knutsel.org/kits/CC2500_Arduino_Shield_v03/ (in Dutch).

merapi_webcam_livingcolors

[Javascript required to view Flash movie, please turn it on and refresh this page]

The new arduino Experiment update

Here’s my latest Arduino Experiment.
It’s an arduino decimila board with a special shield designed by my friend Ivo Noorhoff.
The shield replaces the remote control for one or more Philips Living Color Lamps.

in this Example I’m taking the center 80×60 pixel of a webcam image an getting the average color.
I’m sending this color (if changed from the last sample) once every second to a wowza-media server app on my server that has the arduino board attached. (the server is close enough to a living colors lamp !!)
[ Now all it needs is some proper error handling.. ]

Et voila! Remote Controled Ambient lighting.

I’ll try to get a video up soon.

arduino funnel cmp03 Compass FirmataI2C & Google streetview

Had some fun with my arduino decimilia, a Devantech cmp03 compass Module and google streetview.
I used the FirmataI2C library from funnel and wrote a simple as3 class to get my cmp03 working.
Then hooked it up to the google streetview api example via ExternalInterface, and had the compass heading set the yaw of the streetview.

[Javascript required to view Flash movie, please turn it on and refresh this page]

Useful? not really
Fun? YEP!

ComputerVision and Flash10

Just a random thought

I wonder if Hydra (coming in Flash Player 10) could also enable us to do some computervision stuff.
For instance get multiple rectangles that enclose colored pixels, so we can isolate color regions.

I already have some nice experiments in mind :-)

Flash, Midi and Red5

Although I’ve had some real fun using the velleman k8055 to control flash with sensors, it only supports 2 analog inputs.
So I started looking for alternatives and was pointed towards the MidiSense page. It’s a small and affordable circuit that has 6 analog inputs and sends the data as Midi.
Midi huh, so how are we gonna get that into Flash? Well, I saw this wonderful post on John Grden’s blog.
So I hooked up my flash-file to Red5, converted John’s code (just a few lines) to AS2 (I’m still teaching my students AS2) and…
‘Hurray’ 6 analog sensors were available to flash…

In John’s Words… ROCK ON \m/

Wrapping the k8055 dll to an neko ndll

I loved the fact that I was able to communicate between flash and my Velleman k8055 board after I had created my c# wrapper app.
I’m using it to give a course on Haptic Interfaces at Communication and Multimedia Design.
But I’ve been having problems getting the .NET2 framework installed on some machines
(security settings, that I can’t change)

So…. I finally tried wrapping the dll into a Neko ndll to be used with neko and/or haxe.
Main problem:
I don’t know c or c++.
Solution:
2 liters of Coffee , 3 E-books, 4 krentenbollen (buns with raisins) , 5 websites and 6 hours of being really focused (which is very rare)

And now I have a 0.0.1 release (which is probably very buggy)
But hey, let’s share it

All the demo does right now is turn on 3 digital outputs and 1 analog output.
Proper demo coming soon.

FMS on Fedora Core 6

I upgraded my develoopment-server to Fedora Core 6 , so I had to reinstall some apps.
Getting Flash Media Server to run on FC4 wasn’t easy so I knew trying the same on FC6 would also be a challenge.
Here’s what I got so far.

Get the latest version of FMS from adobe.
flashmediaserver2.tar.gz
unpack and change into the ‘ FMS_2_0_4_r79_linux’ dir
install with:
./installFMS -platformWarnOnly

Don’t choose to start the server, cause your (probably) missing some some symbolic links
get openssl097a
yum install openssl097a-0.9.7a-9

now you should be able to start fms.

If it doesn’t work, try running fmsmanager in de fms directory
./fmsmanager &
and see if it throws any errors

Happy streaming

« Previous Entries