iphone

iPhone Lens Adapters from Photojojo

I've seen a few different add-on lenses for iPhones out there and decided to nab a set for myself to make my detail photos and product shots a little more neato. I went with the Photojojo three-lens kit for $49 US. Photojojo Three Lens Kit

These lenses are just little guys. They come with front covers and magnetic back covers that double as little string handles.

Lenses and Kinect Ring

Kinekt Design Gear Ring not included.

The lenses are tough little buggers. Appear to be made from aloominum (or Al U. Minium, if you're from Canadia, eh), or something like it. The black front caps are flexible plastic and the backs with the little handles are magnetic metal something something. Quality is nice and the glass appears to be very clean and clear. My telephoto lens did not ship with a fingerprint. I had to accidentally add that myself. It was easy to clean off with a standard microfiber cloth.

Since the camera on my iPhone 4s isn't a solid replacement for my Canon DSLR, I'm not going to tell you this is an ideal replacement for a good DSLR setup. For any sort of high-end product shot or landscape or anything other than fun or convenient photo making, stick with your expensive lenses and DSLRs. For the stuff I do for StuffAndyMakes.com, like videos of blinky LED circuits and little motorized this and thats (and occasional bourbons), it's plenty OK. These lenses give the iPhone optics a little help in its range and that's it. Not super fancy. Good for a measly $49.

Here are some samples of each of the lenses from the same distance imaging the same object (my favorite gadgety ring of all: The Kinekt Design Gear Ring):

Test Setup: Side View

Test Setup: No Lens

Yes, the ring was dirty between the gear teeth. I was too lazy to clean it. Which, by the way, I've found is best done with good old antibacterial foamy hand wash stuff. Get a bunch on the ring and spin it a while. Rinse with water and repeat one or two more times. Works 100% of the time every time. Makes the ring spin freely and happily.

Test Setup: Macro

Test Setup: Fisheye

Test Setup: Telephoto

You can see the telephoto is useless as close as I had the camera, but I figured I'd show it to you anyway. It seemed similar to the way the video mode of the iPhone camera looks. A bit zoomed in compared to the regular still photo shot.

The lenses are small, like I said above, and they are magnetic on the back. This allows them to stick to the self-adhesive ring on the phone, which comes off of the phone without leaving a mark. The little string handle/back cap is also magnetic and keeps the back of the lens nice and clean.

Lenses and Kinect Ring

Here is one of the lenses on the phone:

Lens on iPhone

Here are some more sample photos:

Macro View of FTDI Basic Board

Macro View of Watch

Macro View of Arduino Uno

Fisheye of Electronics Bench

Fisheye Inside Piano

Fisheye of Clock

Fisheye of Bourbon Collection

The macro is the one I'm most interested in, since I do a lot of close-ups on components and stuff. The fisheye is fun, but otherwise useless for me. The telephoto is cool, but I doubt I'll be carrying these around with me very often. They're stuck to the face of my man cave beer fridge next to my electronics workbench. They're conveniently accessible there and that's likely where they'll spend most of their days.

Objective-C/iOS/iPhone: UIColor from NSString

Until I find a home for my little snippets of code, here is where they will go. While building an iOS (iPhone) application, I needed a quick little method in Objective-c that would take strings of color codes from data provided by web developer peeps and convert those string values into UIColor objects. For instance, sometimes we'd get "#ff7401" from the data for our app. Sometimes it might be formatted like, "0xff7401" or even just, "ff7401". I simply created a category on NSString to make is super-simple.

NSString+meltutils.h

[code lang="objc"]

//  UIColor+meltutils.h

//  Created by Andy Frey on 10/15/10.

#import <Foundation/Foundation.h>

@interface NSString (meltutils)

- (UIColor *)toUIColor;

@end

[/code]

NSString+meltutils.m

[code lang="objc"]

#import "NSString+meltutils.h"

@implementation NSString (meltutils)

- (UIColor *)toUIColor {

unsigned int c;

if ([self characterAtIndex:0] == '#') {

[[NSScanner scannerWithString:[self substringFromIndex:1]] scanHexInt:&c];

} else {

[[NSScanner scannerWithString:self] scanHexInt:&c];

}

return [UIColor colorWithRed:((c & 0xff0000) >> 16)/255.0 green:((c & 0xff00) >> 8)/255.0 blue:(c & 0xff)/255.0 alpha:1.0];

}

@end

[/code]

So, to use this, all you have to do is import the header file and send a message to your string that contains the color code:

[code lang="objc"] #import "NSString+meltutils.h" ... UIColor *c = [@"#ff840a" toUIColor]; ... [/code]

Hope that helps someone out a little!

What happens when a fat guy on a golf cart parks on my iPhone?

Here is what a fat man on a golf cart (who apparently doesn't look in front of him while he drives) can do to your iPhone 3Gs that accidentally fell off your golf cart at the previous hole: Crushed iPhone

For those who have weak constitutions, turn away... Oops. Too late. Sorry.

Short story: One day I went golfing with my best friend. I used my iPhone 3Gs as a golf GPS. At the tee on hole number 3, it fell off our golf cart and landed face down on the side of the cart path. While we were playing the short game on hole 3 (up near the green), a fat guy in a hurry rolled up to the tee box and parked his fat ass and his golf cart on top of my iPhone. The end.

$199 later at the local Apple Store, I had a brand-spanking new iPhone 3Gs with not a single scratch on it. Yay (kinda)!