Recently, I've become pretty interested in figuring out ways to reduce my energy costs (and energy footprint). I'm not some radical environmentalist or anything, but it doesn't hurt to know that you can still watch The Colbert Report when the world's oil dries up and all of the rich people move to Mars. So, I did some research and some playing around. Eventually, I had this finished wind turbine that can produce enough electricity for me to use my laptop, lights, or TV anytime and anywhere I want for free! They are pretty easy to build using relatively common parts (a DC permanent magnet motor, a diode, and some PVC pipe), and I'll show you how to do it.
Useful Java Classes
A while back I was working on a pretty big project in Java. Throughout the project, I wrote some classes that I have since re-used again and again. I'm not into Java too much anymore, but maybe someone else will find these classes useful too. Explanations of each class follow.
FrameGrabber.java: Uses the Java Media Framework (JMF) to grab images from a Video for Windows (VFW) device in the Java Image format in real time.
PixelRetriever.java: A single function interface to retrieve a 2D int array of raw pixel data from a Java Image.
ImagePanel.java: A subclass of JPanel that allows images to be directly drawn (in real-time) to a panel. This is useful if you have an array of Java Image objects and want to display them in sequence in a GUI.
SerializableImage.java: For some reason, Java Image objects aren't Serializable by default. I've created a subclass of Serializable that allows a Java image to be serialized. This is useful when you want to transfer an Image over a socket or write them out to a generic binary file.
SourceRetriever.java: Retrieves the source of a web page given a valid URL.
Ever wanted to create your own terrible language translations like you see so much every day in user manuals and video games? Ever wanted to write your own "Dear Friend" scam letters but weren't creative enough? Me too! So, I wrote this nifty little script to do all of the dirty work for you. Make sure and try it multiple times, as the algorithm randomizes the translations. You can get the Perl code here.
I've been working on this one (incrementally) for a really long time. I started off with a base made out of a modified Radio Shack RC car that I picked up at a thrift store, used an inexpensive Debian Linux based single board computer from Technologic Systems, added my 3A Motor Controller, a Logitech webcam, cheap USB wireless card, and soon had a very powerful little machine...