With the right apps, cases and add-ons, your smartphone can tackle a wide and whacky range of tasks.

Just like "when all you've got is a hammer, every problem looks like a nail" (or "when your problem is a nail, every tool you've got looks like a hammer"), when you've got a smartphone, there's a good chance there's an smartphone app, case, or accessory for whatever you want to do.

Not just the easy or obvious things, like turning your smartphone into a GPS, mirror, or mini-periscope, or providing damage protection. I'm talking about a wide, even seriously whacky range of tasks.

Here are 9 ways to turn your smartphone into the hammer for your nail.

Thanks to its built-in sensors -- typically including GPS, gyroscope, accelerometer, magnetometer, and microphone -- your smartphone can easily serve as a variety of tools for carpenters and other handypersons, like a level (bubble level bar, surface level or plumb-bob) and compass. And a smartphone doesn't even need sensors to be a display-based tool like a ruler or a protractor.

Some tasks call for a microscope -- like looking for clues, or checking watermarks on paper money.

Sure, you could pack a USB microscope that uses your tablet or notebook as a display -- but for seriously mobile microscope users, there are magnifying attachments for your iPhone, Android phone, or other mobile devices. (Most of these comprise the actual microscope plus a device-specific case.)

Thermal imaging -- looking for "hot spots" or other temperature differences has many uses. Home energy auditors do this to see where you need more insulation, better windows, etc. Industrial sites use them to spot anomalies before problems develop. They're popular for security monitoring, gas leak detection, and with firefighters. But traditional thermal imaging systems haven't been cheap.

FLIR One's case will let a smartphone act as a thermal imaging system, showing infrared, even merging it with regular camera views and other data.

FLIR One for iPhone 5/5s is currently expected to be available spring 2014, for under $350, and a model for selected Android smartphones later in 2014.

For an even cheaper, although not quite as accurate, radiation-sensing iPhone 4 solution, consider the WikiSensor Dosimeter App (iOS, $0.99). (You'll also need something that can cover the camera to block out visible light -- like an inch of black electrical tape, or your thumb.)

Medical professionals are finding a growing number of ways to turn smartphones into inexpensive, portable alternatives to traditionally costlier, bulkier tools.

Lift Lab's LiftPulse (Free, iOS) app gives doctors an easy, affordable way to measure and quantify "tremor" -- a common symptom of medical issues like Parkinson's Disease -- using the accelerometers in an iPhone.

Developed in the MIT Media Lab's Camera Culture research group, the NETRA (Near-Eye Tool for Refractive Assessment) is an inexpensive clip-on that turns a smartphone into a portable eye tester with average accuracy as good as and sometimes better than much larger, more expensive diagnostic tools.

NETRA will let medical staff -- or even the patient -- diagnose common "refractive eye disorders" like near- and far-sightedness, astigmatism, and presbyopia, which affect nearly two billion people globally.

Sensorcon's SensorDrone hardware ($199) lets you use your smartphone (or other device, like an Arduino) along with built-in or add-on sensors, plus Android and iOS apps, for a growing variety of tasks.