Windows Phone Solar Eclipse Viewer

On May 20th, 2012 (today, as I write this), there will be a Solar Eclipse.  I live in San Diego, CA and there is supposed to be some prime viewing for it in Southern California.  As you know though, looking directly at the sun (even when eclipsed) is a bad idea.  Yesterday, I started looking for ways to view the solar eclipse and other than getting some special glasses or lenses, the most common solution is a pinhole “projector”. 

Pinhole Projector

I made a quick version using an old tissue box, but being a nerd, I couldn’t just leave it at that.  My next revision actually uses a LifeCam webcam in a box. I won’t describe it in detail here, but if you understand the instructions for the phone version, you should be able to easily modify it to use a webcam instead.  


My final version uses a Windows Phone as the viewer.  This gives me the benefit of being able to use all the great features of the windows phone for photo / video sharing, and I can share my images live!  Here is the basic idea:

Pinhole Box Phone Projector

Here are the supplies I used.  I happened to have some 3M picture hanging strips that don’t leave a residue behind when they are removed.  I used these to attach the phone to the box so I didn’t have to worry about gumming up my phone.  I also attached them to my phone case so that I wasn’t attaching sticky stuff directly to the phone.

01 - Supplies


  1. Cardboard box
  2. Sheet of white paper
  3. Poster strips (or blue tack, or just tape to attach the phone to the box)
  4. Pin (or needle) for making the pinhole
  5. Craft blade or something to make the holes in the box with
  6. A roll of duct tape.  No project is complete without the duct tape
  7. Scotch tape (I actually used spray mount) for attaching the paper to back of the box (inside)
  8. Tin Foil, this will have the pinhole in it.  Use paper if you prefer.
  9. A Windows Phone and a case with a hole for the camera in it

First cut the paper to fit the end of the box and tape it inside the box on one end:

02 - Paper on Back Wall

Make sure to remember which end has the paper on it.  You want the pinhole and phone to be on the opposite end.  The paper will act as the “screen” that the image will be projected on. 

Next completely tape up the box.  I used duct tape to seal all the edges and ensure no light got in:

03 - Box Completely Taped Up 

On the end OPPOSITE from the paper, layout the holes that you will cut for the foil to cover and for the phone’s camera to “see” through.  I tried to center the hole for the foil to cover at the center, and the I used the phone case to line up the hole for the camera:

04 - Layout & Markings

Cut the holes:

05 - Holes Cut

The cover the square hole with a piece of foil and tape around the edges of the foil to keep out extra light.  Then use the pin or needle to make a small round hole in the center of the foil.

06 - Tin Foil with Pin Hole

Use whatever adhesive you chose to mount the phone case to the box.  The 3M Poster Strips I used work well because I could surround the camera lens with them to help block out any extra light:

07 - Case Taping

With the phone in the case, mount the phone to the box.   Take special care to make sure the camera lens is directly over the hole you made for it in the box.

08 - Phone on Box

You are ready to go!  Take your phone outside, and point the pinhole at the sun.  The image of the sun should be projected on the back wall of the box with the paper on it.  Use the phone’s camera to view the image. 

09 - Box In Use

The image of the sun is pretty small.  You might experiment with a longer box, or a larger pin hole or ? to adjust it. Here is a closer up picture of the image on the phone.  The image is the white dot in the middle of the phone screen. 

10 - Sun on Phone

You can take pictures of the sun now, or even video.  I recommend TURNING OFF YOUR FLASH.  Share your images online as you watch the eclipse using Windows Phone’s integrated Messaging, Twitter and Facebook features!  Here is an actual photo from my phone:

11 - Actual Photo from Phone

Of course, making a version with a LifeCam web cam instead is just the same, just make a hole for the LifeCam to fit through.  Then connect the LifeCam to your computer and watch the eclipse from The LifeCam software.  Take stills or even capture video, and post it!. 



Robots Hate Stickmen! Who Knew!

You probably never knew that Robots Hate Stickmen, but it just so happens, they do!  How do I know?  Well at my last So Cal Code Camp session on creating XNA Games on Windows Phone 7, I left it up to the audience to draw the art for the hero, for the villain, and for the projectile in an XNA game we built on the fly.  The hero turned out to be a robot, and the villain was a stickman.  I guess the session should have been about twice as long because we didn’t get through as much of the game development as I would have liked, but I have finally gotten around to cleaning up (and completing) the code for the game. 


Grab the source code for the game, or the slide deck from my session


Windows Phone SDK 7.1 available in ISO

Normally, when you install the Windows Phone SDK 7.1 you do it through the web installer located here:

However, if you need to install it on a disconnected machine (like a VM with no network access) it’s helpful to have an .iso of the installation media to install from.

Well, while they don’t make it obvious, Microsoft also provides a download for the .iso as well.  You can get it from here (at least until the links change! :-):

Windows Phone 7 Unleashed San Diego, May 7th

All Day (10hours) of Hands on Programming, B.Y.O. Laptop!

Windows Phone 7 is HOT! Come check out “Windows Phone 7 Unleashed” at the Microsoft San Diego office on May 7th, 2011 (register here) for everything you need to know to develop for WP7. Whether you’re a seasoned veteran or you’re just starting with .NET development, there’s something in it for you.

The first half of this deep dive event is lecture and hands on lab. At the half point mark of the day, you’ll have a solid foundation for building WP7 applications.

The second half of the day is going straight to code.

Where:            Microsoft San Diego Office, 9255 Towne Center Dr., San Diego, CA 92121
When:             May 7th, 2011 from 8am to 6pm
Cost:              FREE
Sign Up:

Build the best app and win a $500 (1st place), $200 (2nd place) or $100 (3rd place) American Express gift card!

Free MarketPlace tokens for those putting their application into the marketplace (a limited supply of these, organizers of each event will collect names and we will distribute)

Telerik is sponsoring a $5000.00 Grand Prize for the best application over all of the WP7 Unleashed events that are submitted to marketplace. The top 25 will be selected and then one of the top 25 will be randomly picked for the prize (So get your app into the marketplace after the event). They are also giving EVERY attendee a free set of their $99.00 WP7 Controls.

PDSA, Inc. is pleased to sponsor the WP7 Unleashed Events. They  will be giving 2 lucky winners from each event a chance to win four 1 hour long videos on Silverlight. In addition 1 lucky person will win our Haystack Code Generator for .NET at each event that allows you to create the business and data classes and the WCF services that can be consumed by Windows Phone 7 applications!

O’Reilly will be giving away a free ebook to every attendee (Many WP7 titles) and will also donate a few books to raffle at each event.

Food and Drink (Water, Sodas) will be provided.

Parking is $15.00 for the day if you park in the building’s parking lot.  If you prefer you could park in the UTC Mall parking lot, and walk across the street to the building.

In order to deliver the best possible experience for attendees, seating at these events is VERY limited. Register now!