Tracking The Hamster Marathon

[Michelle Leonhart] has two Roborovski hamsters (which, despite the name, are organic animals and not mechanical). She discovered that they seem to run on the hamster wheel all the time. A little Wikipedia research turned up an interesting factoid: This particular breed of hamster is among the most active and runs the equivalent of four human marathons a night. Of course, we always believe everything we read on Wikipedia, but not [Michelle]. She set out to determine if this was an accurate statement.

She had already added a ball bearing to the critters’ wheel to silence it by cannibalizing an old VCR. What she needed was the equivalent of a hamster pedometer. A Raspberry Pi and a Hall effect sensor did the trick. At least for the raw measurement. But it still left the question: how much distance is a hamster marathon?

01_hamster_stride_measurement[Michelle] went all scientific method on the question. She determined that an average human female’s stride is 2.2 feet which works out to 2400 strides per mile. A marathon is 26.2 miles (based on the distance Pheidippides supposedly ran to inform Athens of victory after the battle of Marathon). This still left the question of the length of a hamster’s stride. Surprisingly, there was no definitive answer, and [Michelle] proposed letting them run through ink and then tracking their footsteps. Luckily, [Zed Shaw] heard about her plan on Twitter and suggested pointing a webcam up through the plastic bottom of the cage along with a scale. That did the trick and [Michelle] measured her hamster’s stride at about 0.166 feet (see right).

Now it was a simple matter of math to determine that a hamster marathon is just under 10,500 steps. Logging the data to SQLite via ThingSpeak for a month led [Michelle] to the conclusion: her hamsters didn’t run 4 marathon’s worth of steps in a night. In fact, they never really got much over 2 marathons.

Does [Michelle] have lazy hamsters, or did she just add to our body of scientific knowledge about rodents? We don’t know. But we couldn’t help but admire her methods and her open source data logging code would probably be useful for some non-hamster activities.

If you are super competitive, you could use [Michelle’s] data to handicap yourself and challenge your pets to a race. But it would probably be cooler to build them their own Starship Trooper-style walkers. Either way, you can check out [Michelle’s] little marathon runners in the video below.

https://vine.co/v/enpFetTQD75

Raspberry Pi Halloween Voice Changer

[Dave Shevett] has spent a lot of time (more than a year) expanding his Technomancer costume along with the companion (Arduino-driven) magic staff. He found, however, he needed a way to get his voice out from behind the mask. If you are going to go through that much trouble, you might as well augment your voice at the same time, right?

[Dave’s] voice changer uses a Raspberry Pi which isn’t all that complicated. The Pi uses Linux, and Unix–the predecessor to Linux–has a long history of having little tools you can string together to do big jobs. So once you have a Pi and a sound card, the rest is just some Linux command line wizardry.

There’s a battery and a small portable amplifier to get that booming voice. Since you don’t want to lug a keyboard and monitor around to handle every reboot, [Dave] set the Pi up to run his voice-changing scripts on each reboot.

This is a great example of why old Unix programmers make small tools and use the shell to join them together. [Dave’s] voice changer is pretty much just some off the shelf parts and a  script so simple it hardly qualifies as programming in any real sense. In fact, it is essentially one line of “code”:

play "|rec --buffer 2048 -d pitch -300 echos 0.8 0.88 100 0.6 150 .5 band 1.2k 1.5k"

Sure, there is some street cred in embedded development to doing everything the hard way, but with the advent of cheap embedded Linux systems, why not take advantage of the tools where you can?

If you want a more roll-your-own approach, you can pick up your Arduino or break out an audio mixer (but good luck getting it in your costume).

Code Craft: Using Eclipse For Arduino Development

As we work on projects we’re frequently upgrading our tools. That basic soldering iron gives way to one with temperature control. The introductory 3D printer yields to one faster and more capable. One reason for this is we don’t really understand the restrictions of the introductory level tools. Sometimes we realize this directly when the tool fails in a task. Other times we see another hacker using a better tool and realize we must have one!.

The same occurs with software tools. The Arduino IDE is a nice tool for starting out. It is easy to use which is great if you have never previously written software. The libraries and the way it ties nicely into the hardware ecosystem is a boon.

When you start on larger projects, say you upgrade to a Due or Teensy for more code or memory space, the Arduino IDE can hamper your productivity. Moving beyond these limitations requires a new, better tool.

Where do we find a better tool? To begin, recognize, as [Elliot] points out that There is no Arduino “Language”, we’re actually programming in C or C++. We chose which language through the extension on the file, ‘c’ for C and ‘cpp’ for C++. An Arduino support library may be written in C or C++ depending on the developer’s preference. It’s all mix ‘n match.

Potentially any environment that supports C/C++ can replace the Arduino IDE. Unfortunately, this is not easy to do, at least for inexperienced developers, because it means setting up the language tool chain and tools for uploading to the board. A developer with that much experience might eschew an integrated development environment altogether, going directly to using makefiles as [Joshua] describes in Arduino Development; There’s a Makefile for That.

The reality is the Arduino IDE is not much more than a text editor with the ability to invoke the tools needed to compile and download the code to the Arduino. A professional IDE not only handles those details but provides additional capabilities that make the software development process easier.

Continue reading “Code Craft: Using Eclipse For Arduino Development”

Listen To The Rain, Raspberry Pi Style

There’s an old proverb algebra teachers often recite: You have to use what you know to find out what you don’t know. The same could be said about sensors. For example, analog to digital converters use something computers are good at finding (like time) and use it to determine something they aren’t good at finding (like voltage). So how do you detect rainfall? If you are [lowflyerUK], you use the microphone in your web camera and a Raspberry Pi.

The idea was to reduce irrigation usage based on rainfall, so an exact measurement isn’t necessary. The Python code that analyzes the audio input is calibrated with three configuration parameters and attempts to remove wind noise. Even so, it needs to be in a room that gets a lot of noise from rainfall and ambient noise can throw the reading off.

The weather service is never going to adopt this system. Still, it is a great example of taking something you know and using it to get something you don’t know. If you want a more complete weather station, we have a few options for you.

Raspberry Pi Sense HAT Super Weather Dashboard

[InitialState] posted a great multipart tutorial about building what he calls a “Hyper-local Weather Dashboard.” In plain language, he created a Raspberry Pi-based web page that fuses weather data from Wunderground along with locally sensed weather data.

The tutorial has thee parts. The first part covers reading data from Wunderground using their developer’s API (you’ll need an API key; a free one is good for 500 queries a day). The second part covers using the Pi Sense HAT to measure local temperature, humidity, and pressure. The final part ties it all together using producing the hyper-local weather dashboard (whatever that really means).

We talked about the Sensor HAT earlier (and there’s more info in the video, below). Seems like those lights could do something, although that wouldn’t do you any good over a web interface. This is a good-looking project (and tutorial) and easy enough that it would be a good place to start
experimenting with the Raspberry Pi.

Continue reading “Raspberry Pi Sense HAT Super Weather Dashboard”

Raspberry Pi Powers The Desk Of The Future

Recent science fiction movies always show people sitting at stylish semi-transparent desks that have all kinds of strange and wonderful gadgets in them. Our desks look like something your grandfather might have sat at. [Frederick Vandenbosch] must have seen those same movies so as part of contest he decided to build the desk of the future.

The desk is as much a furniture project as an electronics project, but it does have a Raspberry Pi, a scavenged laptop LCD, embedded touch sensors and LEDs, a wireless charger, and a built-in sound system. In addition, it uses a Gertbot and some stepper motors that it uses to raise and lower the screen in and out of the desk (watch the video below to see how that looks).

[Fredrick] used Python to get the major functions of the desk programmed. We couldn’t help but think of all the things you could do with an easily programmable desk surface: show stock quotes (or sports scores), notify about e-mail, or other things. Although it doesn’t look like it would be simple for a simple user to add those things, if you were a handy programmer, they look like they’d be in reach.

We’ve seen some desks before, but nothing quite like this. We couldn’t help but wonder if you could add some Minority Report-style goodness to [Frederick’s] already impressive desk.

Continue reading “Raspberry Pi Powers The Desk Of The Future”

An Intel Atom CPU In The Raspi Form Factor

For years now, people have been trying to stuff an Intel processor on a credit card sized board. An x86 board that can fit in your pocket is an intriguing device – after all, that’s what Gumstix, the forerunner of the Raspberry Pi, were. Efforts to put x86 on a dev board have included the Minnowboard, the Intel Galileo and Edison, and even the Intel Compute Stick. These have not seen the uptake you would expect from a small x86-powered board, but that tide may soon turn. The UP board is exactly what you would expect from a Raspberry Pi-inspired board with a real Intel processor.

The feature set for the UP board is impressive for a credit card sized board; it’s powered by a quad-core Intel Atom x5-Z8300 CPU running at 1.84 GHz. The board comes equipped with 1GB of RAM, 16GB of eMMC Flash, Gigabit Ethernet, five USB 2.0 ports (one on a pin header) and one USB 3.0 port. Up also includes a real-time clock, HDMI, the same 40-pin GPIO pin connector found in the Raspberry Pi Model B Plus, and DSI and CSI connectors for the Raspberry Pi camera and touch screen.

To be fair to all the previous attempts at making a board built around an x86 chip that borrows heavily from the Raspberry Pi, there haven’t been many chips out there that have been suitable for credit card-sized applications. Only in the last year or so has Intel released chips suitable for an x86 single board computer, and the growing market of Windows 10 tablets bears this out. While it remains to be seen if the UP board will be a success, more than a few people will pick one of these up for a miniature Skype box.