Wednesday, April 5, 2017

New to Arduino? Recommended Watching

Recently I came across some really good, short videos made by Sparkfun.

They cover a introduction to Arduino from a programming stand point, not a hardware stand point.

Hopefully they do more with some more advanced programming topics but for now:

In no order The videos are:
Arduino Control Flow
Arduino Data Types, Literals, and Variables
Arduino Arithmetic Operators
Arduino Programming Syntax

Tuesday, February 21, 2017

Wicked Devices Nanode with Sketchgarden - How to Flash it to be used as a Arduino UNO



MCM Electronics is selling a Sketchgarden/Nanode board for $10.00.  Unfortunately the idea behind the sketchgarden firmware is long gone.  The board is a older board, but it has a ATMEGA328 and a Ethernet port on it - the headers I believe are not Arduino R3 comparable,  which means that some shield will not work with it, that is still ok.

In order to make the board useful, you have to flash the UNO bootloader on it, because it's a ATMEGA328 and not a ATMEGA328P the usual way to flash the new bootloader doesn't work.

I put together a short (17 min) video of how to flash it, it's not hard to do, but does require some extra steps.






As I said in the video, there isn't a lot of information about the board any more, and here is everything I found and what you may need if you want to flash the new bootloader.

Arduino as ISP
https://www.arduino.cc/en/Tutorial/ArduinoISP

Step 5 & 6 Bootload an Atmega328 by Andy Tallack

https://www.instructables.com/id/Bootload-an-ATmega328/step7/Bootload-the-ATmega328/

Wicked Device Tutorial (Sadly out of date)
http://shop.wickeddevice.com/2013/10/16/nanode-gatewayremote-sensing-tutorial-1/

JeeLabs Ethercard library info
http://jeelabs.org/pub/docs/ethercard/index.html
(This page suggests the CS pin is already PIN 8, the Github repository 
says it's PIN 10, which maybe why I had to change it)
(I think this page is out of date as well)
CS pin is 8 for this board.

Ethercard Library
https://github.com/jcw/ethercard

Friday, January 27, 2017

X-Minus One - A Logic named Joe - My Thoughts.



X-Minus One A Logic Named Joe!



Original a revival of Dimension X, X-Minus was a NBC Radio Drama series, in the early 1950s.
Think Twilight Zone (or The Outer Limits), with no pictures (and arguable worse ideas for episodes).
Actually, if you have been around Sci-Fi at all even if you don't know X-Minus you probably know the stories, many of them were adapted for Twilight Zone, The Outer Limits, and yes even Star Trek re-told some of these stories.  So arguable X-Minus was bad, most of the stories were complete fiction, and really didn't even have any basis in logic or science.
But it was the best kind of bad, with some of todays best Sci-Fi authors being featured,
Issac Asimov, Ray Bradbury, and Philip K. Dick, just to name a few.

For a little more about X-Minus one - https://en.wikipedia.org/wiki/X_Minus_One


A Logic Named Joe original did appear (or I should say was heard) on Dimension X. July 1, 1950 It was reaired under the X-Minus One title on December 28, 1955. And was made by Murray Leinster (Dimension X/X-Minus One adaptation by Claris A. Ross)

This is one of my favorite episodes from the serial, why? Because in 1950/1955 it describes some many things that we have now, thou you might have to warp your brain a little to see it.

A few things to remember (or realize): One of the first digital computers was Colossus in 1943, And the ENIAC was completed in 1946. There were programmable computers before this, The Turing Machine proposed in 1936, and the Z1 in 1936/1938.  The first computer to store a program was in 1949. And the first commercial computer (computer for sale) was the Z4 in 1950. Of course the word computer and computing devices date as far back as the 1600s, but let's stick with a little more modern use of the word. The first computer with RAM was a Whirlwind Machine in 1955.

So why is this history important? Well, you have to remember that at the time "A Logic named Joe" was written, computers were still very new, 12 years old or less, and computers that could store and retrieve the stored information were even newer (or had not yet been made).
Also remember that normal computer terms were not in the every day vocabulary. Also, remember that computers of this era were the size of buildings, the first small computers were in the early 70s or late 60s - and even then I wouldn't call them portable, just smaller than a room.

It's important to remember these things when you hear the story.

So, listen to the story above, and come back to hear some of my thoughts on what is possibly the best Dimension X/X-Minus One story told.

More Information:
https://en.wikipedia.org/wiki/A_Logic_Named_Joe


My thoughts: (All opinion are my own, this is my take on the episode, yours may be different.)

1. A Logic is of course a small desktop style computer, it must be big enough thou requiring a couple of people to carry it, and needing a small truck to move it. But at a time when computers were the size of a building (or at very least a room), it speaks to a time when computers could be "easily" moved.
2. A Logic is in nearly every home. And there are PUBLIC Logic terminals. In today's world, nearly everyone has at least one computer, and libraries have computers for PUBLIC use.  PUBLIC wifi can be found at most business locations, and restaurants. In effect creating a PUBLIC network for computing devices.  So in 1950, the author predicts computers in every home. And the use of PUBLIC terminals. And although or computing devices are quite a bit different (namely in size and shape), we do have PUBLIC access/usage and nearly everyone has at least one computer.
3. A Logic can communicate with other Logics, with a Set of Central Information Repositories.  Today, we have a Global network of computers that communicate with other computers. Without knowing what to call it, and years before ARPAnet (1973) came online - The author was describing the GLOBAL INTERNET. (Just in case you don't know ARPAnet eventually became the Internet we know now, that was early 1990s). There are Central Information Repositories now, in the form of various types of servers, and databases.
4. A Logic looks like a TV with it's knobs replaced with a keys, and a VOICE interface. The logic is even described as being able to replace your TV for entertainment, and used to place video phone calls.  In todays world, it's nothing to get on youtube, netflix, or hulu and watch countless hours of TV for entertainment. Skype, Hangouts, Google Voice, VoIP can all be used to place phone calls, some even video calls. We have Siri, Google Now/Assistant, Amazon Echo, Microsoft Cortanta, all VOICE interfaces. In 1950 a voice interface would have been very hard to do, thou I am sure people studying the computer field wanted it.
5. A Logic uses SPEECH to convey information. By this point you probably see where I'm going here. In fact computer Speech didn't really happen until 1961, even then it wasn't great speech.



Of course today, we have text to speech and speech to text, even speech to speech interfaces, information is effortlessly conveyed using speech.
6. A Logic can rapidly find and correlate information based on your request. Again, I've already touched on this a little, but the most obvious thing to think of is "Google Search". Google is very good at rapidly finding and correlating information based on your search terms. This is all done using various Google services, servers and databases, and all happens in milliseconds.

7. While we aren't quite to this point yet, A logic can put together information in such a way that no-one else has thought of, coming up with new formulas for getting rid of liqueur in your blood, or creative ways to rob your bank, or kill your boss. We do have Artificial Intelligent machines now, that have come up with new ways to think about something, because of how they correlate information. (IBMs Watson a very impressive A.I.)

The author must have either had a very creative mind, or a very logical one to see the direction computers were going as early as it was.

In conclusion, "A Logic Named Joe" holds up very well in today's world, and is one of my favorite episodes of X-Minus One. This is one work that should be updated for a modern audience. (Hint Hint, creative types out there, you know who you are.)

Please feel free to leave your thoughts on this great episode.



It's 2017! and....

Well, here we are again, another new year.  And every year I say "I'm going to post more to my blog." - and well fail at it almost every year.
You know at the start way back in 2010/2011 this was fun, it was new, it was a great way to share information to the masses.
It still is, but now it's 2017 - times have changed, Blogs that aren't fancy don't get a lot of traffic, I've always tried to keep mine simple and just convey some information I find useful.
I don't see any reason to change now (Well except for actually posting a blog).

Over the years things have changed a little - This blog started as just "stuff" I thought about, pretty much random, it slowly changed to information about my robotic projects, and Arduino project - then things to do on linux computers, or linux distros to try.  Finally it ended up back where it started, just on some of my random thoughts.  At one point I consider changing the name of the blog to "Random Wire."  I found out that someone else is using it, so... We will just keep it as the "KD8BXP's Blog"

You'll find (I hope) interesting things about robotics, arduinos, computers, linux, and a few of my random thoughts.  I do post on Youtube a LOT! Probably more than I should, I'd like to try and tied my Youtube following into my blog.  So when I post a project on youtube I will have some documents here for it (Hopefully I follow though with that this year!)

And hopefully this year will be different, and I really start using this blog to it's full potential.

Thanks for following the rant! and have a great 2017.

Friday, November 11, 2016

Using FireFly FireDuino on a Linux Machine.

I just got my Fireduino board (maybe 3 or 4 days ago Nov 7 or 8th 2016), and found it not as straight forward to setup and use in linux as one would think, this is what I learned, and how I got it too work, as well as some other information that you might find helpful if you have this board.


Setup arduino with board manager

Github


Kickstarter

How to disable driver signature in windows 10

Possible fix for linux?
Install rkflashtool from synaptic package manager

Working method for linux:
This error:
/bin/sh: 0: Illegal option --
has something to do with the default shell being dash, not bash in Ubuntu, and Ubuntu based systems.
I found a "fix" for that here -

OK - So Here is the deal - I did get it this to work in linux, without any drivers, but it wasn't as straight forward as it should have been.
Quickly -
I followed the "hold reset", "push upgrade", "release reset", "release upgrade" - then I hit reset again and a serial port does show up (/dev/tyyACM0)
The IDE has to be run as admin (root), (Issue here is, it uses default sets, an you have to add the board back in the board manager)
Next, There are 3 files that need to have the permissions changed.
The easiest way is in the shell
su
cd /root/.arduino15/packages/Firefly/tools/fireduino_tools/1.0.0
chmod 744 rkImageMaker
chmod 744 upgrade_tool
chmod 744 update_tool

This seemed to work for me, I've been able to upload the audio_play_NET sketch, the blink sketch, and a couple others.
I'm using the Arduino 1.6.12 IDE - and this was done on a different linux box, than any of my above posts.

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.
https://en.wikipedia.org/wiki/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.
https://en.wikipedia.org/wiki/Sherlock_Holmes
According to this website:
http://www.pjfarmer.com/secret/chron/chron/chron10-revised.htm
(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.
https://en.wikipedia.org/wiki/Spencer_Reid

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".
http://www.pjfarmer.com/woldnewton/Pulp.htm

"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.
http://www.pjfarmer.com/secret/chron/chron/chron10-revised.htm
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.
http://www.pjfarmer.com/secret/graphictrees/reidfamily1.gif

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.
http://criminalminds.wikia.com/wiki/Diana_Reid
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 (http://www.pjfarmer.com/secret/graphictrees/reidfamily1.gif), 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"
http://www.pjfarmer.com/secret/chron/chron/chron9-revised.htm
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.
 http://criminalminds.wikia.com/wiki/William_Reid

 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() {
Debug.begin(9600);
GPS.begin(4800);
Compass.begin(9600);
}

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() {
Serial.begin(9600);
Serial1.begin(4800);
Serial2.begin(9600);
}

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 (https://www.arduino.cc/en/Reference/Const) for defining constants.


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