Gepatto Blog

Who needs a tagline anyway?

October 31, 2011
by patrick
Comments Off

Native Extension for Air3

Finished first version of a Native Extension for Air3.. for Windows:
Shutdown or Reboot windows. It’s for an installation allowing 1 control client to shutdown a number of other computers through rtmp using wowza.
Simple dll in Visual studio 10, and compiled the ane and sample.exe using flashdevelop.. Next up, cleaning up code.. and building an OSX equivalent.

November 12, 2010
by patrick
Comments Off

Controlling Living Colors from iPhone phase 1

So I while ago I did some experimenting with the LicoControl shield.
I ended up building a simple c# app for my win7 media center to control it.

Yesterday I added a socket server that acts as a proxy. So now I’m able to send the control messages from any tcp client.
I made a small flashcs5 iphone-app that does just this. (way faster then building an Objective-C equivalent).

next time I’ll build a proper Objective C app and maybe I’ll try to set up the arduino with an ethernetshield and program the server right into the arduino using mDNS (bonjour) services.

November 12, 2010
by patrick
Comments Off

Prototype stage 1 Footcontrolled keyboard-interface

I like to play music, and sometimes I even like what I’m doing enough to record it.
It’s pretty annoying having to reach over to my mac and ‘record’, ‘start’,'stop’,'rewind’  Logic Pro
while I’m holding my guitar focusing on my killer riff.

So I decided to build a foot-controlled mini-keyboard.
I found some really cheap sustain-pedals for keyboards here in the Netherlands (that turned out to be quite decent, and even have a polarity switch)
So I looked for my spare Teensy , bought some mono jack-chassis and wired them up.
I wrote a simple Sketch that sets 4 digital pins to internal pull-up input, and sends a (preprogrammed) keydown
when an input is low (and sets a flag)  and a keyup when input is high and the flag is set for that key.

(The seeeduino on the photo is just there because it’s attached to the breadboard!! it’s not connected)
.
I reused one of the boxes the pedals came in as as casing
.

In prototype stage 2 I will make the Teensy sketch programmable using a switch, a potentiometer and an lcd-display (which hasn’t arrived yet)

In stage 3 I’ll make a proper casing.

May 17, 2010
by patrick
Comments Off

Xcode Duplicate line

So I have started working in xcode, and the first thing I was missing was some key bindings for duplicating a line up or down like eclipse does.
I took a while to figure out how to do it. So here’s an explanation. (I’m using xcode 3.2)
Make a duplicate of the xcode keybindings set in the xcode preferences: (i named mine patrick ;-)


Close xcode

You should be able to find the file xode created in
/Users/YOURUSERNAME/Library/Application Support/Xcode/Key Bindings
for me it is called Patrick.pbxkeys

Edit this file with the property editor.
From the view menu select :
Show Strings as Non-lossy ASCII

Add 2 children as follows

Save, and open up xcode

ctrl+shift+uparrow should now duplicate the current line upwards
ctrl+shift+downarrow should now duplicate the current line downwards

happy coding

May 15, 2010
by patrick
Comments Off

Smile, Cheese, Look at the birdie.

I did a small openframeworks experiment today.
I was building a diy remote for my canon 400d, which is really easy to make.
I then thought; hey why not connect it to my mac through an arduino.
I took the example from the ardx kit circuit 11 using a simple a 5v relay.
removed the 5v from the COM pin (see pdf) on the relay and attached the ground line coming from the camera.
and attached the shutter line to the NO-pin (see pdf).

I the wrote a simple sketch in Arduino:
Waiting for the character s on the serial-in and then setting pin 2 to HIGH for 1250 milliseconds, enough for the camera to focus
even when using the flash.

int outPin =  2;

void setup(){
Serial.begin(57600);
pinMode(outPin, OUTPUT);
}

void loop(){
checkSerialInput();
}

void checkSerialInput(){
if (Serial.available() > 0) {
// get incoming character:
char serialChar = Serial.read();

if (serialChar == 's'){
//shutter
digitalWrite(outPin, HIGH);
delay(1250);
digitalWrite(outPin, LOW);
}
}
}

I then figured that it would be nice if I could take the picture if I smiled at the camera.
Since I can’t loop the image from the eos 400d back into my mac, I used the webcam instead.

I found that someone else had already done “smile” recognition in openframeworks using opencv.
I just needed to add some lines to set up the arduino and write an ‘s’ to the serial port. And presto.
Smiling at the webcam took my picture.

Here’s the xcode project:
SmileAndClick

November 18, 2009
by patrick
2 Comments

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 ]

September 20, 2009
by patrick
Comments Off

Looking back…

I was just looking back on one of the projects I did last year.
Xite.nl is a music-website, full of streaming videoclips.

I was asked to build the videoplayer and videobrowser.
This was my first project that used Zend_AMF instead of AMFPHP,
and also the first time I worked with the Zend-framework.

Go take a look Here:
http://www.xite.nl/

Screen shot 2009-09-20 at 4.35.16 PM