end of the day, and end of a personal era

I’m still dealing with Ellipses’ final exit, but as I was sitting and talking with my wife, she noticed the beautiful sunset just outside our back door. In a metaphorical sense it is a fitting reminder that ends are not all dark, but like a beautiful sunset, herald the end of one day and the start of the next. It seems fitting that this is a fine way to think of Ellipse leaving us. She has left us a rich history of mutual memories, and plenty of photos I’ve taken over the years of her and all the other creatures who’ve lived with us. Those that are still with us are moving around the house as they are wont to do. The girls still come up to ask for rubs and to remind me when it’s time to be fed or to go out for their walks. The boys come up for their rubs and to remind me when they need to be fed.

Ruby just turned 10, and with a lifespan in our house of around 15 years, that means five more years of spending my life with Ruby. When it’s her time to leave I’ll deal with it accordingly. Now’s the time to make sure I gather enough photos and memories of her while she’s still with us, still hale and hearty. Annie, her constant companion, turned 3 this past St. Valentine’s Day. If the Lab lifespan is any indication she’s here for quite a long time. And the boys will turn three in early October. Again, if Ellipses’ life span is any indication, they’ll be around for quite a long time as well.

It has taken me at least a decade to be taught by Ellipse, Lulu, and Lucy how to live with cats. They’ve all taught me well, and the Gingersnaps and I benefit from the training. I look forward to many more good times with the four footers.

blinkin blue leds with ruby

#!/usr/bin/env rubyrequire 'rpi_gpio'def initRPi::GPIO.set_numbering :bcm[17,18,27,22].each do |pin|RPi::GPIO.setup pin, :as => :outputRPi::GPIO.set_low pinendenddef cycle[17,18,27,22,27,18].each do |pin|RPi::GPIO.set_high pinsleep (0.25)RPi::GPIO.set_low pinendendinit(1..9).each{ cycle }RPi::GPIO.reset

This is the Ruby version of my Cylon LED test cycler that I’ve written in various languages on Arch Linux and the Raspberry Pi. This time it was Ruby’s turn to see if I could use it to manipulate the various I/O subsystems on the Pi. Since setting output pins to drive LEDs is the easiest place for me to start, I wrote the code you see above. Before I could make it work I had to install the rpi_gpio gem. To get some idea of how to use it I looked at the GitHub repository for rpi_gpio. The reason for this is to be able to bridge between the Ruby on Rails work I started earlier this week with both input and output I/O. The only other comment I will make is to make sure that the udev rules have been set up to manipulate the I/O as a regular user. Trying to run the code shown above as root will fail, as the installation of rpi_gpio was local to a regular account, not globally installed.

My only comment on rpi_gpio so far is this: I discovered I had to code a set_low immediately after every enabling of a pin as an output, as the pin was enabled high. I consider this a bug, and as it stands it may not be suitable for what I need. If even a microsecond pulse goes out from those pins after being enabled by Ruby then that’s enough to cause a false start on that pin. The Ruby code isn’t something to write home about, just something to do some very basic testing.