Netduino is RAD

I'm on a little bit of a hardware kick recently. There's just something about writing code that interacts with the "real world" that seems too cool. Then of course it's hard to go wrong with a Fallout reference too... Wink

Today's post comes to us from Fabien Royer via his Building a Twitter-enabled Geiger counter with a netduino+ post. Yes, a tweeting Geiger counter...

Integrating a Geiger counter with a netduino

I eventually discovered that Electronic Goldmine was selling a bare bone radiation detection kit at a decent price. At a time when everyone else on the web was sold out of Geiger counters, this was perfect!

00-geigermullertube

I just needed to figure out a way to count the pulses coming from the sensor. The solution that I came up with was simple: the kit features an LED which flashes whenever a pulse is detected by the Geiger-Mueller tube. If I could read each pulse and generate an interrupt from it, it would be easy to count them.

...

There's the Twitter element...

Connecting to Twitter

Every so often, the application reports data to Twitter:

06-twitteroutput

To achieve this simply, I used Matt Isenhower’s MicroTweet library, ...

Boxing it all up...

The enclosure

The box I selected for this project is made of a thin, light wood perfect for painting and decorating. The bottom part of the case being so thin precludes using standoffs and screws to secure the electronics. The approach I took was to use sticky Velcro strips instead which worked really well: all the parts stay firmly in their place, yet they’re easy to remove from the case if needed:

02-velcro

03-components

The final touch to the case was the Fallout 3 theme, courtesy of the artwork shared by Bethesda for Fallout New Vegas. If you’re a gamer, you will likely be familiar with the Fallout universe, where your character’s survival depends on a wearable computer, the PIP Boy 3000, which features a Geiger counter. Being a huge Fallout fan, I felt compelled to pay homage to the game with this project ...

Let's check out a bit of the PIP Boy 3000 code, which is hosted as a sample in the netduino Helpers project;

public static void Main() {

//Debug.EnableGCMessages(true);

InitializeLCDScreen();
InitializeResources();

HelloWasteland();

var geigerCounter = new GeigerCounter(Pins.GPIO_PIN_D7, Stats);
geigerCounter.Start();

while (true) {
Thread.Sleep(1000);

Trace.Print("Rnd=" + geigerCounter.GetRandomNumber().ToString());

if(_updateLCD){
_updateLCD = false;
WriteLCD(LcdCommandClearScreen + _cpm10Seconds);
}

if(_updateTwitter) {
_updateTwitter = false;

if (_cpmPreviousAverage != _cpmAverage) {
_cpmPreviousAverage = _cpmAverage;

Text.Clear();
Text.Add(GetUtcTimestamp());
Text.Add(",Lat=" + _latitude);
Text.Add(",Long=" + _longitude);
Text.Add(",Rnd=" + geigerCounter.GetRandomNumber());
Text.Add(",AverageCPM(Hour)=" + _cpmAverage);

TwitterStatusUpdate(Text);
}
}
}
}

You've got to love a method named;

SNAGHTMLb757eac

BTW, if I've not mentioned the netduino Helpers project, I should have. This project probably deserves a post of its own, but in the mean time, if you're doing Netduino dev, then you owe it to yourself to check this project out.

Here's the Helper itself;

image

And snap of the included samples;

image

In the end, this is another very cool example of meshing our real world with our virtual, via .Net and Netduino...

Follow the Discussion

Comments Closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums,
or Contact Us and let us know.