A long standing problem with Beep My Stuff has been that the web cameras built in to laptops can't focus on barcodes held close to the lens. Well I've got a hack to work around the problem. It's not pretty and it involves taking a disposable camera apart :)
Before we get going I'll state the obvious that this will void your camera's warranty, the camera will not function as a camera after this and some photo labs will not take the camera roll from a disassembled disposable camera. I am also not responsible for you stabbing your hand with a screw driver or shocking yourself with the capacitor that might be in the camera. Please be careful.
The cameras with flashes in them contain a VERY large capacitor that will give you a VERY NASTY shock. Please don't do this if you are not confident with electronics. I am not responsible for your actions. You have been warned.
A few days ago I read
this article on
Make about taking apart a disposable camera to take close up photo's on an older generation iPhone. Well the first thing I thought was does this work on a MacBook Pro with Beep My Stuff and I'm happy to say that it does.... and it works really well :)
It takes about 10 minutes to take apart a disposable camera. It cost me £5 from a local pharmacist (if you ask nicely they may give you a used one for free, they just bin them anyway). All disposable camera's are broadly the same so I can't see why you shouldn't get the cheapest camera you can find. You may even have one lying around, remember they expire after about a year so you can make use of an old one hidden in a cupboard somewhere.
Firstly a word of warning IF your disposable camera has a flash it will have a big capacitor in it and this will give you a nasty shock if you touch it's terminals. So be careful.
So first thing to do is make sure that the flash is discharged by taking a photo with the camera. If the capacitor was charged there will be a flash and a good chunk of it's energy will have been dissipated.
Around the edged of the camera you should see little plastic tabs holding the body together. Carefully unclip those revealing the inside of the camera.
Now remove the battery to stop the capacitor charging up again. My camera flashed while I removed the batter so keep your fingers away from the capacitor while doing this. The basic rule of thumb is to keep your fingers off of the circuit board and metal bits :)
The lens we want is the one that goes up against your eye when you are taking a photo. In this camera I needed to take all the parts of the camera out to remove it safely. Just take your time and most things will come out quickly and with little effort. Remember these cameras are assembled by people and are made to be quick and easy to put together so they come apart in a logical way.
I had to use a hack saw to remove the lens from it's plastic moulding. It's a little bit fiddly so watch your fingers. Once it is separated I used some sticky tape to hold it in front of of my MacBook Pro's web camera.
Now a barcode that is held at 3-5 cm's from the camera is nicely in focus and beeps quite well.
I'm going to think about a cradle to hold the lens in front of the camera so I don't get a sticky laptop. If anyone has any ideas please comment. If you know of a cheaper source for a lens like this then please comment.
Lastly I know this isn't perfect and I'd love to solve this problem in code but I don't think this is going to happen. It's kind of fun destroying the camera as well :)
Happy Beeping :)