Thursday, February 25, 2016

Could Spencer Reid be related to either The Lone Ranger or Sherlock Holmes or Both?

Normally, I do some type of blogging about electronics, radios, or robots, this one is a little different, and something that I've been thinking about for some time now.

Here my little theory on Spencer Reid from Criminal Minds:

So a little background for those who have been living in a box, under a rock or on the other side of the moon for the past 50 plus years, and have no idea who the Lone Ranger, Sherlock Holmes or Spencer Reid are.

1st The Lone Ranger - he is a fictional masked former Texas Ranger who fights outlaws in the American Old West. His first appearance was in 1933 radio drama, and was inspired by Zane Grey's "The Lone Star Ranger" from 1915.
A bit of the back story - He and a group of other Rangers including his brother, were ambushed by the Cavendish gang and left for dead.  There are two different versions of the back story, one where he is the only survivor, the 2nd where him and his brother are the only survivors.  His first name is left to a little speculation, most believe it to be John, his last name is Reid. And his brothers name is Dan or Daniel Reid.

What's important about his brother surviving the ambush, is that He had a son that went on to have a son named Brett Reid.  Brett Reid went on to carry out his uncles legacy with the Green Hornet. The Green Hornet went on to have children, that carried on that legacy.

So that is a little background on The Lone Ranger.

Next we need to talk a little about Sherlock Holmes was created by Sir Arthur Conan Doyle,  He was a "consulting detective",  And worked a number of "baffling" cases, the general setting was in the late 1880s. Attempts have been made to "remake" the great detective in modern times with some successes and some not so successful attempts.  What makes Sherlock special was/is is ability to make connections (deductions), see clues that others don't see, and bring a modern approach to solving crime. He had a very high IQ, may have a eidetic memory, He may also have Asperger's syndrome (even though the syndrome was not identified until the 1940s). He probably also has some forms of OCD. As well as a small drug habit.
According to this website:
(more on this website later)
Sherlock Holmes Son is Nero Wolfe, and a Detective in San Francisco named Spencer Holmes maybe the grandson of Sherlock Holmes (or Son of Nero Wolfe). This might be important when trying to figure out if Spencer Reid is related to Sherlock.

When we get right down to it, it's easy to see why Spencer Reid maybe related to Sherlock Holmes, all we have to do is look at his wiki entry and we see a very similar description to Sherlock.
Spencer Reid is a member of the FBI's BAU on the popular show Criminal Minds. - when he started with the BAU he was 22, and the youngest member of the team.  In fact he had to get special wavers to even join the FBI, let alone carry a weapon, and join the BAU.  He holds at least 3 B.A.s and a couple of Ph.D.s, he has also demonstrated some medical knowledge.  With the BAU, he helps puts serial kills and other really bad people away.
He has a genius level IQ, eidetic memory and Asperger's syndrome, as well as some tenancies to be OCD.  Sound like some one else we know?
Reid was raised in Las Vegas, Nevada by his mother Diana Reid. His father is William Reid, but left when Spencer was 10. Spencer on many different occasions has stated that Sherlock Holmes has influenced his life.

So clearly I can see how Sherlock Holmes was a major influence in creating Spencer Reid. But this is about how he maybe related to Sherlock, not just influenced by him. It may not be so easy to make a connection to the Lone Ranger or Green Hornet. The name is a give away for me however, it's hard to think those characters didn't have some influence on who Spencer is.

Remember the website above that I we'd get back to, the site that claims Nero Wolfe is Sherlock's son. That site makes some pretty interesting connections over many many different books, tv shows, series, movies. It's called "The Wold Newton Universe" and he can explain it much better than me. I'll attempt to hit the high lights thou of the "Universe".

"The Wold Newton Family is a group of heroic and villainous literary figures that science fiction author Philip José Farmer postulated belonged to the same genetic family. Some of these characters are adventurers, some are detectives, some explorers and scientists, some espionage agents, and some are evil geniuses." 
 "According to Mr. Farmer, the Wold Neton family originated when a radioactive meteor landed in Wold Newton, England, in the year 1795."
"The radiation caused a genetic mutation in those present, which endowed many of their descendants with extremely high intelligence and strength, as well as an exceptional capacity and drive to perform good, or, as the case may be, evil deeds."

The web goes on to list some of the people who are included in "The Wold Newton Universe".  Two names caught my eye, Lone Ranger (and by extension his family) and Sherlock Holmes (and by extension his family)

The website goes on to give some very detailed accounts of and reasoning for links between seemingly unrelated people.
But despite all of the work already done on this site, and even the Reid Family Tree they did, there is still no reason to think Spencer is related.

So, let's keep looking for some other clues that may not have been picked up on.
 Let's look at Spencer's parents. Diana and William Reid.
We assume Reid is Diana's married name, but what if (just what if) Her name was Reid when she married William Reid. While this doesn't happen often, it more common than people think. We really don't know much about Diane despite Spencer talking about her from time to time, and her help with some of the BAU cases.  We know she has a high IQ (genius level) even thou it has never been said what her IQ is. We know she raised Spencer pretty much as a single mother. We know that she has schizophrenia.  We know she was a teacher. We know she is still living in Las Vegas, at a sanatorium. We know she has a fear of flying. We also know that when Spencer was very young she witnesses the murder of Gary Michaels.
A few other things we know, Her favourite author is Margery Kempe and she use to smoke.
Unfortunately we don't know her age, but the actor that plays her is Jane Lynch, who was born in 1960 (making her at the time of this writing roughly 56). So we can make a couple of educated guesses here, and say that Diana Reid would be in her mid-50s, and very likely no older than 60.
We don't know and don't really have enough information to really guess.
But here is something interesting:
 From the Reid Family Tree (, we do find a daughter of Britt Reid II and Ruth Hopkins who has a name of Diana Reid. The bad part the date listed she was born in 1947. That would make her 69 or 70 in 2016. And probably too old to be "our Diana Reid". It could be that the date on the Tree is wrong, And maybe it's should be 1957...That would make her 59/60 in 2016 - hmmmm it's on the high end of what I think Spencer's mother would be, but it is in the range of possibilities.

Let's see if we can find out any traits or habits that Brett Reid II daughter might have, if we can.
So I go back and see if I can find anything in the 1941 to 1970 section of "The Wold Newton Universe"
nothing is said about Diana Reid, but Brett Reid II took up the mantle of The Green Hornet in 1966. If my reasoning that the date is wrong, at the time her father took over Green Hornet she would have been 9. It seems very unlikely that a new father would go on dangerous missions in the underworld with such a young child at home.  However if the 1947 date is correct, she would have been 19, and most likely would have understood why he needed to do this.
It seems like a bust..... But I'll put yet another hypothetical in play - it appears little is know of 1947 Diana Reid - could it be possible that she had a daughter in the 1960s (1964/1965) - and named the daughter after her (?) That would make her daughter 52/53 in 2016, and She would have been 17 or 18 at the time of the birth - a hard life no doubt, but very modern. And with the Reid family money it wouldn't be that hard to image raising a strong very intelligent female.

Don't buy any of that - ok, let's look at Spencer's father - William Reid.
We don't know very much at all about William at all.
For the most part, He is an Attorney, He still lives in Las Vegas, his favourite author is Isaac Asimov, he likes cats, drives a Prius, still works at the same law firm (Kierschenbaum, Wieder, and Moore) He has also keep an eye on Spencer via news reports and electronic means.
We don't know his age either, but again, the actor that plays him was born in 1959. IF we base Williams age on that - it would make him 56/57 in 2016.

 That doesn't really help at all, on the Reid family tree that is no one even close to being named William. But wait, I'm not done digging into the "Spencer Reid" family.  (But here is were it's going to get weird again).

On Both Diana Reid's entry and William Reid's entry There are two people listed.
Daniel (brother (in-law); deceased) and Ethel (sister (in-law)) - The thing is they are listed the same way on both entry pages- and there is no more information about them (More digging is needed) Also no last names are given, I have to figure they are both Reid's on Spencer's page Daniel is listed as his UNCLE! and deceased....Do we finally have a solid connection to the Reid Family Line in "The Wold Newton Universe" I'm not sure, there is a Daniel Reid III listed as being born in 1983 on the family tree - It's listed that Daniel is still alive however, and would be roughly the same age as Spencer. Also thou, there are many Daniel's listed on the family tree, so based on the name alone it fits very well into "The Wold Newton Universe".

We don't know at this point (we may never know) - Spencer Reid's middle name, if he has a middle name.
It would make things very interesting if his full name was "Spencer Daniel Reid"
Not just in the fact that there is a Daniel Reid III listed with a very close birth year, and very close to the age. But it would almost certainly firmly cement him in the "Lone Ranger - Reid line"

I've said money a few times now so - let's think for a few minutes. Spencer effectually supports two houses, Himself, and his mother.
While it's true Spencer could count cards or had systems that got him banned from casinos, that isn't how he made his money. He's just too honest to do that.
He does work for the FBI we don't know what his pay grade is. Based on his age, he's been with the BAU 7 or 8 years - if we just guess he gets a pay raise every year that would make him a G3 step 7/8 or 31500/32252.  He may get additional pay for BAU, hazardous duty, etc. But let's face it he doesn't make a lot of money.
Where does money come from, how did he pay for school?  -the answer -  The Reid Family Money.

My prediction is sometime in the future it will be reviled that he had a great uncle who was a Texas Ranger.

Geographically there are some similarity as well - Nevada, and Texas, Brett Reid lived in New York, and Washington DC is a short train ride away. So while not prove, all the players are located in a very similar area.

Let's move on to Sherlock Holmes - I'm going to keep this one brief
and point to a few things I already touched on.
Sherlock had a son name Nero, Nero (possibly) has a son named Spencer Holmes.
Spencer Reid shares trades common with Sherlock Holmes, in most respects he is a modern interpretation of Holmes.
 Spencer's first name is Spencer - it wouldn't be too much of a stretch to name someone after someone in your family, even if distant cousins.
Despite these things hitting us in the face with each episode, I have found little to nothing to backup any idea that Spencer Reid maybe related to Sherlock.

It is much more likely that Sherlock did inspire the writers to create Spencer Reid, and that he is really related to Brett Reid/Daniel Reid/John Reid and is carrying on the "family" business of taking out the bad guys.

I didn't just base this idea off the name, there are some other things that make me believe it.  For instance Lone Ranger, Green Hornet and Spencer Reid all fight against crime syndicates.
Each has dawned a mask to help (or try) to save someone else.
The Lone Ranger was a Law Man (Texas Ranger) -
(Here is another IF) - IF Texas were not part of the United States, The Texas Rangers would serve very much in the same role as the FBI, and U.S. Marshals combined.
It is not any stretch of the imagination that a great grand nephew of the Lone Ranger would want to go into that type of work, but on a bigger scale (all of the U.S. not just Texas).

There are other little things
Like I think Gideon early on gave Reid a bullet. And think that bullet was silver - Reid carried the bullet with him for a period of time. (Time to rewatch the first few seasons)

Sunday, October 11, 2015

Intermediate Arduino Programming 101: Rename Hardware Serial Port

Intermediate Programming 101: Rename Hardware Serial Port

Why would we want to rename a hardware device - it makes the code easier to follow and edit.
It also helps when there are more than one hardware serial device, like on the Mega
code like this:

void setup() {
Serial.begin(9600); //debug
Serial1.begin(4800); //gps
Serial2.begin(9600); //compass

Turns into this:
#define Debug Serial
#define GPS Serial1
#define Compass Serial2

void setup() {

void loop() {
Debug.println(“This goes to Serial Console.”);
GPS.println(“Hi GPS…..GPS Doesn’t understand this”);
Compass.println(“Some stuff that compass doesn’t like”);

In this example we see something called #define, we all have seen this, may have even used it, or copied it from someone else's sketch, most don’t question what it is or what it does.
So - Here is what it is, and what it does:

#define is a useful C component that allows the programmer to give a name to a constant value before the program is compiled. Defined constants in arduino don't take up any program memory space on the chip. The compiler will replace references to these constants with the defined value at compile time.

You can #define your own constant as well example a LED pin.

#define RedLed 3

This makes things a little easier on the programmer, he/she doesn’t have to remember that the RedLed is connected to Pin 3 - or even better, you just have to change one thing should the RedLed move to Pin 4.

To the Arduino - (after the sketch is compiled and running on it) - it replaces all of the RedLed references to 3.

So in our Serial example above - at the time the sketch is compiled, the compiler sees this:

void setup() {

void loop() {
Serial.println(“This goes to Serial Console.”);
Serial1.println(“Hi GPS…..GPS Doesn’t understand this”);
Serial2.println(“Some stuff that compass doesn’t like”);

So this sounds great right? Now for the warning,

There can be some unwanted side effects from using this method.
if for example, a constant name that had been #defined is included in some other constant or variable name. In that case the text would be replaced by the #defined number (or text)
In general Arduino prefers using the const keyword ( for defining constants.

So that is it in a nut shell. Quick and Easy way to rename hardware components.

Wednesday, October 7, 2015

Intermediate and Advanced Arduino Programming Concepts

Arduino Intermediate and Advanced Programming

Oct 7, 2015
At last weeks meeting, Frank brought up the fact that his BittyBot didn’t seem to go forward, or backward at the same rate of speed or time, and that the timing seemed off.
part of the reason for this is in the sketch he was talking about, DELAY was used for timings.
And I always knew DELAY is not what I wanted to use, but it’s quick, and good for testing.
what DELAY does is stop the microcontroller, it will not advance to the next step in the program until the DELAY is meet.
Frank’s questioning the timing last week was a good reason to go back and rewrite the DEMO code using a different method for timing. Once before we did a demo for Frank that had different timings and a button push for a LED. In that we used MILLIS() and watched the clock our.
The idea is to watch the clock ourself this lets the sketch advance and do more in the same amount of time.  
So let’s look at something simple (BLINK):

int LED = 13;
int State = 0;

void setup() {
pinMode(LED, OUTPUT);
digitalWrite(LED, State);

void loop() {
State = !State;
digitalWrite(LED, State);


Ok, pretty simple, but each time a DELAY is reached the sketch stops and waits, nothing else happens. - Let’s look at the same sketch but without a DELAY, using MILLIS()

int LED = 13;
int State = 0;
long previousMillis = 0; // this will store the last time the LED was updated
long interval = 1000; //this is the DELAY in milliseconds (just like using DELAY)

void setup() {
pinMode(LED, OUTPUT);
digitalWrite(LED, State);

void loop() {
unsigned long currentMillis = millis();
if (currentMillis - previousMillis > interval) {
    previousMillis = currentMillis;
    State = !State;
    digitalWrite(LED, State);

What is going on here for each loop of the sketch it checks how long the microcontroller has been on, minus the last time the LED was changed, it says that it needs to be greater than the DELAY time (1000) - changes the State of the LED (toggle), and updates the previousMillis.
It looks like a harder way to just blink a LED, but what it’s really shows is that if it hasn’t been at least the INTERVAL time, I can move on and do more code.
So if you wanted to also check a ultrasonic, or move a servo, or check the battery level, you could do all this while still blinking a LED.

Why do we need to know this well because it leads to a more advanced concept called Object Oriented programming.  In the above example, everything is still done inside the loop function. With OOP you set things called CLASSes, DATA, METHODs, and OBJECTs.
A Class is a group of Methods, a Method is a group of code that relates to DATA in the Class. A Object is the “friendly” name for a class (at least that is how I understand it)
We honestly uses these all the time, but most of us don’t know it. Libraries use Classes, this is something we don’t normally see, but we use.
The example I will use is SoftwareSerial (
when you invoke a instance of SoftwareSerial you are making a object that object talks to the SoftwareSerial CLASS.
IE: SoftwareSerial mySerial(RX,TX);
mySerial is the “friendly” name we are using, it can be anything we want - serial2, camera, or whatever.
SoftwareSerial camera(RX,TX); - in some cases just a general object like mySerial is good, and in others it’s nice to know which/or what you are talking to  camera.
Generally you’ll see a comment telling what the object is talking to, so someone can follow what you are doing in your sketch. Sometimes it’s clear and others not so much.
We can create more than one SoftwareSerial object - IE:
SoftwareSerial Serial1(RX1, TX1);
SoftwareSerial Serial2(RX2, TX2);

In this case each object has it’s own set of DATA it can use, IE: it could be 2 different baud rates, or whatever. And the two instances shouldn’t affect the other.
With the SoftwareSerial library, we have a few different methods.;
etc….. Each method in the library is a function that interacts with the SoftwareSerial Class.

What is inside the () for each method call could contain DATA or not.  
The library also uses what is called PRIVATE DATA, this is really more advanced than we need to know right now, but for the most part this is DATA that only the class needs to know, Settings, timing checks, etc.  As a rule we don’t have access to this DATA and only the CLASS can change it.

A library is more advanced that most of us program, someone else has already figured out what needs to be done to make sensors work, or just what timings need changed to add additional PWM or change the PWM, or whatever. They are nice, because it makes life easy, we want to use a I2C device, we include the Wire library, we want to send information over a 433Mhz link, we use the VirtualWire Library. We don’t need to know anything else.

So that is the very basic overview of a library.  Why is it important, well, as I said, we use Object oriented programming now, we just don’t know it.
We can make our own Libraries -

And what isn’t clear is we can make our own CLASSes, They work very much like how we use libraries now, the biggest different is they are contained in the .INO file.  
At one time I read they needed to be at the top of the file, before you declare your variables and include other libraries, I can’t find that now, but I think it’s true.

So, I’m not going to go into too much about some of the Intermediate and Advanced Programming features for the Arduino.  There are literally hundreds of good tutorials on line that can explain some of this much better than I can. But here are some basics Arduino is programmed in C++, C++ is a object orientated programming language.

So what does that mean really?
From Wikipedia:
Object-oriented programming (OOP) is a programming paradigm based on the concept of "objects", which are data structures that contain data, in the form of fields, often known as attributes; and code, in the form of procedures, often known as methods. A distinguishing feature of objects is that an object's procedures can access and often modify the data fields of the object with which they are associated (objects have a notion of "this" or "self"). In OO programming, computer programs are designed by making them out of objects that interact with one another.[1][2] There is significant diversity in object-oriented programming, but most popular languages are class-based, meaning that objects are instances of classes, which typically also determines their type.
Many of the most widely used programming languages are multi-paradigm programming languages that support object-oriented programming to a greater or lesser degree, typically in combination with imperative, procedural programming. Significant object-oriented languages include Python, C++, Objective-C, Smalltalk, Delphi, Java, Swift, C#, Perl, Ruby and PHP.

Well that clears it up doesn’t it -
What it really means is you have a group of things that are all related to each other. (DATA)
It also has something called “Members” this is what to do with the DATA.
When both of these things are together they go into a CLASS.

So if we look something like the BLINK without DELAY sketch again:

int LED = 13;
int State = 0;
long previousMillis = 0; // this will store the last time the LED was updated
long interval = 1000; //this is the DELAY in milliseconds (just like using DELAY)

void setup() {
pinMode(LED, OUTPUT);
digitalWrite(LED, State);

void loop() {
unsigned long currentMillis = millis();
if (currentMillis - previousMillis > interval) {
    previousMillis = currentMillis;
    State = !State;
    digitalWrite(LED, State);

We can make this a CLASS:

Class Blink {
    int LED;
    long interval;
    int State;
    unsigned long previousMillis;
//This is the constructor - and it initializes the members and variables and states
Blink(int pin, long on) {
    LED = pin;
    pinMode(LED, OUTPUT);
    digitalWrite(LED, LOW);
    interval = on;
    State = 0;   
    previousMillis = 0;

void Update() {
    unsigned long currentMillis = millis();
    if (currentMillis - previousMillis > onTime) {
    previousMillis = currentMillis;
    State = !State;
    digitalWrite(LED, State);

Blink led1(12, 1000); //Create a object called led1 attached to Pin 12, with a delay of 1000
Blink led2(13, 1200);//Create a object called led2 attached to Pin 13 with a delay of 1200

void setup() {

void loop() {

So as you can see, the class looks very much like the Blink with out Delay sketch, with a couple of notable exceptions.
There is now something called PUBLIC in this:  This is were the functions we have access to will go.  In this case, we have the constructor (Blink, and the Update function)
In the case of SoftwareSerial some of the PUBLIC functions were already listed.
There is also a PRIVATE constructor, this is a place that only the CLASS has access to. We don’t need any PRIVATE things for this CLASS.

In the above example, just like with SoftwareSerial, we call the Blink class and create a object called led1 and led2, these objects both have 2 variables to them.
and like SoftwareSerial, we use the “friendly” object names to interact with Blink class.

The loop in this example can run very quickly and the class keeps track of both states of LEDs, and the timings used.

What will this do for the BittyBot - well, I re-wrote the drive  sketch, (which showed how to make the Bitty move) into a CLASS, This allows additional code to be ran, while still watching how long the motors are on. I demoed this with a re-write of the Ultrasonic code - If you remember the 1st ultrasonic code would sometimes run into things, the code worked for the most part, but still would at times hit things.  Using the CLASS (which uses MILLIS) and better timings, the ultrasonic rarely hits anything now, it still not perfect, but is much better.
Also using the class I wrote a sketch that can use a Joystick to remotely control the BittyBot.
(actually, there are a few intermediate/advanced programming things beyond the CLASS in those sketches as well)

I plan on doing a re-write of the ESP8266 sketches using the CLASS, while the DELAY for the one sketch didn’t seem too bad, I think it will improve with using CLASS.

HERE are a few (like I said there are hundreds of tutorials) tutorials I found for CLASS, and CLASS with Arduino: (This is the one I used to base my code on, and my example above, it’s not the same as what I did above, but it is what I based it on)

SO CLASS is a fairly advanced  programming concept, but there are even more ADVANCED concepts that the Arduino can do, and you can improve your code greatly if you understand how you can use the timers built into the Arduino for yourself.
It should be noted that making changes to some of these timers can really mess things up too.
Here is a sites I found that explains some of what can be done with timers: (I got more from this site than the one above)

There are other sites that explain it too, most of this is over my head. But it’s a worthy exercise to learn.

Also in the MORE Advanced category:
Using PIN Change Interrupts.  So  we know the Arduino UNO has 2 interrupt pins, that are documented, and easy to use.  However, All of the PINs can be used as CHANGE interrupts.
They are 3 BANKS of pins that can be used, and the trick is be able to figure out which pin in the BANK triggered the interrupt.

A lot of the advance concepts fall not only in the hardware realm, but also in just how powerful C++ is.

Original Document