Friday, May 15, 2009

I could develop mental powers, if I could resist daytime TV

I believe that if I could practice ignoring daytime television in a doctor's office just once a day for, say, a year, I would soon develop powers of telekinesis sufficient to turn off any TV with my mind alone. 

This week I was treated to some of Cristina's Court (the case was about some couple whose dream wedding was ruined because their limo lacked air conditioning) and Divorce Court ("I know for a fact she was sleeping with my brother!" "Oh you know it for a fact, do you?"). I'll never get those IQ points back. 

Wikipedia tells me that Cristina Perez is a celebrated hispanic judge and that she made the move from Telemundo to English-language TV. Probably she is a huge milestone in the TV judge world. However, I'm hypnotized by the way the cut scenes show her long, wavy hair....waving. 

But mainly I was bothered by how the announcer was trying to make drama out of a loss of air conditioning. "They got hot and bothered for all the wrong reasons." 

Thursday, May 14, 2009

Lily throws momma on the train


Family friend Marie took Lily to the train station day before yesterday to see Mom off to visit my new niece and help out my sister....and got this photo, among others.

I couldn't tell you what's different

Writing...resolve...faltering! I'm reduced to setting timers for myself in 30 minute increments. I can't tell you what's different about this month over last month, either. Maybe it's because I'm working on fixing a mostly-done story, and editing is less fun? I'm trying to make myself finish this revision of the story before I go on to something else, part of a general discipline thing. But it's taking longer than I'd like. 

Wednesday, May 13, 2009

More and more I realize we have a great neighborhood for biking

I biked to pick up my youngest from preschool on Monday, taking her home in a two-wheeled trailer. Then I dropped off a DVD to a Redbox kiosk at the Walgreens. I bike to the Walgreens a lot, it's an easy ride, as is the library. We also have a convenience store and several restaurants within easy ride distance. I've biked to go get a blood test for my physical, because there's a testing center over on Duval by highway 183, probably less than three miles away. And last week I twice dropped off my car at a place across the highway from work, and biked from there to work.

Last month I met some friends for lunch at the Arboretum, maybe 4 miles away...that was the longest mid-workday ride I've attempted, but it meant I could meet folks for lunch and not give up that avenue for socializing for my obsession with biking to work. I'm tempted to bike over to meet my son for lunch one day, but that's a decent slog, with a huge hill as part of it.

Tuesday, May 12, 2009

Sandman Mystery Theatre

I've been enjoying volumes of  Vertigo's Sandman Mystery Theatre, by Matt Wagner of Mage fame. I didn't know anything about it till I picked up a couple of volumes from my new best friend, the Wells Branch Community Library, which has a great selection of graphic novels. 

I have to ruefully admit that I thought these had something to do with Neil Gaiman's Sandman series when I picked them up. Instead of being about mythological characters, though, these are about a pulp-era crimefighter who uses a gun that fires sleeping gas, and wears a gas mask. I knew this character existed, but not much else; it turns out that this is a very old DC character who was resurrected in 1993 for this series. 

What's charming about the series is the fact that it's set in the 1930s, the art suits the story well, and the main character spends a lot of time worrying about his relationship with his girlfriend and maintaining that while crimefighting. The characters are none of them the buff figures of superhero comicdom, and I like that as well.  

Monday, May 11, 2009

I'm an uncle!

My sister had her baby on Friday. A new girl Link joins the world. I don't know how my kids will deal with not being the only grandbabies in our branch of the family tree, but we'll cope. We're doing our part by sending Tanya up to help out. Which means I'll be solo dad for a few days. Probably means I'll watch a lot less TV, and the kids will watch more. 

Arduino LED control with potentiometer

Some friends were nice enough to give me a Fry's gift card for my birthday. I hate how Fry's is always tempting you in the door with prices that turn out to be based on mail-back rebates that don't always go your way. But this card was a godsend when I needed more components to use to play with my Arduino board. So I got a couple of potentiometers and some LEDs and resistors and I'm in business.

That same evening, I wired up 4 resistors and a potentiometer on the breadboard. I had each led connected to a different digital IO pin -- pins 9-12 -- and the pot is on analog pin 2.

Then I wrote some code that works like this:

- It turns off all the LEDS
- It reads the pot value (range of 0 to 1023)
- If the pot value is more than 0, it lights LED1.
- If the value is more than 1/4 the total, it lights LED2. More than half, light LED3; more than 3/4, light LED4.

The result is a gadget that shows between one and four LEDs lit, depending on how far you dial the potentiometer. That's no big deal, the important part is that I was, that same evening, able to demonstrate using the pot to control something.

Here's the code I used. I'm also sending the pot value back to the computer through the serial link, but I'm doing something wrong there, it's getting random characters....I haven't figured out how to properly convert the int value from the pot into a string. I'm realizing now that the Arduino/Processing language is basically C, and C has lousy built-in string support, and I'm used to scripting languages that are good at strings. Of course, an Arduino doesn't even do floating point arithmetic; it makes sense to keep the code simple and low-level for its purposes.

/* Several LEDS
light, and control, several leds

1. Make 4 leds blink in alternation
2. Read ANY value via serial, from ARD
3. Hook up a pot, read its value


made from Blink without Delay
*
* Turns on and off a light emitting diode(LED) connected to a digital
* pin, without using the delay() function. This means that other code
* can run at the same time without being interrupted by the LED code.
*
* http://www.arduino.cc/en/Tutorial/BlinkWithoutDelay
*/

int ledPin1 = 10;
int ledPin2 = 11;
int ledPin3 = 12;
int ledPin4 = 9;
int value = LOW; // previous value of the LED
int oppvalue = HIGH; // opposite value
long previousMillis = 0; // will store last time LED was updated
long interval = 1000; // interval at which to blink (milliseconds)
int potPin = 2; // analog pin the pot is on
int potVal = 0; // initial analog value
char potStr[5];

void setup()
{
pinMode(ledPin1, OUTPUT); // sets the digital pin as output
pinMode(ledPin2, OUTPUT);
pinMode(ledPin3, OUTPUT);
pinMode(ledPin4, OUTPUT);
Serial.begin(9600);
}

void loop()
{
// here is where you'd put code that needs to be running all the time.

// Start by turning off all the LEDs

digitalWrite(ledPin1, LOW);
digitalWrite(ledPin2, LOW);
digitalWrite(ledPin3, LOW);
digitalWrite(ledPin4, LOW);

potVal = analogRead(potPin); // read the value from the sensor
// this should be btw 0 and 1023

itoa(potVal,potStr,10);
// standard function, takes int, string, and then BASE = base 10 math

Serial.print(potStr);
// Not quite working....returns chars but they aren't numbers like I expected.



if (potVal > 0) {
digitalWrite(ledPin1, HIGH);
}
if (potVal > 255) {
digitalWrite(ledPin2, HIGH);
}
if (potVal > 512) {
digitalWrite(ledPin3, HIGH);
}
if (potVal > 767) {
digitalWrite(ledPin4, HIGH);
}
}

Sunday, May 10, 2009

Xeroxing my way to success

One year when I was in grade school, we had a series of speed-based math tests. We worked on these for weeks.

Every Monday we'd receive a new worksheet with a bunch of simple operations on it...on the order of 8+12=___, 17-9=__ and so on. The idea was for you to fill in the blanks and turn in your test as quickly as possible and the teacher evaluated how fast you were. I remember the teacher making a big deal out of this.

We'd keep the same worksheet for a week, retrying it daily. Although I was good at schoolwork in general, I had a lot of trouble with this task, and my dad decided to help out. The outcome probably motivated him to avoid helping me with homework thereafter.

Initially, the helping seemed to go well. I got a new test on Monday, I brought it home, Dad contributed his help, and by Friday I was the fastest in the class. As I recall it, I was a lot faster than anyone else. I was the star student.

But on the following Monday we got a new test and I was among the slowest again. I remember this really bothering my teacher, and embarrassing me, and boy was I sensitive to embarrassment.

I knew what the problem was the whole time, though I felt unable to tell anyone about it. Back then, access to photocopy machines was rare, but my dad worked for Xerox. So when I brought home a new worksheet, we carefully whited out the answers and then he made copies and I worked them at home repeatedly, with him timing me, until I was fast.

Like the famous counting horse, Clever Hans, I knew what results were wanted and I gave them, but there was a communication problem: I wasn't really solving the problems. I was memorizing the answers. So I climbed to the top of the heap fast, but when the teacher switched worksheets, I was thrown right back to the bottom.

I know we figured this out as a family. I don't remember what happened after that. But it was pretty embarrassing.

What strikes me about this is how I was unable to talk about this. I mean, I know I knew something was wrong. I knew I was supposed to actually work the problems. I guess I thought I'd get in trouble if I talked about it. And the way we were studying the problems, by running through the worksheets with a stopwatch, seemed to naturally lead to memorization -- I've always been good at that sort of memorization, anyway.


Friday, May 08, 2009

Free online versions of print comics

I bumped into this web page completely by accident. This fellow has done a fine job of compiling links to online versions of comic books. I'm reading Lucifer #1 right now! It's heavenly.