Arduino Project: LED Countdown Clock

January 31st, 2010 Ryan No comments

As mentioned in my previous hobby post I’ve been working on learning the Arduino micro controller.  Up until now I’ve been doing small projects that would work with a single component or two working on their own.

My first attempt at bringing a few different sensors and controls together is an LED Count Down Clock.  What does it do?  It is a single 7 segment LED that when a button is pushed counts down to 0 and beeps.  Pretty straight forward but a fun little learning project.  Here’s a quick video that gives you an idea of what it does:

Pretty simple, here’s what’s involved:

You end up with something that looks like this:

The wiring is a bit interesting – figuring out how all 10 of the connections coming off of the LED map is an interesting exercise but with the datasheet isn’t terrible to figure out.  Hooking up the buzzer and the button is two wires a piece and straight forward (one to power, one to a controller port on the Arduino).

The basic program is pretty straight forward.  I wrote two libraries – one to control the rendering of numbers on the LED and one to drive the sound options.  Here is what the main program looks like:

// Main Program
int val = 0;
int oldVal = 0;
int state = 0;

void setup()   {
// initialize the digital pin as an output:
pinMode(8, OUTPUT);
pinMode(1, OUTPUT);
pinMode(2, OUTPUT);
pinMode(3, OUTPUT);
pinMode(4, OUTPUT);
pinMode(5, OUTPUT);
pinMode(6, OUTPUT);
pinMode(7, OUTPUT);
pinMode(button, INPUT);
pinMode(speaker, OUTPUT);
}

// the loop() method runs over and over again,
// as long as the Arduino has power

void loop()
{
val = digitalRead(button);
renderClear;
if ((val == HIGH) && (oldVal == LOW)){
state = 1 – state;
delay(10);
}

oldVal = val;

if (state == 1) {
renderCountdown();
buzz(speaker, 2500, 1000);
state = 0;
}
}

So there’s version 1.0 of my LED countdown clock.  I’m already starting to plan for my second version of the project which will have the following feature set:

  • Two 7 segment LEDs powered by a multiplexer
  • Two buttons – one to start the countdown and one to allow you to select how much time you want on the countdown (I’m thinking of having it selectable by 5s or 10s)

The Winter of Living Hobbyist

January 22nd, 2010 Ryan No comments

I have an odd relationship with winter.  On the one hand it is a season I truly love; to me there is no moment on this earth more peaceful then when it snows and the temperature is just around the freezing mark.  There is this beautiful silence and it has a restorative power to it.  On the other hand it is dark, cold and a season where motivation to get off your arse can be hard to come by.

To help cope with the drawbacks of the season I resolved this winter to focus on a few hobbies to keep me from wasting away hours.  The three primary hobbies I am focusing on are: micro controller programming, geocaching and model railroading.

Micro controller programming

Micro controllers are super small and low powered computers that drive many of the things you have in your homes – DVD players, clocks, televisions, and on and on.  My dear consumer whore friend Jim started working with the Arduino micro controller platform a few months ago and he was doing some seriously cool stuff.  I’ve never worked with networked devices before (that is devices that can talk to one and other by various means) and my head is full of things I want to try and make.  This hobby is a learning hobby for me – it is something completely new (although pulls heavily on my programming experience) that I’m super excited to be learning about.

My sort of end goal with micro controllers is to make a GPS device that will connect to my cell phone while I am ATVing that will report back my position and possibly allow me to send messages back through twitter, etc!

Geocaching

Geocaching is an old hat hobby for me – I’ve been geocaching since 2003 but because of my knee I haven’t been able to dedicate as much time as I’d like.  Now that my knee is kinda-sorta-thinking-about-it better-ish post surgery I’m excited to be getting back in to the swing of things and clocking some finds.  My goal here is to get out whenever the weather is nice enough (like this past and coming weekends!) to get some exercise and work the knee a bit.  I think everyone needs to find a good excuse to get out of the house in the winter and geocaching is that excuse for me!

Model Railroading

I’ve loved trains all my life.  Between my dad spending his life working on electric powered trains and growing up about a kilometer as the crow flies from the CN line that cuts through North-East Toronto and listening to the trains as I fell asleep at night.   I feel some deep and powerful connection to trains whenever I see one go by I feel the need to stop and appreciate the awesomeness and masterful human innovation of these monster machines.

So as a way channel to play out this love affair I’ve always had an interest in model trains.  About 7 or 8 years ago before I got married my dad and I built an initial lay out but between getting married and moving out we never got to complete it.  I’ve now picked up where we left off and together with my Dad we are working on building the layout we’ve always talked about.

I’ll have pictures of the layout to share soon and I’ll be posting updates here on the blog.

So that’s my winter coping strategy!  I’ll be posting updates as I work through these.

Happy New Year All

December 31st, 2009 Ryan No comments

Happy New Years everyone – I hope those going out tonight have a safe and enjoyable celebration!

Let’s hope 2010 is a good one!

Categories: Uncategorized Tags:

Merry Christmas All!

December 25th, 2009 Ryan No comments

Merry Christmas to all!

Typically busy Christmas Day here in O’Sullivan land. I’ll have full loot links, etc tomorrow ;)

Happy 2nd Birthday Paige

November 29th, 2009 Ryan 1 comment

Yesterday we celebrated Paige’s 2nd birthday! It is staggering to look back and realize that Paige has been a part of our lives now for two years. What is more disorienting is it is hard to remember a time when Paige wasn’t a part of my life; she’s become such a core part of our day to day lives I couldn’t imagine a life without her.

The past year has been one full of firsts; there were probably less firsts pound for pound when compared to the first year of her life but the firsts of the second year of a child’s life feel much more definitive: Walking, talking, feats of surprising intelligence and seeming day to day more like a little person and not our little baby.

The most profound change in life with Paige this year has been a shift in the nature of our relationship.  As a baby Paige viewed Tammy and I as providers (obviously) but as she’s gotten older emotional attachment and needs have grown.  There is nothing in life more rewarding then coming home from a long day at the office and having Paige waiting at the top of the stairs yelling at the top of her lungs “DADDY DADDY DADDY… DADDYYYYYYYYYYYY I LOVE YOU DADDY”.

I cannot wait to see what this year will bring…

Categories: Personal Tags: , ,

Everyone Should See This…

October 25th, 2009 Ryan No comments

I’ve watched this over and over this weekend – Carl Sagan’s Cosmos is one of those shows I pull out every few years to ensure my world view is aligned with the wonder of science and the beauty of the known and potential of the unknown in our world.  I don’t know who put this video together but it is a wonderful thing – if you look through the comments on youTube you’ll see young and old alike who’ve never heard of Carl Sagan, or Richard Feynman clicking through to their interviews and documentaries on youTube.

This is the real power of the information era we find ourselves in – for the first time in world history anyone can go to the library or if they are lucky enough in the comfort of their own home and load up the internet and get free access to lectures and interviews from some of the greatest minds of our time.

The potential to achieve our best as a species is profound and it’s little things like this video that open that door for us – Thanks to the folks at Symphony of Science for putting this together.

If you’ve never seen Cosmos before check it out on youTube:

Categories: Personal Tags: , , ,

A Year Later – Let’s Get This Thing in Order

October 25th, 2009 Ryan No comments

ryanosullivan.ca has been my primary personal blog now for a year (Oct 25th, 2008 I installed word press on this domain) and it’s been really slow to come in to its own.

For a while I was using a theme that I really loved but it was out of date and wouldn’t work with many of wordpress’s bells and whistles. This limited my ability to add “cool shit” to the site and that hasn’t helped with my lack of inspiration to do much with this blog.

But enough of that – I’ve spent some time today trying to kick this blog back in to gear and if work doesn’t kill me first I’ll be making an effort to post here more often (and on adventuresoftaas.com as well!) – (Editor’s note: look, a blogger saying he’ll post more, how cute).

So welcome to ryanosullivan.ca year 2… I promise this year will be even more interesting then last, and that ain’t saying much…

So that was summer?

September 26th, 2009 Ryan No comments

I know what you are thinking – after two months of neglecting this blog I have the nerve to open with a bitch fest about the weather?  Stick with me…

The summer has come and gone and in many ways it feels like it was in reality a series of false starts.  Yes there is the obvious weather let down with this summer (by and large if you like warm weather and you live in the north east region of North America you are a little disappointed with what we got this year) but the whole thing just felt “off” outside of that.

For me since time immemorial summer has looked like this – Monday to Friday go to work.  Friday evening get in the car drive up north.  Saturday to Sunday family heavy days often fully planned with shit.to.do. up north.  Sunday afternoon get in the car drive home.  Do laundry.  Bat clean up on the Tivo.  Go to bed.  This year I just wasn’t feelin’ it.  I love going up north and I love spending time with my parents and grandparents but this year it just felt like I was going through the motions.

Mid summer I posted about the weekend we spent in the city and it is probably my favorite memory of this summer.  That was one of the few times I can recall in recent years where I’ve really controlled the agenda for a summer weekend and did something different.  The end result was a great weekend that Tammy, Paige and I really enjoyed together.

So for me, this summer was about hitting some sort of summer-rock-bottom.  I look back and I cannot recall much at all.  Really only my ATV trip (which was another highlight) and that weekend in the city really stick out… the rest is a bit of a haze.  There are many reasons for it I imagine; I’ve been insanely busy at work and I’ve been working hard to focus on Paige and Tammy outside of office hours – I haven’t had much left in the tank after that.

All I know is next year it is time to mix it up a bit.  There is a possibility we’ll be having a baby late spring/early summer (we are planning for it) so that might mix it up on its own but it is time for Tammy and I to start planning our own activities and not spending so much time up north.

Categories: Personal Tags: , ,

In Lieu of Content – A Cute Baby

September 12th, 2009 Ryan No comments

I’ve had serious motivation/time shortage/etc issues lately which has led to neglect of both blogs… so… to make up for that here is Paige being cute…

21 months – Thank you from Tammy O’Sullivan on Vimeo.

Real content to return soon(TM)

Categories: Personal Tags: , ,

My Sumosac Review

July 31st, 2009 Ryan No comments

Its been a while since I’ve made a sac joke err wrote about my Sumosac.  In my original post I promised a review if I was able to remove myself from my sac.  Unfortunately due to work and having responsibilities I have in actual fact had to leave the loving embrace of my Sac.  I now at this unfortunate time find myself attending to some of that responsibility stuff so I figure, eh, now is probably my only chance to write this review – let’s get’er done.

So here is my review:

19 months – Chillin’ from Tammy O’Sullivan on Vimeo.

No seriously, that’s it.  Ok, ok – I’ll give some details.

Let me just say from the outset – spending $250 on this thing was a GOOD decision.  For something that can easily be billed as just a glorified Beanbag Chair it is honestly the most versatile piece of furniture I’ve ever owned.  I can think of at least 6 comfortable positions that I regularly use with the Sumosac and they all are for different things: Sitting upright while playing an involved sports game, Reclining back playing a more casual game or reading, sitting sideways watching some TV and on and on.

The versatility might actually be the first flaw one could find with this thing.  It is so flexible by nature of its design that it is actually possible to find uncomfortable positions, and not just a little annoying: god-I-really-should-move uncomfortable positions – no – more like the: spine destroying god-if-I-dont-move-now-Im-fucked kind of uncomfortable.

I have three basic uses for my Sac (I’ll tell you when you are older… err sorry I cannot control myself) and it accomplishes them all very well.  My primary use of the Sac is for playing console games.  This thing is in my office and it is there as a piece of home entertainment center furniture.  I’ve got to say I’ve had recliners, and other lazy boy style “man chairs” and this thing just rocks the competition for video gaming.  You can be sitting almost bolt upright, slouching just a little or going full on lazing on your back and side and this thing will support you adequately.  As a piece of gaming furniture I just can’t see how this thing could be beat, especially given the price tag.

The one other thing that some people might find troublesome is just how bloody huge this thing is.  I have the Sumosac Couple, the four foot model.  And let me say – this thing takes up A LOT of space.  My buddy Jim (in a total Bogart move) bought the biggest model (mostly because he is the biggest consumer whore ever to grace this planet) and I don’t quite know how he has any house left after the thing expanded out of the box.

One neat thing about the size is that it has also become a children’s toy.  Paige absolutely loves climbing up the Sumosac and she jumps, slides, and generally finds some way to give her mother a heart attack whenever she gets close to it.

So is it worth the price tag, and floor space commitment?  A resounding yes for me!  I’ve never been this happy with a furniture purchase in my life and I would gladly recommend this to anyone and everyone who is looking for something to lounge around on in their entertainment or family rooms.