As you can see, the circuit consists of two switches, two LEDs, and a resistor in series (and yes, they actually are in series - there are no hidden wires). So how does each switch control one LED? Solution after the break:
Most Recent Update
March 16, 2012
Impossible Circuit
As you can see, the circuit consists of two switches, two LEDs, and a resistor in series (and yes, they actually are in series - there are no hidden wires). So how does each switch control one LED? Solution after the break:
January 28, 2012
Arduino Game Port Interface
A while back I got my hands on an old analog PC joystick, and since then I have been meaning to build an adapter make the joystick work over USB. The adapter I finally built consists of an Arduino connected to a game port I hacked off an old sound card. The Arduino reads the analog (x and y movement) and digital (buttons) inputs and then sends them to the computer over serial. Then a Processing script running on the computer reads the serial data, and converts it into mouse movements and clicks using the Java Robot class.
November 23, 2011
Retro Rechargeable USB Booster
This project started when I found a 7805 voltage regulator when I was searching through old circuit board for useful parts to scavenge. Since these chips are often used in DIY USB chargers, I decided to build such a charger, but with some major improvements over the typical 9V battery powered chargers housed in Altoids tins.
October 30, 2011
Shellback Dinghy
Back in the summer of 2007, I went to the Wooden Boat School in Maine with my granddad, and we took the Build a Shellback Dinghy class. We made very slow progress on the boat after that, and it is only now finished. The boat is made out of marine mahogany plywood, and it is just over 11 feet long. It has a mast, spars and sail in addition to oarlocks, but they do not fit on the boat in my granddad's indoor wood shop.

September 22, 2011
iMac Mini
I started this project because I had a small pile of Macbook laptops and white iMacs in various states of functionality. For this project, I used the stand and friction hinge from a 2006 iMac, the LCD from a Macbook that had coffee spilled on it, and the motherboard from a Macbook with a smashed screen. The keyboard header on the motherboard was missing, so I had no way to use it in a laptop. I decided to build a miniature iMac-like computer out of the parts I had. As it turned out, I built the computer only to find out that the USB ports on the motherboard I used were dead, rendering the computer useless. It was still a fun project though.
August 29, 2011
Tree Climbing Robot
After I got comfortable programming and building with an Arduino, I used my newly acquire microcontroller skills to build a robot. Using a microcontroller, four high-torque DC gear motors, spiked legs, a linear actuator, rotation sensors, and 3 L298 H-bridge circuits, this robot can climb up trees of varying diameter. The very long build log follows.

The robot in action:
The robot in action:
August 16, 2011
Predator-Prey Simulation
Since I started programming, I have thought it would be interesting to attempt to approximate life within a computer program. I started this project on my own, but finished it, collected data from it, and wrote a paper on if for my final CS class project.
What my final program does is create a virtual Petri dish with two types of cells in it: predator cells and prey cells. As the cells move around in their virtual environment, the predator cells try to chase down the prey cells, and the prey try to escape the predators. If the predators do not eat for a long time, they die of starvation. As the cells move in the simulation, the also replicate. All of the cells, both predator and prey, have two individual attributes: sight radius and movement speed, which are passed on from parent cells to child cells. However, as the cells replicate, there is a small chance that the child cells "mutate." In other words, one or both of their attributes has a slightly different value than the parent cell's attributes. These random mutations allow for natural selection to occur within the simulation, provided it runs for long enough. The most effective predators will survive the longest, and therefore produce the most offspring, so their desirable attributes proliferate. The same applies to prey cells that can escape most easily. As the simulation runs, it outputs the average attributes of all of each type of cell to a text file at regular intervals. If the simulation is run for a long period of time, these values can be evaluated, and one can see if natural selection occurred or not, on average.
Subscribe to:
Posts (Atom)