A Teacher Worthy of Notice

Posted: 5th June 2017 by LegoDoug in Doug, Home Life, Politics, Sarah, Significant

(A reflection from November 9, 2016)

While my wife—Sarah Latimer—and I were walking our dog, Juno, we chanced upon an outside window of this history classroom at Nashua’s Fairgrounds Middle School, where our daughter, Naomi, attends.

I was moved to tears at the display, particularly given the anniversary of Kristallnacht. This was a meaningful reminder that, despite what we have seen all too often on social media and propaganda outlets, there are, indeed, those like this history teacher who are quietly and efficiently going about making the world a better place for all our children.

One of the best parts of the March for Science Sarah and I attended on April 22, 2017, in Washington, D.C., was the nearly endless creativity the marchers put into their signs. Not too many were repeated, and few would have been considered offensive. The preview image here is my sign, cribbed from “Stand back! I’m going to try science!” of XKCD origin.

All the signs we photographed:

Signs of Science
Listen to Your Nerds
Listen to Your Nerds
Listen to Your Nerds
« 1 of 107 »

 

The TramBot—When my nephew Dave Matheson (a veterinary grad student at Prince Edward Island) stopped in for a day-long visit, we constructed a TramBot that ran on a string stretched across an upstairs room with a light-activated set of “grabs”—perfect for bombing runs. This was inspired by the “Bomber Fly” seen in assorted Lego media.

Yes, I Always Over-Design

If you’ve seen the Bomber Fly in the Lego publications, then you will immediately notice that my creation is much bigger, and probably heavier. I developed a fear of minimalism after my very first RIS creation quite literally shook itself to pieces in under 10 seconds.

Features and Innovation Details

  • The forward-reverse pulleys are driven by a belt drive, although a geared drive would have been fine in this case.
  • There are bumpers connected to touch sensors on each end that reverse the drive pulley motor when triggered. Because the string is at about a 45º angle to the wall, we added the tires to keep the bumper rods from slipping. (Before this was done, the bumpers would sometimes just glance off the wall without triggering the touch sensors, as the robot tried to keep moving.)
  • We solved the problem of timing on the “grabs” (the name alludes to Gerry Anderson’s Supermarionation Thunderbirds program—see http://www.gis.net/~fm/) by using a belt drive, and setting the motor run time to one second longer than the absolute maximum necessary. This allowed the grabs to automatically re-synchronize, be movable by hand, and grip objects of various sizes.
  • The grabs are light-triggered. We used the Lego light sensor, and programmed it so that a flashlight beamed on it would trigger the grabs’ open or close sequence. This allowed for precise payload delivery.

 


My sons Isaac and John, my Nephew Dave, and I perform some final adjustments and testing.

To Boldly Go …

Isaac’s First Robot—The “Punching Robot”

(Original date, approximately 1998.)

Hey, He Was Only 3

At three years old, my son Isaac might have been the youngest person ever to construct a Lego MindStorms project. Although he calls it a robot, it is more of a contraption than a real robot … but I cannot help but be impressed.

Isaac built this entirely without help—he even connected the RCX to the motor properly on his own. The design is entirely his; I never built anything similar.

Isaac grins as he contemplates his world conquest.

This contraption, which he calls a “punching robot,” uses an assortment of Lego axles that rest within a 40t gear, that is directly mounted on the motor. Attached to several of the outer axles are the shock absorber pieces. These shock absorber pieces extend outward from the central gear when the motor is activated, and will repeatedly punch whatever the robot is placed near.

A close-up of the punching mechanism.

What Is Wrong with These People?

Posted: 20th January 2017 by LegoDoug in Doug, Family Members, Politics, Rants, Religion/Church

On the eve of the nomination of Donald Trump as President of the United States:

My biggest complaint* of the past year has been this: White “Evangelicals” ignored virtually all of Scripture to support a man who represents a near perfect antithesis of Christianity.

I have watched those on the fringes and outside of Christianity shake their heads, and wonder what is possibly going on in the minds of these Christians, and determine that they never, ever want to embrace a religion with such obvious hypocrisy. The Evangelical swell of blind support for a preacher of hate, lust, greed, lies, and ignorance has done more to harm the cause of Christ than anything else I have seen in my lifetime.

But I remind myself of this: Paul explained we should pray for our leaders—and I shall. Paul did this under perhaps the most corrupt government ever seen on earth, where his brothers were routinely murdered for sport.

So I will pray for (as of tomorrow) President Trump. I will also pray that we are spared from the horrors he has promised. I will also pray that the binding of extremism and near-insanity of the Republican Party to White Christianity is revealed for the disaster it is and forever abandoned. I will also pray for the healing of a nation terribly divided—while I, as promised and commanded, pray for the one who most wanted to divide it for his own gain.

1First of all, then, I urge that supplications, prayers, intercessions, and thanksgivings be made for all people, 2for kings and all who are in high positions, that we may lead a peaceful and quiet life, godly and dignified in every way. 3This is good, and it is pleasing in the sight of God our Savior, 4who desires all people to be saved and to come to the knowledge of the truth. 5For there is one God, and there is one mediator between God and men, the man[a] Christ Jesus, 6who gave himself as a ransom for all, which is the testimony given at the proper time. 7For this I was appointed a preacher and an apostle (I am telling the truth, I am not lying), a teacher of the Gentiles in faith and truth. (1 Timothy 2:1–7, ESV)

*This complaint is probably tied for first place with the practice of those same people chain-posting completely fraudulent and easily refutable propaganda. (No, that’s the Black Speech from Lord of the Rings, not a school distributing donuts with verses from the Qu’ran.)

Weasley Clock Code

Posted: 4th December 2016 by LegoDoug in Doug, Electronics, Geekdom, Home Life, Work Life

Back at Veracode’s last Hackathon, I published the video below. People have started discovering this and asking questions about it, so here is the code for it:

/*
  Weasley Clock
  -------------

  Created by Doug "LegoDoug" Wilcox for Veracode Hackathon IX.

  Video of the completed project is at https://www.youtube.com/embed/oRUViFnxKsg.

  "Share and enjoy."

 */

// Arduino SPI (Serial Peripheral Interface) library - https://www.arduino.cc/en/Reference/SPI
#include <SPI.h>             
// Arduino Ethernet library - https://www.arduino.cc/en/Reference/Ethernet
#include <Ethernet.h>        
// Arduino Stepper library - https://www.arduino.cc/en/Reference/Stepper
#include <Stepper.h>         
// Adafruit REST IO library - https://learn.adafruit.com/adafruit-io/arduino
// See also https://www.arduino.cc/en/Tutorial/WebClientRepeating
#include "Adafruit_IO_Client.h"    
                                   

// assign a MAC address for the ethernet controller.
byte mac[] = {
  0x8C, 0xDC, 0xD4, 0x4A, 0xC9, 0xC2
};

// initialize the library instance:
EthernetClient client;

// last time the Arduino connected to the server, in milliseconds
unsigned long lastConnectionTime = 0;        
// delay between retrieving updates, in milliseconds
const unsigned long requestInterval = 5000L; 

// Configure Adafruit IO access. You will need to create your own 
// Adafruit IO account (free), and set up a feed, and provide your
// feed and AIO key in the code below.
#define AIO_FEED   "weasleyclockstatus"
#define AIO_KEY    "XXXXXXXXXXXXXXXXXXXXXXXXXXX"

// Create an Adafruit IO Client instance.  Notice that this needs to take a
// WiFiClient object as the first parameter, and as the second parameter a
// default Adafruit IO key to use when accessing feeds (however each feed can
// override this default key value if required, see further below).
Adafruit_IO_Client aio = Adafruit_IO_Client(client, AIO_KEY);

// Alternatively to access a feed with a specific key:
Adafruit_IO_Feed clockFeed = aio.getFeed(AIO_FEED, AIO_KEY);

// States - These are the codes that correspond to specific clock positions.
const String LD_HOME         = "ld_na";
const String LD_TRAVELING    = "ld_tr";
const String LD_VERACODE     = "ld_of";
const String LD_CHURCH       = "ld_ch";
const String LD_MORTAL_PERIL = "ld_mp";
const String LD_GLOUCESTER   = "ld_gl";

// Steps - How many steps the motor needs to move to point to a specific position 
// on the clock.
const int STEPS_HOME         = 0;
const int STEPS_TRAVELING    = 750;
const int STEPS_VERACODE     = 1600;
const int STEPS_CHURCH       = 2450;
const int STEPS_MORTAL_PERIL = 3350;
const int STEPS_GLOUCESTER   = 4350;

// Someday, I will determine what this actually does. (I don't think, functionally, 
// it has any affect.)
const int stepsPerRevolution = 200;  

long motorPosition = 0L;         // Number of steps the motor has taken.
String fValue = "";              // Feed value.

Stepper clockStepper(stepsPerRevolution, 7, 6, 5, 4, 8);

void setup() {
  // start serial port:
  Serial.begin(9600);
  while (!Serial) {
    ; // wait for serial port to connect. Needed for native 
      // USB port only, on certain Arduino models.
  }

  // give the ethernet module time to boot up:
  delay(1000);
  // start the Ethernet connection using a fixed IP address and DNS server:
  //Ethernet.begin(mac, ip, myDns);
  // Or, just start it with dynamic DNS by giving it a MAC address.
  Ethernet.begin(mac);
  // print the Ethernet board/shield's IP address:
  Serial.print("My IP address: ");
  Serial.println(Ethernet.localIP());

  clockStepper.setSpeed(20);
}

void loop() {

  // Wait for a bit and read the current feed value.
  Serial.println(F("Waiting ..."));
  delay(requestInterval);
  
  // To read the latest feed value call the receive function on the feed.
  // The returned object will be a FeedData instance and you can check if it's
  // valid (i.e. was successfully read) by calling isValid(), and then get the
  // value either as a text value, or converted to an int, float, etc.
  FeedData latest = clockFeed.receive();
  if (latest.isValid()) {
    Serial.print(F("Received value from feed: ")); Serial.println(latest);
    // By default the received feed data item has a string value, however you
    // can use the following functions to attempt to convert it to a numeric
    // value like an int or float.  Each function returns a boolean that indicates
    // if the conversion succeeded, and takes as a parameter by reference the
    // output value.

    // Want some fun? Learning about "conversion from 'FeedData' to non-scalar 
    // type 'String' requested" the hard way.
    //
    // If I remember correctly, it was a casting error caused by trying to use 
    // the 'latest' variable as a String, directly.
    // The following line casts 'latest' to a string and lets us use it as 'fValue'.
    fValue = latest;
    
    if(fValue == LD_HOME) {
      Serial.println("Nashua");
      stepBySteps(STEPS_HOME);
    }
    
    if(fValue == LD_TRAVELING) {
      Serial.println("Traveling");
      stepBySteps(STEPS_TRAVELING);
    }

    if(fValue == LD_VERACODE) {
      Serial.println("Veracode");
      stepBySteps(STEPS_VERACODE);
    }
    if(fValue == LD_CHURCH) {
      Serial.println("Church");
      stepBySteps(STEPS_CHURCH);
    }
    if(fValue == LD_MORTAL_PERIL) {
      Serial.println("Mortal Peril!");
      stepBySteps(STEPS_MORTAL_PERIL);
    }
    if(fValue == LD_GLOUCESTER) {
      Serial.println("Glostah");
      stepBySteps(STEPS_GLOUCESTER);
    }
    
  } else {
    Serial.print(F("Failed to receive the latest feed value!"));
  }

}

void stepBySteps(int newPosition) {
  if(motorPosition == newPosition) {
    Serial.println("No movement required.");
    return;
  }

  long steps = newPosition - motorPosition;
  
  clockStepper.step(steps);
  motorPosition = newPosition;
  Serial.print("position should now be:" );
  Serial.println(motorPosition);
}

Morally Hazardous Technology

Posted: 3rd September 2016 by LegoDoug in Books, Home Life, Humor

1897 Van Cleve Ad

Voices were raised in protest. Bicycles were proclaimed morally hazardous. Until now, children and youth were unable to stray very far from home on foot. Now, one magazine warned, fifteen minutes could put them miles away. Because of bicycles, it was said, young people were not spending the time they should with books, and—more seriously—that suburban and country tours on bicycles were “not infrequently accompanied by seductions.”

The Wright Brothers, David McCullough

xkcd_1601_isolation

Humans don’t change, do they?

When You Marry a Lawyer’s Daughter …

Posted: 17th July 2016 by LegoDoug in Doug, Family Members, Humor, Sarah

THE REAL WORLD:

“Darling, you look radiant, today!”

(Woman beams appreciatively.)

WHEN YOU MARRY A LAWYER’S DAUGHTER:

“Darling, you look radiant, today!

(Woman waits. The Speaker continues.)

“The use of the word ‘today,’ should not by any means be interpreted as meaning that I (‘The Speaker’) do not believe you (‘The Addressee’) do not look radiant at every moment. Nor should you feel that subjective beauty is an expectation or requirement of gaining or maintaining the affection of The Speaker. The Speaker acknowledges the numerous beneficial and desirous qualities The Addressee possesses, which include, but are in no way limited to: supreme intelligence, unquestionable moral character, delightful humor, unparalleled business acumen, unassailable logic, perfect sexuality, and infallible parenting. The Addressee is the Speaker’s constant delight, his dearest companion, his partner in all ways. The Addressee is due The Speaker’s complete emotional involvement, financial remuneration, and temporal dedication. In the unlikely event of a disagreement, The Speaker preemptively cedes all possibility of correctness to The Addressee. The Speaker further acknowledges The Addressee is the solitary possessor of his undying affection and his eternal soul, world without end. Amen.”

(Woman nods in nonbinding acceptance.)

Remember Scotty’s remark about his nephew in Star Trek II: The Wrath of Khan? (No, of course you don’t.) Scotty explains to Kirk, after an inappropriately emotional response by Midshipman Preston: “My sister’s youngest, Admiral. Crazy to get to space.”

going-to-space
“Come on, R2, we’re going.”

Although I never pursued a career as an astronaut, I certainly remain, “Crazy to get to space,” and the description from Khan still resonates with me. I may yet get there, in my lifetime, especially with companies like SpaceX competing to make the cost of getting to orbit as low as possible.

For now, I’m going to have to settle for a proxy. Eliszabeth* MacDougal, one of the human family members I inherited when I married Sarah Latimer, has a friend, Cian Branco, who offered her the chance to send something small up on the Terrior Improved Orion rocket as part of the RockSat-C program. Eliszabeth realized this would be thrilling to me, and passed along her opportunity.

I ordered a new Lego R2-D2 minifigure, and a few parts to complete another mini-me as an astronaut, and shipped them off to Eliszabeth. They will be going up on Thursday, June 23, 2016, somewhere between 6:00 and 10:00 am, from the NASA facility at Wallops Island, Virginia. (My son, David, and I stood on our roof in the cold in October, 2014, to watch a night launch from Wallops.)

Geeking out!

Thank you, Eliszabeth!

New: I have just learned that my minifigs will have company on this voyage: Benny, from The Lego Movie will also be on this flight.

———————–

*Yes, this is the correct spelling.

————————

Update: (June 23, 2016)

:: sigh :: Postponed until tomorrow.

postponed

————————

Update: (June 24, 2016) I got up early to watch the launch today! In my mind, I was thinking, Saturn V. Long, slow acceleration. This is, uh, quite a bit smaller, and it zoomed upward so quickly I missed the rocket itself in the launch video screen capture. (The video will be posted soon by NASA/Wallops, anyway.) The crew was worried about missing the launch window due to weather, and debated skipping the camera alignment step. In addition to the pad camera, there was a UAV (drone) flying around, as some of the pictures below show.

The rocket got to its apogee of 119.08 km (74.0 miles) almost immediately. The payload detached successfully, and hit splashdown in the Atlantic, where it would be recovered, only 8 or 9 minutes later.

Very exciting! I reiterate my gratitude.

Here’s the official NASA post: NASA Successfully Launches Suborbital Rocket from Wallops.

kdiff3 6242016 60716 AMs

kdiff3 6242016 60327 AMs

kdiff3 6242016 60614 AMs

kdiff3 6242016 60617 AMs

————————

Update: (June 24, 2016, 16:05) Just got the official word from Cian: “Hey Doug, will send pics a bit later, currently wrecked. Your minis all went up and returned fine. I have pics of reintegration. Cheers!”

————————

Here's the recovered payload module, showing where my guys were attached in their Crew Module.

Here’s the recovered payload module, showing where my guys were attached in their “Crew Module.”

The Crew Module was carefully sealed with electrical tape.

The Crew Module was carefully sealed with electrical tape.

 Another view of the Crew Module.

Another view of the Crew Module.

Here's how the minifigures actually traveled.

Here’s how the minifigures actually traveled.

 And here they are, reassembled, along with Benny, who was glued into another part of the payload module

And here they are, reassembled, along with Benny, who was glued into another part of the payload module.

Video of the Launch:

Video from an observer to whom I am grateful.

Here is the launch from the NASA/Wallops feed!

A Republican No More

Posted: 6th May 2016 by LegoDoug in Doug, Family Members, Politics, Rants

My voter registration is now undeclared. (Sadly, no exotic options, like “Rational Anarchist” are available in New Hampshire—not even Communist.)

Man with a 1950s style fedora waves goodbye .

Goodbye, sewage-ridden idiocracy.

In a time when a voice of reason is desperately needed, your leadership has proven itself unable to take a stand against an obvious megalomaniac. You continue to propose revoking the victory of universal health care. You have protected and praised racists and worse. You have gone to war without cause, and destroyed our great nation’s international reputation. You have chosen a Presidential candidate who makes Vermin Supreme a rational choice by comparison. You have defended environmental destruction, and embraced ignorance over science.

I am saying goodbye to the sewage-ridden idiocracy the Republican Party has become. You are now, indeed, “Not my circus—not my monkeys.”

Adios.

“Sewage-ridden idiocracy,” is a phrase coined, as far as I know, by Connor Houghton.