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
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
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
Raw microphone access in Air 2.0
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.
I Just started to prototype the ledUkulele.
I got myself a max7221 IC and hooked it up to the arduino board.
I’m now thinking of good way to wire the 4*16 matrix
basically a 8×8 matrix but the physical postion of the odd rows is behind the even rows.
Designing this matrix on a breadboard sucks (too many wires), so I need to come up with a better way without soldering. (suggestions welcome)
I’m thinking about a new experiment.
Here’s the thing, I love playing Ukulele. Once a Month we organize a playalong.
There are people who never played an instrument before and others that are regulars.
Together with my Friend Marcel, creator of ukulele.nl has made a really nice chordfinder
I will be making a version 2.
Here’s the though: what if ?:
I could build a Ukulele that shows the fingering of the chords ON THE UKULELE!
And even have it sync to the chords shown on screen?
What do you think, wouldn’t this be a cool Merpai/Arduino/Ukulele project?
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).
I’m working on a new Arduino experiment.
My friend Ivo Noorhof made a new arduino shield.
I’m hacking together some Flash-Arduino interaction for this shield.
I will “Shed More Light” (wink wink) on the subject soon.
Try this…
Create a context menu, for instance to go fullscreen.
Make sure it works.
Now add a Video Object, attach a cam (or play an flv– more work ![]()
and right click on the video object to show the contextmenu…
now select fulscreen…. and nothing happens
I can’t get this to work. It only fails if I rightclick on a videoobject..
Any thoughts?
A lot of you may know that it’s nearly impossible to create an Actionscript Project in fexbuilder 3 Where the Main Class is in a subdir of the project dir (so that you can keep the Main Class in the same package as the rest of your files).
Today, at Colin Moock’s AS3fromthegroundup session in Amsterdam, I confirmed that it is in fact possible in 2 ways.
The Second way is to create your Project as normal.
Move your Main Class File to the correct (package) dir.
Close Flexbuilder.
Edit the .actionScriptProperties file in the ProjectDir
and set the
tag to the correct location.
Happy Coding,
Ow and Colin.. (and OReilly) thnx for the Prize.
I’m a Doctor Jim, Not an Actionscript3 Programmer..