2015-01-10

For a while now, I've been blabbering about diversifying the variety of life in the pond. The way I see it, having a variety of fish will keep any one species from overrunning the pond. Similarly, by making sure there are plenty of small fish and not just a few very large fish, when the otters come by for a visit they won't eat all of the fish.

After looking around for a nearby hatchery, I found http://freshwaterfishco.com/. They are only open to the public for an incredibly limited time, and today happened to be one of those times.

Time to hit the road!

Pitstop

Halfway to the hatchery, my stomach started rumbling and I needed some food.

A burger no-toast, no-onion, with chilis, and some fries crispy later, I was back on the road.

A Simple Sign

Oops, I drive past this on my first go. Considering that I wrote down the directions and then forgot to take them with me, this isn't surprising.

Dear Awesome Fish Hatchery,
Get a sandwich board. :)

Big Tanks

There are some massive tanks and ponds at the hatchery, but since the ponds are in the ground and there are no elevated places to stand, I didn't try to take a pic of the ponds.

Smaller Tanks

On "open to the public" days, the hatchery opens up the barn that contains all of the smaller tanks where cutesy wootsy little fish are raised.

Not quite a cat

One day, perhaps, I will get a white sturgeon or two.....

Perhaps.

Anyway, after this pic was taken, I purchased some catfish and headed home. Instead of taking the shortest route, I instead opted to take a more circuitous path through the South-East of Elk Grove, CA and skirt Sacramento altogether.

Meow Meow

This is what I purchased: 20 channel catfish that are of a size that won't be easy food for the existing fish in the pond, and are smaller than a good meal for the no-good otters.

More Meow

As I was releasing the catfish into the pond, someone decided to see what I was up to. Hi Buddy!

Meow meow meow.

Comments
Name:
not required
Email:
not required (will not be displayed)
Website:
not required (will link your name to your site)
Comment:
required
Please do not post HTML code or bbcode unless you want it to show up as code in your post. (or if you are a blog spammer, in which case, you probably aren't reading this anyway).
Prove you are human by solving a math problem! I'm sorry, but due to an increase of blog spam, I've had to implement a CAPTCHA.
Problem:
3 plus 6
Answer:
required
2014-12-25

Not too long about I built a tubular music thingy, and while it is nice and fun to play, I really wanted to automate the playing of some tunes as well as giving myself the ability to play certain tunes at certain times.

To be fair, this was the plan all along and I'm calling this thing "Spiel", which I guess is short for glockenspiel.

Before the tubular music thingy was built, I came up with a fairly plain-text music notation format that I call SMN: the Spiel Music Notation format. In a nutshell, SMN files start with "tNUMBER" where NUMBER is the number of beats per second, and then there will be a series of notes: G a b c d e f g, and rests: r. Both notes are rests will be considered whole notes unless followed by a number.

For example, Sudo Modprobe in SMN would be:

t30   
a4 G8 a4 G8 a8   
b8 c2 e4 d2 r8  
e4 d8 c8 d8 c8  
d8 c8 b8 a4 G8  
a4 G8 a8 b8  
c2-8 b8 G1-2  

On To the Build

For the automation, I used the following:

Stand Offs

What are these things called? I don't know.

What I do know, is that once the spiky bits are bent down, these things make amazing stand offs for just about any computer build.

Mount the computer and relay board

After the stand offs were put on the Beaglebone Black and the 8 channel relay, the stand offs were hot glued to the frame of the Tubular Music Thingy.

Place the solenoids

More hot glue was used to place the solenoid bell hammers.

When the solenoids are energized, they produce heat, and if they stay energized long enough, they get hot enough to melt the glue.

This led me to write a script called 'heat' that will heat up a solenoid so that I can realign the hammer for a better sound.

Wire it up!

The Beaglebone was wired to the relay (I later changed the beaglebone to relay wiring).

The relay is wired to the solenoids, and the 12V power adapter was spliced into the relay and common ground of the solenoids.

Plug it in and run some code

Here is the finished product, ready to be played, or automated over the network.

What about some code?

The code for controlling Spiel is available at https://gitorious.org/spiel/spiel The documentation is non-existent, but there are a few .smn files in the SMN directory. If you have any questions about the code, send me an email and I'll help as I can.

My last Linux Outlaws related script

The final episode of the Linux Outlaws is nearly upon us, and I needed a script that will check if the last episode has been released, and if so, trigger the Spiel device to play the Sudo Modprobe melody.

Basically, this is a Final Episode Alarm

#!/usr/bin/env python2
import urllibtime
from xml.dom.minidom import parseString
url "http://feeds.feedburner.com/linuxoutlaws-ogg?format=xml"

#we need to loop for a while
looping True

while looping:
  #read the URL
  urllib.urlopen(url)
  xml f.read()
  #parse the XML
  obj parseString(xml)
  #get the first item
  item obj.getElementsByTagName("item")[0]
  #get the title
  title item.getElementsByTagName("title")[0]
  ttext title.firstChild.nodeValue.encode('utf8')
  #does the title contain 370?
  if "370" in ttext:
    open('play_smn','w')
    f.write("sudo_modprobe.smn")
    f.close()
    looping False

  print time.strftime("%Y-%m-%d %H:%M:%S"time.localtime())
  #sleep for 5 minutes
  time.sleep(300)

So now, within 5 minutes of the final episode being released, my Spiel device will play:

Comments
Name:
not required
Email:
not required (will not be displayed)
Website:
not required (will link your name to your site)
Comment:
required
Please do not post HTML code or bbcode unless you want it to show up as code in your post. (or if you are a blog spammer, in which case, you probably aren't reading this anyway).
Prove you are human by solving a math problem! I'm sorry, but due to an increase of blog spam, I've had to implement a CAPTCHA.
Problem:
3 minus 0
Answer:
required
2014-12-17

After experiencing some problems with Bonechop (my Beaglebone Black), I decided it was time to do a clean install of Debian on the internal eMMC storage.

Following the directions at http://elinux.org/Beagleboard:BeagleBoneBlack_Debian, I installed the console version of Debian to the eMMC. Once the install was complete, I rebooted the board (and I had a monitor connected to the HDMI so that I could see what was going on).

During the boot process, the screen displayed a cutsy wootsy little penguin in the corner of a black screen. About a minute, the screen changed to a sign in console, and I logged in.

Once in the system, I quickly installed wicd (my preferred network connection manager), and the drivers for my wireless USB card. When wicd was configured to automatically connect to my wireless network, the beaglebone was rebooted again.

This time I still got the little penguin on the black screen, but the the boot took quite a bit longer, and I still had no idea what was going on in the background. A quick question asked in the Beagleboard Community on Google Plus, and I was getting some insight as to what I needed to do in order to get output on my screen.

In a nutshell, in my /boot/uEnv.txt file, the line:
cmdline=quiet init=/lib/systemd/systemd
was changed to
cmdline=init=/lib/systemd/systemd

and I needed to add an additional line:
console=tty0

Rebooting the Beaglebone Black, I was quite pleased to see output text flashing before my eyes.... oh, what is that? The unused eth0 network was trying to get an IP address using DHCP, but since there was no cable connected to eth0, the request was never fulfilled and it tool far too long to timeout.

For this problem, I edited the /etc/network/interface file and commented out:
auto eth0 so that networking wouldn't try to automatically connect with eth0.

Another reboot, and I noticed a significant decrease in boot time. Awesome!

Just to make things a bit more fun, in /etc/wicd/scripts/postconnect, I created a file as follows:

#!/bin/sh
curl --data "text=bonechop is now online" cronos:8255/speak

On cronos, there is a basic web accessible Text-To-Speech wrapper that 'speaks' text that is sent to it.

Now that the Beaglebone is running headless, when I reboot the device I get auditory feedback. sweet sauce!

Comments
Name:
not required
Email:
not required (will not be displayed)
Website:
not required (will link your name to your site)
Comment:
required
Please do not post HTML code or bbcode unless you want it to show up as code in your post. (or if you are a blog spammer, in which case, you probably aren't reading this anyway).
Prove you are human by solving a math problem! I'm sorry, but due to an increase of blog spam, I've had to implement a CAPTCHA.
Problem:
4 minus 2
Answer:
required
  • Tags:
subscribe
 
2015
2014
2013
2012
2011
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008