Archive for the ‘Uncategorized’ Category

Most Recent Road Trip

Monday, October 10th, 2022

Map showing stops in MN, IN, KY, MD, and return to Seattle

Watching the Chicago 7 trial

Tuesday, April 13th, 2021

I have to say, contempt of court should not be a crime, because most courts in the USA deserve contempt. (Of course, anyone who thinks they are worthy to judge others is starting out in a extremely questionable place, and when we look at the US where murder is encouraged if done by a cop or soldier, where ethics are for sale to the highest bidder).. In any case “Your Dishonor” seems like a honest way to refer to a judge.

Dear Netflix

Tuesday, April 13th, 2021

Please make a whole series of movies about the space dog from Over The Moon.. thank you 😉

..

Thursday, October 1st, 2020

One thing that I do worry about, post the previous post, is what absolutely wrong beliefs *my* mind is defending. No real way to know, either.

Quiz results of shwartz values test

Friday, September 11th, 2020

 

I didn’t really feel like this accurately captured me.. I feel like the benevolence should be higher. I maybe should have thought a little more about the data I was feeding it.

 

Work

Sunday, August 30th, 2020

One of the problems I’ve been having lately is that increasingly I find the tendencies of the way my job is arranged to burn through many hours of my life for no reason frustrating.

Part of this is that I’m increasingly wanting to be spending time in the studio working on my musical skills – I’ve been really making a lot of progress in addressing some of my weaknesses as a musician lately. One thing I will acknowledge is that thus far I can only do about 4 hours straight of playing right now – but that’s up from about 2 hours a few months ago, and I’m guessing the number will continue to go up as I continue to put effort into it.

Of course, one of the downsides of this is that it means my paws are sore a lot of the time, although I’m under the impression that if I keep up this level of working out, musically, they will be less sore. They hurt less than they did a few months ago.

In order to have time to continue doing my day job while working on my musical skills I’ve completely given up facebook. I can’t say that I miss it.

Anyway, so, my hope is if I can keep up this pace for another six months or so I will be able to reproduce the music I can imagine and that I will also be able to find work writing and recording music – we will see.

Some of the exercises I’ve been working on recently include working on being able to comfortably improvise around the 12 bar blues in every key (i’ve still got two keys left to go, Db and Eb, and I’m still working on my comfort level on Gb and Ab). I’m also trying to reach a place where I’m as good at soloing in E as C, because I forsee a lot of E in my future.

Possible project – more advanced sustain pedal

Sunday, August 16th, 2020

So, I’m pondering making a more advanced sustain pedal controller for my two keyboards.

In particular, I’d like to implement the following features:

1) Latching and momentary control for the novation
2) sustain of both keyboards with one pedal

What I’m thinking of doing is looking for a three pedal input device, and modifying it so that

A: pressing the center pedal applies sustain to both keybaords
B: pressing the center pedal along with the left or right pedals applies or clears a latching state

I am thinking of using a microcontroller and two relays – obviously this could be done with straight logic but using a microcontroller allows debouncing and also possibly adding additional features later.

The future

Wednesday, July 1st, 2020

I really wonder how this period of time will look to me in the future when I look back over my journal. I hope that the complete political and social dysfunction we are currently experiencing will resolve itself, and that the economic stupidity will actually be transcended – it’s possible that things could go extremely worse wrong – of course, in a lot of the worst case scenarios, my web server is not going to be there to look at.

But, even though things look grim at the moment, I have a lot of hope. For one thing, I think COVID is going to teach even the most conservative among us that it’s a good idea to listen to the smart people, and a bad idea to listen to the lying liars. I also think in the case of COVID, a bunch of the folks who believe the dumbest things are going to, well, die. Evolution in action. And my hope is that we will all collectively learn a thing or three from this and life will get better from here.

I also still have hopes that my personal life will get better, as I do sometimes manage to grow. At least a little bit. I think that my conflict-averse nature is going to have to get sorted out at least somewhat, and I also think I’m going to have to give even more time to what I really want to be doing and trust that the rest of this mess will work itself out because people who really want to be working on the social and political and economic aspects of the world will improve those aspects.

And, I do have to recognize there are reasons to be grateful even now. The vast array of food products available to us even in a pandemic is pretty astonishing, for example – in a good way. And I’m grateful to have broadband – if I’m going to have to avoid most of humanity, it’s good to still have the ability to appriciate the best of our art, and to publish my own art.

Criminal Justice System and who wants to work at it

Tuesday, June 23rd, 2020

I’m pondering that maybe you should never allow anyone who *wants* to be a judge or a politician be one. I also think you need to watch the cops who want to be cops closely – make sure they want to be cops for the right reasons. The problem is we have a bunch of thugs abusing their power – in general I’m not even convinced you should let the person who wants to run the neighborhood association do so, the issue is the odds of people wanting power not abusing it sooner or later are really, really low.

Perl module for decoding tekpower TP4000ZC

Tuesday, April 7th, 2020

I didn’t see one of these lying around so I banged this together in a few minutes to be able to use the TP4000ZC with a raspberry pi.. the intention is to use this to monitor the main bus voltage of my solar array.

This is provided, obviously, with no warranty, and is based on information found at tek’s web site. It seems to match the display.


package tekpower;

use Device::SerialPort;
use Data::Dumper;
use strict;

sub new {
my $self = {};
my $type = shift;
my $port = shift;

$self->{'debug'} = 0;
$self->{'port'} = $port;
$self->{'dev'} = Device::SerialPort->new($port, 1) || die "Failed to open $port";
$self->{'dev'}->baudrate(2400);
$self->{'dev'}->parity('none');
$self->{'dev'}->databits(8);
$self->{'dev'}->stopbits(1);
$self->{'dev'}->dtr_active(1);

$self->{'dev'}->debug($self->{'debug'}) if($self->{'debug'});
$self->{'dev'}->write_settings;
$self->{'dev'}->read_const_time(3000);
my $r = bless($self, $type);

return $r;
}

sub read {
my $self = shift;
$self->{'dev'}->reset_error;
my ($count,$buf) = $self->{'dev'}->read(64);
print "count: $count\n" if($self->{'debug'});
my @array = split(//,$buf);
my $notOk = 1;
while($notOk && @array) {
my $z = shift(@array);

print "z: " . ord($z) if($self->{'debug'});

my $checksum = (ord($z) & 0xF0) >> 4;
print "checksum: $checksum\n" if($self->{'debug'});
if($checksum == 1) {
unshift(@array,$z);
$notOk = 0;
}
}
my @v_array;
# first check high order bits
my ($i, $checksum);
for($i=0;$i<14;$i++) { $checksum = ord($array[$i]) & 0xF0; $v_array[$i] = ord($array[$i]) & 0x0F; $checksum = $checksum >> 4;
if($checksum != ($i+1)) {
print "Checksum mismatch at $i ($checksum)\n" if($self->{'debug'});
return undef;
}

}

# second decode reading;
my $mode;

$self->{'smode'} = "AC" if($v_array[0] & 8);
$self->{'smode'} = "DC" if($v_array[0] & 4);
# bit 2 is auto ranging, do we care?
# bit 1 is RS232, um, if you don't know that, what are you doing here?
$self->{'sign'} = "+";
$self->{'sign'} = "-" if($v_array[1] & 8);
$self->{'digit1'} = $self->convert_digit($v_array[1], $v_array[2], 0 );
$self->{'digit2'} = $self->convert_digit($v_array[3], $v_array[4], 1 );
$self->{'digit3'} = $self->convert_digit($v_array[5], $v_array[6], 1 );
$self->{'digit4'} = $self->convert_digit($v_array[7], $v_array[8], 1 );

$self->{'number'} = $self->{'sign'} . $self->{'digit1'} . $self->{'digit2'} . $self->{'digit3'} . $self->{'digit4'};

$self->{'range'} = 'u' if($v_array[9] & 8);
$self->{'number'} *= 0.000001 if($v_array[9] & 8);

$self->{'range'} = 'n' if($v_array[9] & 4);
$self->{'number'} *= 0.000000001 if($v_array[9] & 4);
$self->{'range'} = 'k' if($v_array[9] & 2);
$self->{'number'} *= 1000 if($v_array[9] & 2);

# 1 is diode, do we care?
$self->{'range'} = 'm' if($v_array[10] & 8);
$self->{'number'} *= 0.001 if($v_array[10] & 8);

$self->{'range'} = '%' if($v_array[10] & 4);
$self->{'range'} = 'M' if($v_array[10] & 2);
$self->{'number'} *= 1000000 if($v_array[10] & 2);

$self->{'mode'} = "farad" if($v_array[11] & 8);
$self->{'mode'} = "ohm" if($v_array[11] & 4);
$self->{'mode'} = "delta" if($v_array[11] & 2);

# bit 1 is hold, do we care?

$self->{'mode'} = "amps" if($v_array[12] & 8);
$self->{'mode'} = "volts" if($v_array[12] & 4);
$self->{'mode'} = "hz" if($v_array[12] & 2);

return $self->{'smode'} . ' ' . $self->{'mode'} . " " . $self->{'sign'} . " " . $self->{'digit1'} . $self->{'digit2'} . $self->{'digit3'} . $self->{'digit4'} . ' ' . $self->{'range'};

}

sub convert_digit {
my $self = shift;
my $lhs = shift;
my $rhs = shift;
my $include_decimal = shift;
my $decimal;

if($include_decimal) {
if($lhs & 8) {
$decimal = ".";
} else {
$decimal = "";
}
}

$lhs = $lhs & 7;

my $d;

# 000 0101 = 1
if($lhs == 0 && $rhs == 5) {
$d = 1;
# 101 1011 = 2
} elsif($lhs == 5 && $rhs == 11) {
$d = 2;
# 001 1111 = 3
} elsif($lhs == 1 && $rhs == 15) {
$d = 3;
# 010 0111 = 4
} elsif($lhs == 2 && $rhs == 7) {
$d = 4;
# 011 1110 = 5
} elsif($lhs == 3 && $rhs == 14) {
$d = 5;
# 111 1110 = 6
} elsif( $lhs == 7 && $rhs == 14) {
$d = 6;
# 001 0101 = 7
} elsif($lhs == 1 && $rhs == 5) {
$d = 7;
# 111 1111 = 8
} elsif($lhs == 7 && $rhs == 15) {
$d = 8;
# 011 1111 = 9
} elsif($lhs == 3 && $rhs == 15 ) {
$d = 9;
# 111 1101 = 0
} elsif($lhs == 7 && $rhs == 13 ) {
$d = 0;
} elsif($lhs == 6 && $rhs == 8) {
$d = "L";
} else {
return undef;
}

my $v = $decimal . $d;
print "V: $v\n" if($self->{'debug'});
return $v;
}

1;