Front Page30 Mar 2009 04:06 pm
Front Page27 Mar 2009 04:06 pm
Front Page27 Mar 2009 01:16 pm

Gangster Gadget makes awesome and reasonably priced protoboards to assist in making electronic projects. They’re through-hole plated, high quality boards, and fun to hack on.

They’ve just released a new board they call their Boss Board. It has spots for a PS2 connector, Audio/Video jacks, and even an NES controller (where do you get the connectors??).

The more I get into etching my own PCBs, the more I see the value in pushing out a project quickly with a protoboard. It doesn’t look as nice, but it’s just a LOT easier.

Front Page25 Mar 2009 09:59 pm

In producing our wedding thank you letters, I found I needed a template for Avery’s “Embossed Note Cards.” I couldn’t find any online, so I made my own.

8317 Embossed Note Card Template for Photoshop (PSD)

Front Page24 Mar 2009 05:48 pm

I couldn’t have asked for a more perfect wedding, to a more perfect girl.

James and Shirin

Front Page& Projects24 Mar 2009 05:25 pm

Here’s how to grab a single frame from a live video stream using GStreamer on Linux in Ruby.

The trick is to use the “last_buffer” property on your video sink. That contains the last frame that was displayed to your screen.

You can use RMagick to convert that into something you can use like this:

#!/usr/bin/ruby

require 'gst'
require 'RMagick'

@pipe = Gst::Pipeline.new
@source = Gst::ElementFactory.make("v4l2src")
@sink    = Gst::ElementFactory.make("xvimagesink")
@pipe.add(@source,@sink)
@source >> @sink

@pipe.play

[ ... Later ... ]
# This is the actual capture.
capture = Image.from_blob(@sink.last_buffer.data).first

Front Page10 Mar 2009 04:07 pm
Front Page17 Feb 2009 04:11 pm
Front Page13 Feb 2009 04:05 pm
Front Page06 Feb 2009 04:06 pm
Front Page05 Feb 2009 04:07 pm
Front Page27 Jan 2009 04:08 pm
System Admin26 Jan 2009 12:31 pm

I’m learning Ruby, and as an early project, I thought I’d write a little SOAP server for exposing Solaris “kstat” output to the network.

It’s embryonic, but it works. I’d like to do a little more input sanitation, since it’s certainly possible to really hurt your server by requesting a kstat value of “::” (which returns all stats).

Here’s the server code:


require 'soap/rpc/standaloneServer'

class StatServ < SOAP::RPC::StandaloneServer
        def initialize(*args)
          super
          add_method(self, 'kstat', 'stat')
        end
        def kstat(stat)
                stat.gsub!(/[^a-zA-z0-9_:+]/i,'%');
                f = IO.popen("kstat -p #{stat}")
                return f.readlines
        end
end

server = StatServ.new('StatServ,'urn:StatServ','0.0.0.0',8888)
trap('INT') { server.shutdown ; puts "Server shutdown."}
trap('TERM') { server.shutdown ; puts "Server shutdown."}
puts "Starting server..."
server.start

…and the client code:


require 'soap/rpc/driver'
def usage
        puts "Usage: #{$0} hostname kstatvalue"
        puts "   Retrieves a kstat value from a remote machine's StatServ SOAP Server."
end

hostname = ARGV[0]
value    = ARGV[1];


if ! value
        usage;
        exit 1;
end

driver = SOAP::RPC::Driver.new("http://#{hostname}:8888/", 'urn:StatServ')
driver.add_method('kstat', 'stat')

val = driver.kstat("#{value}")

val.each do |s|
puts "#{s}"
end
Front Page20 Jan 2009 04:03 pm
Front Page14 Jan 2009 04:08 pm
Front Page04 Jan 2009 11:59 pm
  • First day at work in a week. It’s like I just got back from a vacation. #
  • Need new year’s party! #
  • Where are the good parties in Portland this New Year? #
  • Sounds like Backspace/Ground Kontrol will be fun, as does Someday Lounge, and Saucebox has DJ Mr. Mumu and DJ The Perfect Syn. What else? #
  • The portland indoor smoking ban is now in effect! Wish it were before my clothes got saturated with smoke. #
  • Eating pho and watching Shogun. #
  • Another night of Pho and Shogun! My life rocks! #
  • Mmm.. Wiibrew. #

Powered by Twitter Tools.

Front Page31 Dec 2008 04:05 pm
Front Page19 Dec 2008 04:05 pm
Front Page11 Dec 2008 04:04 pm
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.

Next Page »