Electronics& Front Page13 May 2008 06:16 pm

For dorkbotpdx last night, I made this little toy:

WiiMatrix

It’s an 8×8 red+green LED Matrix, driven by three shift registers driven by a Bare Bones Board Freeduino by Modern Device Company.

Before the meeting I just had it flashing fun patterns based on odd bit-math equations. During the meeting, I was urged to add some code to make it controllable by the Wii Nunchuk. So, I wrote a simple program that takes the X and Y of accelerometer and plots it on the matrix.

I drove the LED Matrix with three shift registers: One 74HC595 8-bit register gave power to the rows of the display, and one Maxim-IC MAX6969 sank current for the columns to the display. To turn on row 1, column one, you shift “B10000000” into the row register, and “B10000000” into the column register:

  1 0 0 0 0 0 0 0  
1 x o o o o o o o
0 o o o o o o o o
0 o o o o o o o o 
0 o o o o o o o o 
0 o o o o o o o o 
0 o o o o o o o o 
0 o o o o o o o o 
0 o o o o o o o o 

Altogether, it was about 30 lines of code to drive the matrix with some fun patterns.

Electronics06 May 2008 10:21 pm

Analog pins 0-5 on the Arduino can be accessed as digital IO pins. They’re numbered 14-19.

Electronics& Front Page23 Apr 2008 08:57 pm

I just received this set of prototyping boards from ucHobby and their sponsor Wright Hobbies!! Hooray!

Prototyping boards

I’m psyched. I have some projects I want to do that these boards will be perfect for.

Electronics& Front Page21 Mar 2008 03:19 pm

In order to encourage us to play with electronics more, JWA and I have begun doing monthly challenges. For our inaugural challenge, we decided upon an LED Birthday Candle. This is my entry to that challenge.

LED Birthday Candle

You blow the center pole towards one side, and the LED shuts off. To turn it back on again, blow it the other direction. It’s a circuit known as a bistable multivibrator, or “flip-flop”.

I do like that it’s so simple and cheap, though.

My parts list is simply:

2 – 10k ohm resistors
1 – 1k ohm resistor
1 – 220 ohm resistor
2 – 2n3904 NPN Transistors
1 – LED
3 – AAA batteries (this thing’ll last forever!)

Not including the batteries, this thing costs less than 15 cents in parts. If I could work out the “blow” mechanism a little better, I think this would be a marketable product.

Okay, now for some photos:

On the breadboard:
LED Birthday Candle

Before being shoved in the pill bottle:
LED Birthday Candle

I had originally wanted to be able to shove this thing into a fat straw, like you get with a bubble tea, so I made it as small as possible, and soldered the pieces together straight rather than using protoboard:
LED Birthday Candle

Next: Brighter LEDs!

Front Page20 Mar 2008 08:26 am

This is a Blog entry using Jott. This is using the Jott service, a voice to text service that so far is free, hurray. listen

Powered by Jott

Electronics03 Mar 2008 11:31 pm

My Wiichuck adaptor arrived a couple of days ago, and I just hooked it up.  As my first project, I’ve written this, which uses the Wii nunchuck as a musical instrument.

Source code: Freqin’ Wii

Hook a speaker to the output pin (defined below, 13 by default), and hook the Wii adapter up to analog pins 2-5, preferably using the Wiichuck adapter. Tilt the wii from side to side to adjust the tone, and tilt forward and back to adjust  the octave.  Push the joystick forward and back to adjust the length of the note.  Push the Z button to play the note.

I’m trying to think of what else I could do with this.  There’s just not a lot of data out there that can use three dimensions of acceleration data and two dimensions of joystick data.

Electronics& Front Page& Photography02 Mar 2008 11:52 pm

Awed By The Beauty Of The Light The electronic man holds his joy aloft.  He loves it, because he was built to love it.  It shines with the energy that courses through his body.  He wants to share his Light with the world, but fears that if he lets it go, he’ll never know it’s glow again. 

Electronics& Front Page01 Jan 2008 02:37 pm

I’ve recently become enraptured with a little microcontroller development board called the Arduino (pronounced “Arr-dwee-no”).

Arduino Diecimila

This little thing is a great way to get started with electronics. You hook some electronic component to it, write a little bit of C, upload it to the board, and “tada!”, you’ve invented some new Gizmo.

Front Page& Recipes13 Dec 2007 09:43 pm

1 box double cheese hamburger helper
2 cups nonfat milk
1 1/2 cups hot water
6.5 ounces whole wheat rotini
1 pound frozen chopped spinach
1/2 pound ground turkey

Prepare as per box instructions. Yum!

Recipes19 Sep 2007 04:15 pm
  • 1 cup of rice
  • 1 small can of mushrooms
  • 1 carrot (sliced)
  • 1/2 bell pepper (diced)
  • 1 yellow or red potato (sliced into 1” pieces)
  • 1/2 onion (diced)
  • 1 large tomato (quartered)
  • 1 can vegetable or chicken broth
  • 2 cans canned chicken (drained)
  • 1 Tbsp paprika
  • 2 Tbsp dried dill
  • Salt and pepper to taste
  • vegetable oil

    Saute the onion until soft, then add the carrots, red pepper, and mushrooms. Saute for a few more minutes. Add tomato chunks. Let it simmer for a few minutes. Add the vegetable broth, canned chicken, potato slices, rice, and spices. Cover and let simmer on low until the rice is cooked (20-30 minutes).

Front Page& System Admin23 Apr 2007 11:23 am

Advanced Message Queuing Protocol
..An open protocol for messaging systems.

Some implementations of AMQP:

  • OpenAMQ

    And some more information about it:

  • http://www.amqp.org/
Front Page& Messaging& System Management23 Apr 2007 11:08 am

0142 – Workgroups
This is for sending messages to roles. Several entities may join a Workgroup queue, and other entities may request chats with the workgroup (which then routes to the different entities when the chat is accepted by one of them). So, for alerting, we can send to the “alerting” workgroup, which will route to an appropriate AlertAgentBot.

0095 – Stream Initiation
For setting up a binary stream between two entities. This is cool because it could let us push all system checks to the nodes over the JabberNet. So we have a core stub ManagementAgent on each managed node, and it just logs on, and bootstraps itself.

0137 – Publishing SI Requests
For publishing available binary streams (using pubsub). So now our binary distribution nodes can publish available code, and our ManagementAgent stub can see what’s available for pulling.

0135 – File Sharing
Provides a way for entities to publish files to other entities. This looks kinda like what 0137 does, except farther evolved.

Combined, a bootstrap would be something like:

  • Agent starts
  • Agent checks local cache for code, loading what’s necessary.
  • Agent receives pubsub list of available code
  • Agent downloads (and caches) what it needs.

    0136 – Message Archiving
    For using the Jabber server as a persistent message store. Provides a method of adding, updating , and removing items from the store. This could be used as an audit log for the Agents.

Front Page& System Admin& System Management09 Apr 2007 03:51 pm

Solaris patching is, frankly, a pain.

Patch Check Advanced makes it less painful—even pleasant.

It’ll automatically download the patch list from Sun, correlate it against what you have on your system, and present you with a list of what needs to happen. You can tell it to install all recommended patches, all security patches, or all the patches that don’t require a reboot (saving those for special occasions).

Extremely cool tool.

Front Page& Photography09 Apr 2007 03:47 pm

Two new photos, both taken from my living room window.

Fremont Saint Helens


Not photoshopped. Just a fortunate reflection:

Sky Trees

Front Page08 Jan 2007 09:19 pm

At dusk today, the fog rolled in.

Foggy Trees

Front Page& System Admin09 Oct 2006 03:51 pm

X4100s have a pretty cool integrated lights-out management card, but it doesn’t have an easily integrate with Conserver.

To fix, I created an expect script named “ilom-connect” like this:

#!/usr/bin/expect -f
expect { 
"(yes/no)?"    {exp_send "yesr"; exp_continue; }
"password: " {exp_send "r"; }
}
expect "\-> "
send "cd /SP/consoler"
send "startr"
expect "(y/n)?"
exp_send "yr"
Then, in conserver:
console x4100 {
include sun-ilom;
exec ssh -l admin x4100-m;
type exec;
initcmd "/usr/local/sbin/ilom-connect";
}

Front Page& Recipes09 Oct 2006 01:24 pm

Slashfood is a delicious food blog, full of delicious looking food porn.

Yum.

Recipes27 Sep 2006 12:41 pm

..This is a veggie wrap from a place I used to eat at in Florida.

1 eggplant, thinly sliced
1 yellow squash, thinly sliced
1 green zucchini, thinly sliced
1 red pepper
1 green pepper
5 ounces goat cheese
1 ounce sour cream
2 large spinach tortillas

Lightly grill eggplant, squash and zucchini. Blacken peppers on grill, place in paper bag for a few minutes, then remove the blackened skin, seeds and slice. On a sheet of plastic wrap layer eggplant, zucchini, squash and peppers. Mix goat cheese and sour cream and spread a thin layer on top of vegetables. Roll in a spinach tortilla. Refrigerate for up to two hours. To serve, slice into 1/4 inch pieces.

Yield: Serves 8

Recipes27 Sep 2006 12:39 pm

This is an approximation of the “Zuppa Toscana” soup they serve at Olive Garden. It’s sooo goood, and really easy to make.

1 lb. spicy Italian Sausage – crumbled
1/2 lb. smoked bacon – chopped
1 qt water
(2) 14.5 oz cans chicken broth
2 large russet potatoes – cubed
1 medium onion – sliced
2 garlic cloves – crushed
2 cups chopped kale or swiss chard
1 cup heavy whipping cream
salt and pepper to taste

In a skillet over medium-high heat, brown sausage, breaking it into small pieces as you fry it.  Drain and set it aside.

Do the same with the bacon.

Place water, broth, potatoes, garlic and onion in a pot. Simmer them over medium heat until the potatoes are tender.

Add the sausage and bacon to the pot. Simmer for 10 minutes.

Add kale and cream to the pot.  Season it with salt and pepper.

Serve.

Front Page& System Admin26 Sep 2006 05:41 pm

I spent the weekend loading Nexenta on my two home PCs.

Nexenta is basically Ubuntu on an OpenSolaris kernel.  This gives you all the awesomenes of Ubuntu (apt-get, gnome, kde, GNU tools), with all the awesomeness of OpenSolaris (zones, ZFS, DTrace).

Some cool things:


  • The opensolaris packages are available via apt-get.  I wanted to set up some zones, so I did an “apt-get install sunwzoner sunwzoneu”.

  • “zoneadm -z zone1 install” fires off debootstrap and creates a Nexenta Zone.

  • The install is super-easy.  Just boot off the CD and answer a few questions.


So, now I have two Nexenta boxen, with about 1TB of storage online.  Which brings me to why I did this in the first place:  ZFS.

I really hate Linux Software RAID.  I hate it so much that I don’t use it.  This meant that my home storage was more or less unprotected, which sucks.  I don’t have anything irreplacable on these servers, but still, it’s good form to RAID.

Creating a mirror is as easy as:

  1. zpool create -m /storage zstorage mirror c1d0p0 c2d0p0

    Adding another mirrorset to this pool is as easy as:

  2. zpool add zstorage mirror c3d0p0 c4d0p0

    ..Which gives me 560GB of RAID10 storage with two commands.   Now I have room for a complete nightly backup of my laptop, including incrementals (thanks, ZFS snapshots!), plus a backup of my “every photo I’ve ever taken” directory.

Next Page »