Saturday, May 30, 2009

Location...

Just so you know... I'm in the meeting Meeting Pavilion spot 514.

See you at Maker Faire!

Premiering tomorrow at Maker Faire: a totally different project!

I went to setup Tangólumen at Maker Faire today and after 5.5 hours of setup (well, 5 if you discount that 30 minutes of that was me getting lunch) it... didn't work.

Either I screwed something up in the setup or something broke in shipping (or both... or option C [to be named later]) but whatever the cause, I didn't bring the tools with me I need to really debug it, nor did I really have ample time (or the heart) to rip it back up and fix it.

However, instead of prepping to spend a weekend saying "Well... this is what it should be doing" I went to the hardware store and picked up enough parts to hack together with the laser cut pieces I brought to control Tangólumen's lighting rig to create a brand new piece. And it's 300% more awesome.

...and I'm not going to tell you what it is until after tomorrow opens.

Friday, May 15, 2009

Creating a NIB-free Cocoa Touch application in XCode

Do you program Cocoa Touch apps? Do you hate that all of the project templates expect you to be using interface builder? Me too! Here's how to get rid off all IB dependencies in your app!


Why would you want to do this?
Because programatically creating interfaces is considerably easier to deal with. (In my opinion anyway.)

How do you do it?
I'm glad you asked. It's a little bit of a hassle, BUT it's worth it.

So here we go.

1) Create a new project in XCode using the "Window Based Application" template (Title it whatever the heck you want. For the sake of this tutorial I'm calling it "NoNib")

2) Looking at all the contents of your new app you should see:
CoreGraphics.framework
Foundation.framework
Info.plist
main.m
MainWindow.xib
NoNib.app
NoNib_Prefix.pch
NoNibAppDelegate.h
NoNibAppDelegate.m
UIKit.framework

Go ahead and delete MainWindow.xib (the NIB) and send it to the trash. You don't need it.

3) Open Info.plist
Select the line with key "Main nib file base name" and delete it

4) Open main.m
Find the line "int retVal = UIApplicationMain(argc, argv, nil, nil);" and replace the second line with the name of your AppDelegate as a string (example "int retVal = UIApplicationMain(argc, argv, nil, @"NoNibAppDelegate");")

5) Open your AppDelegate.h file and remove the line "@property (nonatomic, retain) IBOutlet UIWindow *window;"

6) Open your AppDelegate.m file
Remove the line "@synthesize window;"
Then, within - (void)applicationDidFinishLaunching:(UIApplication *)application before the line that says "[window makeKeyAndVisible];" add this line "window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];"

7) Build and Go
If it doesn't build without error, you most likely missed something in the above steps. Otherwise it should launch in the simulator as a completely empty app with a black background. CONGRATULATIONS! You can now start building Views and View Controllers without any of those icky interface builder remnants dragging you down.

Monday, May 11, 2009

gEarings

Well since they've been delivered, it is now officially safe for me to post about these. For mothers day I made my mom a pair of gEarings, (stud earings that double as a functioning planetary gear when in their case)

All spread out
All closed up
Open lid
All spread out, different angle


I also put the design and instructions on Thingiverse where they have since been featured.

A couple really nice things in my mind: the entire thing is laser cut (including the dowels) There is very little glue (backs of the earrings only) and the earrings were thinned down using the laser on etch.

I am pleased.

Tuesday, May 5, 2009

Shared on Thingiverse

I decided to share the how to of the device in the last post with the world via Thingiverse.

Check it out.

Cordislumen (Tentative Name) progress

Wow... last little while has been piss poor blogging performance for me, hasn't it? I apologize, many things have been happening in my professional life, the majority of which I do not feel comfortable sharing online.

Anyway, onto the cool stuff.

Cordislumen (Tentative Name) progress part 1 from Andrew Parnell on Vimeo.



I just finished building one of the ... I believe three ... components of my next piece. (Tentatively known as Cordislumen, hence forth not referred to by name). In function it's like the system of pulleys in my last piece. But practically speaking...it works so much nicer. In part this is because I'm not having to deal with co-opting a piece of building infrastructure (though, I did really like that element of Tangólumen) and also because I learned a lot from Tango's design, and was able to better design this one.

This portion of the project contains an outlet, a dimmer switch, and a servo (and for now: a dirty rubber band). The servo operates the dimmer, which in turn controls the amount of current going through one of the outlet's two sockets. (The other one delivers consistent power to the micro-controller / servo via a wall wart.) This is a really nice way to control an outlet...because in all truth, full source voltage is scary, scary stuff.

Some more photos...right here:

Shows the entire rig all hooked together with a work lamp to demonstrate

Same basic composition as above, but shot in the dark with the work lamp on.