An Automated Flappy Bird Player

game Flappy Bird has been ported to just about every system imaginable, including but not limited to the Apple II, Commodores, pretty much every version of the Atari, and serves as a really great demonstration of the TI-99′s graphics capabilities. Porting is one thing, but having a computer automate Flappy Bird is another thing entirely. [Ankur], [Sai], and [Ackerly] in [Dr. Bruce Land]‘s advanced microcontroller design class at Cornell have done just that. They’re playing Flappy Bird with a camera, FPGA, and a penny wired up to a GPIO pin to guide the little 8-bit-bird through Mario pipes.

The setup the team is using consists of a webcam that records the screen of a smartphone, an FPGA, and a little bit of circuitry to emulate screen taps. Inside the FPGA, the team is looking at the video stream from the phone to detect the bird, pipes, and gaps. The ‘tapper’ unit is a US penny, placed right above the ‘tap’ button, wired to a GPIO port. This was found to be the ideal contact for a capacitive touch screen – taps that were too small weren’t registered, and taps that were too big registered as two taps.

For spending an entire semester on automating Flappy Bird, the team has a lot of knowledge to show for it, but not the high score: the bird only makes it through the first pipe 10% of the time, and the second pipe 1% of the time. The high score is three. That’s alright – getting the algorithm right to play the game correctly was very, very difficult, and to nail that problem down, they estimate it would take at least another semester.

A DIY Geomagnetic Observatory

Magnetometer observatory

[Dr. Fortin] teaches physics at a French High School, and to get his students interested in the natural world around them, he built a geomagnetic observatory, able to tell his students if they have a chance at seeing an aurora, or if a large truck just drove by.

We’ve seen this sort of device before, and the basic construction is extremely similar – a laser shines on a mirror attached to magnets. When a change occurs in the local magnetic field, the mirror rotates slightly and the laser beam is deflected. Older versions have used photoresistors, but [the doctor] is shining his laser on a piece of paper and logging everything with a webcam and a bit of OpenCV.

The design is a huge improvement over earlier DIY attempts at measuring the local magnetic field, if only because the baseline between the webcam and mirror are so long. When set up in his house, the magnetometer can detect cars parked in front of his building, but the data he’s collecting (French, but it’s just a bunch of graphs) is comparable to the official Russian magnetic field data.

Smart Hat Puts Your Head in the Game

man wearing a diy head mounted display

 

[Arvind] has dropped his hat in the game of head mounted displays. With Google Glass pushing $1,500, it’s only natural for hackers to make a cheaper alternative. [Avind's] $80 version might not be pretty, but it gets the job done.

Using a Raspberry Pi loaded with speech recognition software, a webcam, 2.5 inch LCD display and a handful of other parts, [Arvind's] hat mounted display allows him to view email, Google Maps, videos or just about anything he wants.

An aspheric loupe magnifier lens lets him see the display even though it sits around 5cm from his eye. No outside light is allowed in. Only the guts of the webcam were used to give him the video and microphone. We’ve seen other head mounted displays before, and this one adds to the growing collection. Be sure to check out [Arvinds] site for a tutorial on how to build your own, and catch a video of it in action after the break.

[Read more...]

Hacking An Old Parallel Port Webcam To Work With A Gameduino 2

connecting parallel port web camera to gameduino 2

[Andrew] couldn’t pass up a 20ish year old parallel port based webcam he saw on the shelf at a thrift store. It’s a Connectix QuickCam and was the first webcam that did not require a separate video input card to interface with your computer. Due to this feature, the webcam was extremely popular, so popular that Logitech ended up buying Connectix and marketing the camera for themselves.

It’s tough to find a newer computer that still has a parallel port, but using an old computer wasn’t [Andrew]‘s plan anyways. After thinking about it, he decided to try to get the camera’s image to display on a Gameduino 2.

The hardware list is fairly minimal. The cam’s parallel connector is plugged straight into STM32 Nucleo development board by way of several jumpers. The Gameduino 2 is connected to the dev board and a USB to PS/2 adapter was made to power the camera.

[Read more...]

A Webcam Based Posture Sensor

Webcam based posture sensor

Even for hobby projects, iteration is very important. It allows us to improve upon and fine-tune our existing designs making them even better. [Max] wrote in to tell us about his latest posture sensor, this time, built around a webcam.

We covered [Max's] first posture sensor back in February, which utilized an ultrasonic distance sensor to determine if you had correct posture (or not). Having spent time with this sensor and having received lots of feedback, he decided to scrap the idea of using an ultrasonic distance sensor altogether. It simply had too many issues: issues with mounting the sensor on different chairs, constantly hearing the clicking of the sensor, and more.  After being inspired by a very similar blog post to his original that mounted the sensor on a computer monitor, [Max] was back to work. This time, rather than using an ultrasonic distance sensor, he decided to use a webcam. Armed with Processing and OpenCV, he greatly improved upon the first version of his posture sensor. All of his code is provided on his website, be sure to check it out and give it a whirl!

Iteration leads to many improvements and it is an integral part of both hacking and engineering. What projects have you redesigned or rebuild? Let us know!

Your Mouse Is A Terrible Webcam

camera

It should come as no surprise your optical mouse contains a very tiny, very low resolution camera. [Franci] decided to take apart one of his old mice and turn that tiny optical sensor into a webcam.

Inside [Franci]‘s Logitech RX 250 is an ADNS-5020 optical sensor. This three wire SPI device stuffed into an 8-pin package is a 15×15 pixel grayscale image sensor. [Franci] started this project by bringing out the Arduino and Ethernet shield. After soldering a pull-up resistor to the image sensor’s reset pin, connecting the rest of the circuit was as simple as soldering a few wires to the Arduino.

The Arduino sketch sends the image data for each pixel to a computer over a serial connection. A bit of javascript and a touch of HTML takes this pixel data and turns it into a webpage with a live view of whatever is directly under [Franci]‘s mouse.

Video of the mousewebcam in action below.

[Read more...]

LED Bulb Reviews, Evaluations and Teardowns

LED Bulb Reviews

[ElectronUpdate] has posted many great reviews of commercial LED bulbs that one can purchase to replace standard E26 incandescent light bulbs. In his reviews he evaluates the light emitting performance and does a thorough and detailed teardown, evaluating and understanding the circuit technologies used. For the light emission evaluation he uses a light meter and some homemade graph paper to plot the lumens at different angles. Flicker is easily evaluated using a solar panel from a discarded solar path light connected to his oscilloscope. Any flicker will show up quite nicely and can be measured. Of course a kill-a-watt meter makes an appearance in most reviews to read watts and power factor.

Recently [ElectronUpdate] wanted to understand the meaning of CRI which is advertised on many of these commercial LED packages. CRI stands for color rendering index and deals with how colors appear when compared to a natural light source. After doing some researching he found that a CRI over 80 is probably good for LED lighting. The next dilemma was how to measure CRI without expensive scientific equipment. He found a website that we have featured before with free software and instructions on how to build a spectrometer. The web instructions include building a meter box from paper but he found it was much more reliable if built out of wood. We’ll let you follow [ElectronUpdate’s] recommended build if you like, but you’ll need a few items which he does detail.

After a short calibration procedure the final rig will measure power spectral line densities of your light source. [ElectronUpdate] is promising more details on how the colorful measurement data can be related to CRI ratings, but you can get a jump on the details at Full Spectrum Solutions. We also recommend you browse through all of [ElectronUpdate’s] LED bulb reviews on YouTube if the progressing performance and innards of LED bulbs fascinates you as much as it does us.