May 4th, 2009

ronin

3D ultrasonic mouse college EE project.


Ultramouse 3D times the delay of high-frequency sound waves from the unit held by the user to each of three receivers and passes this information along a serial cable to the computer. The accompanying open-source API provides easy functions that let any Win32/C++ application start reading 3d data in less than 5 minutes.

http://courses.cit.cornell.edu/ee476/FinalProjects/s2009/kwg8_dmd54/kwg8_dmd54/index.html

http://www.youtube.com/watch?v=nxlvaCpJIvA

Shockingly easy. Look at those circuit diagrams.
ronin

sepdate.pl


asta:~> cat bin/sepdate

#!/usr/bin/perl

# sepdate utility
# usage: sepdate [month date year]
# where day month year are date of interest - default is today
# e.g. sepdate 10 21 95
# for October 21, 1995
#
# Prints the date in same format as Unix date command (default)
# but unlike the buggy date command this script does take into account the
# fact that September 1993 never ended.
#
# Known bugs and odd features:
# - if date other than today is specified, time is displayed as 00:00:00.
# - arguments are not checked other than to see if there are 3 or none.
# - dates prior to 9 1 93 are rendered as nonpositive dates in Sept. 1993.

require "timelocal.pl";

if ($#ARGV == 2) {
$thetime = &timelocal(0,0,0,$ARGV[1],$ARGV[0]-1,$ARGV[2])
}
elsif ($#ARGV == -1) {
$thetime = time
}
else {
die 'usage: sepdate [month date year]'
}

$days = int (($thetime - &timelocal(0,0,0,31,7,93)) / (60 * 60 * 24));
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($thetime);

printf ("%3s Sep %2d %2.2d:%2.2d:%2.2d %3s 1993\n", (Sun,Mon,Tue,Wed,Thu,Fri,Sat)[$wday],$days,$hour,$min,$sec,(MST,MDT)[$isdst]);


asta:~> sepdate
Mon Sep 5725 17:04:38 MDT 1993
asta:~>
  • Current Music
    U2 - October