Monday, November 27, 2017

Arduino Project One: More about that Hall effect sensor

Well, I've spent my spare time today doing more research into using Hall effect sensors as proximity sensors. Sometimes you just have to know which questions to ask and how to ask them.

It turns out that the SparkFun ACS712 product may be overkill, or else the wrong part for the job. What I really need are a one-dollar sensor and a ten-cent resistor. This article tells how to do it: .

The AH3364Q-P-A, from Diodes Inc.

Better yet, here's a sensor that's all ready to go:

It's available from Digi-key, Newark/Element14 or Amazon for about $14.

I'm going to see if I can bend one of the SparkFun boards to my will, since I already have them. If I can't, then  I'll place an order for the parts I need.

You live and you learn.

To read the other postings about this project, click here and scroll to the end.

Sunday, November 26, 2017

Arduino Project One: A detour into 3D printing

This is a sidebar to the main project thread. This is all about 3D printing.

By the way, as this entry shows, I'm a babe in the woods when it comes to 3D printing, both the software used to create the models, and the procedure to transfer the model to a printer and to print them. Advice from my readers — knowledgeable and useful advice — would be appreciated. Feel free to add a comment.

In my last update, "Lots of Progress", I repeatedly mentioned SolidWorks because I thought it was the only game in town.

SolidWorks, really good 3D design SW by Dassault Systemes


Our local library has two 3D printers. They suggest Tinkercad for casual 3D design work, Sketchup for more serious 3D design work, and Cura LulzBot Edition for printing your design on one of their LulzBot printers.

Tinkercad, by AutoDesk (that's a Raspberry Pi case)
Sketchup, by Trimble, Inc. (this screenshot is from when it was a Google product)
Cura LE (Lulzbot Edition)

Know what? All of those software packages are free. Actually, Sketchup is available in a free and a Pro ($695 - cough) version.

Sketchup has grown up since Google bought it from that little company in Boulder and encouraged people to use it to plant structures all over Google Earth.

So now I have my 3D printing toolpath defined. As with Corona SDK, I'm sort of familiar with the technology from my computer-game-programming days. I'm sure it's come a long way in 12 years, but it's nothing I can't pick up quickly.


Hey! I already have Wings 3D on my computer. It's part of my game-programming toolpath! It can export StereoLithography (.STL) files, the preferred file format for Cura LE. Wings 3D is open source and supported by a huge community.

Wings 3D, a powerful 3D modeler used by the gaming and CGI industries.

I may not need to install any new software to do my 3D designs. We'll see ...


I totally ignored 3D Builder, an app first included in Windows 8.1 and currently part of Windows 10. It looks like 3D Builder is for the casual user, similar to Tinkercad. Most screenshots I've found are for toys and trinkets, but here's a not-so-casual design that looks pretty impressive.

3D Builder by Microsoft, now an integral part of Windows 10

If you don't use 3D Builder, then it and its companion apps, such as Paint 3D, are simply a waste of space on your hard disk. But if they're there and they're free, they may be worth a look.

Searching online for information on 3D Builder, I haven't found anything written about it (I mean, like reviews or tutorials) that is all four of these:
  1. current
  2. serious and useful
  3. written by a serious user, not just a fan or a professional reviewer
  4. offered by a third party (not written by Microsoft or published on a Microsoft page)
I welcome any serious and useful input from my readers, about 3D Builder.

To read the other postings about this project, click here and scroll to the end.

Arduino Project One: Lots of progress


I got to put a lot of time into the project this weekend, and I got some cool stuff done. I ... well, here are two pictures for you, and then the details.

Things glowing in the dark

Lit by a desk lamp - I have to learn to take better pictures.

Hardware fully assembled

I put all the hardware pieces together. In the picture above, you will see the Arduino stack at the top. You've seen this before.

The breadboard has two new peripherals. First, at bottom center is a 16-by-2 liquid crystal display that I found while looking for jumper wires in the Sunfounder Project Super Starter Kit. This LCD can run with either a 4-bit or an 8-bit interface, plus 2 more digital pins for the RS and Enable signals. 

Second, the little red guy on the right is the Hall Effect sensor. When installed, this will be on the other end of a ten-foot long cable, mounted to the lintel.

You will notice a potentiometer on the left side of the breadboard. That's to control the contrast of the display. This is absolutely necessary with an LCD display. In the final enclosure, I'll use a trim pot that can be adjusted with a jeweler's screwdriver, through a hole in the enclosure.

Arduino software (almost) complete

The Arduino program is almost fully fleshed out. It searches for a Wifi router / access point, connects to it, and displays the SSID (the router's name) and its own IP address. Internally it has a list of access points, and cycles through them until it makes a connection.

In case of power failure, the Arduino program restarts, and with any luck the ESP8266 will have saved the connection information from before the power failure. If not, it will take several minutes for the router(s) to reboot, so the ESP8266 will count down 10 minutes on the display and then try again.

Once it has a connection, it starts a TCP server and opens a socket on an out-of-the-way port, to listen for clients. Every ten minutes it pings the router to make sure the Wifi connection is still good. 

That's where things stand right now.

When a client opens a connection to the server, well, that code is still in skeleton form. Before I can finish it, I have to write a client program in Python or C (or Corona!) to exercise the connection. That's one of the next steps.

The display

This was a bit of serendipity. I'd forgotten that Sunfounder kit came with an LCD. This is the standard 16x2 display based on the common ST7066/HD44780 parallel interface. This is a white-on-blue one with not very good contrast, so I'll buy a white-on-black or red-on-black one for the final product. I'd really like an old-fashioned, dot-matrix alphanumeric, 16x2 red LED display, but I haven't seen any of those for a while.

The display uses 4 digital pins for data, and one each for RS and Enable, so it fits within my pin budget.

Incorporating it into the code was a cinch, thanks to the Arduino LiquidCrystal library.

Detour: Who (or what) is "Eorlingas"?

For those of you who already looked it up on the Web, congratulations. For those of you who didn't even have to look it up ('cause you already knew!), I offer you my deepest regards.

For years, every new computer, callphone and game system in our family has borne the name of a fictional horse. When high-speed Internet finally made it to our neighborhood (yes, children, some of us first got our Internet through the phone line - at 2400 bits per second!), we needed a good name for our router, and we chose Rohirrim, the formal name for the Riders of Rohan, from The Lord of the Rings. Since that time, we have worn out or obsoleted four routers, and we're on our fifth one. It's the Fifth Detachment of the Rohirrim, or FifthRohirrim

The architecture of our house is such that the back rooms don't always receive a good signal from the router. I want the router to be hard-wired into our Xbox and our TV, so I can't move it. So, I installed a Wifi repeater in the back of the house. (By sheer coincidence, although I'd love to claim clever planning, this repeater is located about six feet above the garage door opener.) The repeater can't be named after a horse, since it's part of the infrastructure, not a computing device.

"Rohirrim" is an ancient Gondor word. The Rohirrim didn't use that word to identify themselves. In the ancient language of Rohan, they were descended from a king named Eorl, hence they were the Sons of Eorl — the Eorlingas.

I will claim clever planning for that one.

Back on the main road: the Hall effect sensor

I decided to try the ACS712 dev board first, because it has built-in trim pots for Vref and gain. I only had to connect it to 5V, ground, and an analog input on the Arduino. I wasn't happy with its performance at first. The voltage level drifted all around. I finally got it to settle down, but I can't have it drifting like that in real life.

When I finally got it settled down, I used a refrigerator magnet to manipulate it. I got the Vref and gain pots adjusted so that it pegged at 0.0 V without the magnet, and at 5.0 V with the magnet touching the chip.

Some voltage level in the circuit is floating. I don't understand the circuit well enough to fix it yet. Maybe I need to put a load (you know, a resistor) between the two current input pins.

Other than that, the sensor just works without complaint or fuss. Clearly, I have more homework to do before I can use it in real life, but this weekend's results were promising.

It needs a case, an enclosure

I've been thinking about this for a while. I'm going to have to put the Arduino in a case.

All of the Arduino Uno R3 enclosures I've found so far are for just the Arduino Uno R3 board. Once you add a shield to your Arduino, it outgrows the enclosure.

A generic project box might be okay, but it can't be metal, because of the Wifi.

I thought of 3D printing one. I don't know SolidWorks, which I think is what everyone uses, so I'd have to learn SolidWorks. I looked for ready-made 3D printable designs, and the first one I found was, I'm really sorry to say this, ugly

Okay, I just looked again, and there are some better-looking ones out there. None of them solve my height issue, but if I can get their source and manipulate it in SolidWorks or something, then I can take care of that myself.

I also need to include openings for: the LCD, the contrast adjustment for the LCD, and any LEDs I want to make visible.

I think that making the enclosure, and fitting everything in it, is going to be more work than the hardware and software parts of the project. Maybe I'll just use a cardboard box, an X-Acto knife, and clear packing tape. I'm only half-kidding.

The sensor needs an enclosure too

I can't just nail the Hall effect sensor to the beam in the garage. It will be exposed to a rather harsh environment. I may need to 3D print a case for it as well.

Alternatively, I could encapsulate it in potting compound. That would be just as good - but I'd have to find a way to include mounting holes. And whatever I do has to be nonmetallic, or at least nonmagnetic or nonferrous. Hmm. That will take more thinking.

What's next

I've made good progress so far. Here's what I still need to do

  1. Write a TCP client in Python or C, to exercise the server.
  2. Port that TCP client to an Android app, using Corona SDK.
  3. Finish the Arduino code:
    1. Hall effect sensor
    2. Debug the TCP client-handling code
  4. Finish the Android app as well.
  5. Get a real LCD display.
  6. Design and fabricate enclosures for the Arduino stack and the sensor.
  7. Assemble the whole thing.
Other items that come to mind:
  1. Try the breadboard design in the garage before I commit to a final design.
  2. Run Wireshark while the server is running, to see who tries to call my Arduino.
  3. Configure my router to allow passthrough only on the designated port, or from designated clients.
  4. Exercise the challenge-and-response algorithm.
  5. Document the whole thing.

To read the other postings about this project, click here and scroll to the end.

Wednesday, November 22, 2017

Arduino Project One: The Arduino program takes shape


This week, I created the skeleton of the program for the Arduino stack. I'm not ready to share my source code yet. Let me get the rest of the meat on the skeleton first.


I listed some ideas for my cybersecurity scheme last week. I have incorporated all of the measure I listed into my program. I'm sure there's a hacker out there somewhere who will figure it out. My description here isn't meant as a challenge to them. It's just to inform you of some simple things that worked for me.
  1. I've chosen a port number, out of the 65,535 available, that's easy to remember.
  2. The server will only accept client requests from specified devices, and not from the world at large. Although MAC address spoofing is a thing, this will stop all but the most determined hackers.
  3. The server will use TCP instead of HTTP, trading long and legible transactions for short and incomprehensible ones.
  4. The router autoforward will be tweaked so that only TCP requests via the specified port can get through to the Arduino.
  5. The server uses a challenge-and-response mechanism, like two spies swapping passwords. When a socket is opened and the client's authorization is verified, the server sends the client a randomly-generated numeric sequence. The client must reply with the proper numeric sequence. I intend to keep the details of this algorithm proprietary. Sorry, folks.
  6. It may be necessary to have the server go through the challenge-and-response several times in the life of a connection.

Robustness and Reliability

The terms "robust" and "reliable" are not synonymous. "Reliable" means that the system will not fail during regular operation as a result of stupidity — my stupidity, to be specific. "Robust" means that the system can recover from power failures and loss of Wifi signal all by itself, without any human intervention.

When the Arduino is first powered up, or when it recovers from a power failure, it looks through its list of available Wifi routers and tries each one in turn, until it gets a connection. If it doesn't get a connection at all, then it sets a timer for 10 minutes and tries again. This is because it can take DSL modems and Wifi routers a while to recover from a power failure too, so if it doesn't catch one the first time, it gives it time to reboot.

After it gets a Wifi connection, it sets up a permanent TCP socket to listen for client requests. Although client requests are the whole reason for its existence, they're not very frequent, so it will spend most of its time being idle.

Every 10 minutes or so, it will ping the Wifi router, to verify that it still has the connection. If the ping fails, then the Arduino has lost the connection, so it goes through the power-up sequence again.

When a client requests a connection, the Arduino opens a temporary TCP socket for that client. It will be up to the client to send a TCP query every second or so, unless it's sending a button-push command. It's up to the client, whether it's a webpage or an Android app, to politely say goodbye and close the socket when it exits. (I'm sure that Corona SDK and JavaScript include onExit() event servers, or something similar.)

But it's possible for the remote client to just drop the connection - battery dies, phone gets run over, computer blue-screens, that sort of thing. So the Arduino will set a watchdog timer when it opens the temporary socket. Any query from the client resets the watchdog timer (that's called "kicking the watchdog" in Embedded Programming Land). If the client doesn't send a query for a long time, the watchdog timer expires, the Arduino says goodbye to the client in case the client is listening, and then the Arduino closes the socket.


I haven't decided whether to allow multiple clients yet. Normally, only my wife and I will be using the app, and very seldom at the same time. It would be crazily rare to have three people trying to control the garage door at once. Still, it would be annoying for one person to open the app on their phone, and the other person try to open it on theirs, and get the equivalent of a busy signal. So I'll probably have to allow multiple clients.

I haven't put in the actual TCP/IP commands yet. That's for later. 

Sensor and Actuator

I haven't wired up the Hall effect sensor, and I haven't written any code for it. And although I haven't actually connected the relay to the garage door opener yet, I have written the relay code, and I've verified that the relay shield plays nicely with the ESP8266 shield.

What's Next

I'll stick with this program until it's finished. Then I'll need to write a server in plain vanilla C, or maybe Python, to test it. Once the program is finished and it works, I'll post the source code.

To read the other postings about this project, click here and scroll to the end.

Thursday, November 16, 2017

Arduino Project One: Moving right along

I have a lot to report this time. Good things have been happening.

No Corona app yet: More Arduino programming

I didn't write the app on yet. I thought I'd better characterize the Arduino hardware stack a little more.

First, I wrote a little relay demo that turns the relay on and off every second. I needed to find out how easy it was. It's ridiculously easy.

Then I wrote a webserver for the Arduino/ESP8266. I let the thing run open-loop. I tried to access the Arduino's webpage from both my phone and my PC. I was only successful part of the time. I read some online reviews of the ESP8266 shield, and some people complained that it worked once, and never again. Others complained that it didn't have the advertised range. I took two different approaches to this problem.

  1. I modified the SparkFun ESP8266 libraries to print out more information about the clients it was connecting with. I need to know the client's IP address, because other than my own phone and maybe a JavaScript TCP client on my website, nobody should be monkeying with this IoT gadget. I know that full-PC webservers always snoop clients' IP addresses. So I had the Arduino send a command AT+CIPSTATUS to the ESP8266 every time it got a client request, and  log the text of the client request on its serial output.

    After I was finished testing the webserver using the browsers on my phone and my PC, I left the logger running while I did other stuff. HOLY COW! I think that the passthrough is enabled by default on my router. My little Arduino was fielding requests from all over the world. I never did see any IP addresses, but good grief, there's a bunch of nosy machines out there. I couldn't tell if they were humans, spiders, or bad guys. I'll definitely need to use a proprietary port number on my webserver, and I'll definitely need to put restrictions on the passthrough.
  2. I dug up a Coredy E300 repeater/AP/router I've had sitting around for a year or longer, and configured it as a repeater. I plugged it into a wall outlet in the bedroom, almost exactly six feet above the garage door opener. Bonus! This also gives me better Wifi reception in the bedroom and the loft.

Don't give up on the Electric Imp yet

I should mention that this week I got an automated email from SparkFun asking me how I liked my Electric Imp purchase, and reminding me that they were available for tech support and troubleshooting. If I didn't know it was automated, I would have thought they were reading my mind. Or my blog. I will follow up with them on the Electric Imp. It would be cool to get it working.


I noticed a lot of dropped bytes in the Arduino's webserver log. I don't know whether they were dropped between the client and the ESP8266, the ESP8266 and the Arduino, or the Arduino's serial port and my PC's Arduino terminal window. I should try using puTTY for my serial I/O and see if it has the same problem.

In the meantime, that got me to thinking: maybe I don't need a full-blown webserver on this project. I mean, Rick S. wrote an awesome webserver for RLE's products, and I learned a lot from working on those projects, but if the user interface is going to reside on an app or on a protected page at my own website, then all I'll need between the Arduino and the client are as follows:

From the client:
  • connection request
  • response to the Arduino's security challenge
  • garage door status query
  • button push
  • response to the watchdog signal ("Yes, I'm still here")
From the Arduino:
  • security challenge in response to connection request
  • garage door status, either in response to a query or initiated by the Arduino
  • acknowledgement of button push
  • a watchdog signal ("Are you still there?")
I don't need HTTP for that. TCP will work just fine.


I am paranoid about a hacker getting into the Arduino, figuring out what it's doing, and using it to burgle my house. I thought of somehow incorporating a public/private key into the interface, but I don't know if the Arduino supports that. So I'll be taking these other security measures:
  • Using a proprietary port number. There's only 65,535 to choose from.
  • Using TCP instead of HTTP, making for shorter messages which will be unintelligible to anyone else.
  • Only accepting client requests from specified devices, and not from the world at large.
  • Tuning the router settings so that it only passes through requests using that port, and from those devices.
  • Incorporating a challenge-and-response feature. When a socket is opened and the client's authorization is verified, the server sends the client a randomly-generated numeric sequence. The client uses the numeric sequence to compute and send the server a numeric sequence in response. If the client's response isn't what the server expected, then the server closes the socket.
The challenge-and-response feature isn't very sophisticated, and it may not even be necessary, given all the other precautions. We'll see.

The system will still be vulnerable to DDoS attacks. There's not much I can do about that. Everything connected to the Internet is vulnerable to DDoS attacks.

A short hardware update

This week I stopped at Home Depot and bought 20 feet of shielded, round, 28 gauge 4-conductor cable, suitable for this project and others. The final installation of the Hall effect sensor will only need 10 feet.

I'm considering what kind of enclosure to get (or make) for the Arduino stack. It will need to be plastic, or at least transparent to Wifi signals. I'd like to have some status LEDs visible through it. 

Red-on-black LCD display from Sparkfun
Red-on-black LCD display from Sparkfun

I got a wild-hair idea this evening, that it would be good to have a small LCD or LED display on the enclosure, always displaying short status messages. I can start without it, and it's not really necessary, but it would be a nice touch.

To read the other postings about this project, click here and scroll to the end.

Saturday, November 11, 2017

Arduino Project One: Corona hits a roadblock

This project has many different facets, and a lot of new things to learn. Development is definitely not linear. It can go in many different directions simultaneously — and that's a good thing, because some of those different directions run into roadblocks.

The Corona Roadblock

For example, there's nothing that says I have to have the webserver running on the Arduino stack before I start working on the Android app. With that in mind, I concentrated on learning Corona this week. Since I once ran a game programming company, I'm familiar with this genre of software. So it seemed like a safe and comfortable place to go.

I downloaded the Corona SDK and worked through the Getting Started tutorial. The last step was to do a live build, installing a development version of your app on your Android device.

Sadly, it was not to be. When I selected File > Build > Android from the Corona Simulator, I got this error message:
Stupid error message.

I selected Yes, and I ended up downloading and installing Java SE Development Kit 9.0.1 for Windows, 64-bit. (It doesn't give you much choice.) After it was installed, I ran Corona and selected File > Build > Android again. Same error message.

I went to the Corona community forums and found this recent thread, which says that Corona SDK 2017.3135 doesn't support the 64-bit JDK. But a fix is coming, and in the meantime, the awesome Corona staff posted a link to the older, 32-bit, Java SE Development Kit 8u151. The word on the Web is that multiple JDKs can exist on my computer at once, so I'll leave 9.0.1 installed.

Corona's not the only game in town. But I'm comfortable with it, with my gaming background. My son has used it successfully and speaks highly of it. And I really don't feel like downloading, installing, and learning yet another development kit. I already have enough new tools to learn. But I went ahead, and downloaded and installed 8u151.

It works! Back in Corona, File > Build > Android built a .apk file for me.

Then I needed to practice installing it on my phone. The Corona Signing and Building page says that if I don't have the Android SDK installed, I can upload the .apk file to a webserver, then download it to my phone, go to the Downloads directory, and simply tap on the .apk file to install it. However, the Signing and Building page also says that I can use the adp install command to install the .apk file directly.

Two problems arose. First, the debug version of the app was so big that it exceeded (what was left of) my daily limit on my webserver, so detouring through the webserver was out of the question for the day. Second, adb is the Android Debug Bridge, which is part of the official Android SDK, and I inferred from the Corona documentation that adb is rather important.

So even though I didn't want to "download, install and learn yet another development kit," that's exactly what I did. First, I mistakenly downloaded and installed the Android Studio IDE. If adb was part of Android Studio IDE, it was hidden very well. I couldn't find it. Then I looked on the Corona debugging page, and it gave some clues on how to download the command-line-only Android SDK tools. That was a relief — if I had to download the entire Android Studio IDE, why was I even bothering with Corona? So I happily uninstalled Android Studio IDE.

According to the debugging page, I needed to install at least the Android SDK Tools (I had to scroll down to the bottom of the page to find them) and Android SDK Platform Tools. It took some sleuthing to find those links. The adb tool is in the Platform Tools, so I had to make sure I had that one.

I unzipped the downloaded files and stored them in C:\Program Files\Android\sdk-tools, in the subdirectories tools and platform-tools.

For a test, I tried installing the StarExplorer app from the Corona SDK "Getting Started" tutorial. It took a couple of tries to execute the adb install command:
C:\Program Files\Android\sdk-tools\platform-tools>adb install -r "\Users\Ray\Documents\Corona Built Apps\StarExplorer.apk"\Users\Ray\Documents\Corona Built Apps...d. 2.8 MB/s (27069109 bytes in 9.069s)        pkg: /data/local/tmp/StarExplorer.apkSuccess
C:\Program Files\Android\sdk-tools\platform-tools>
Finally it was successful - but then I couldn't find the app on the phone. I looked in the Apps pages, but StarExplorer wasn't there. Then I looked for the /data/local/tmp directory using the My Files app and I couldn't find it.

It turned out that I was being impatient. It just took a while for the phone to update its files. After about 20 minutes, I went back to the Apps pages and I found it. The app ran perfectly on my phone.

To make it a little easier the next time I install an app, I added the paths C:\Program Files\Android\sdk-tools\tools\bin and C:\Program Files\Android\sdk-tools\platform-tools to my PATH environmental variable. Now I don't have to type in adb's entire pathname to run it.

So even though it was a real trip down the rabbit hole, collecting and installing all the tools to build and install the app on the phone, it finally worked.

Corona Does Networking!

On the bright side, I did find out this week that Corona has a network library. Reading the API documentation and looking at some examples, I'd say that this will do the trick nicely. 

So What's Next?

Now I can write the app. Once it's completed, I'll go back to the Arduino. I have to do the following:
  1. get the relay clicking
  2. try out those Hall effect sensors
  3. write the webserver and exercise it from my home network
  4. get my DSL modem / Wifi router to passthrough HTTP requests to the Arduino webserver.
  5. exercise the Arduino webserver from outside my home network

What about Internet privacy?

One thing that I haven't thought about until now: I need to research privacy / security measures for the Arduino webserver. I don't want the whole world to know when my garage door is up or down, and I definitely don't want strangers activating it. Moreover, I don't want someone in Uzbekistan hijacking my Android, turning it into a bot, and using it to mount a DDoS attack on an embassy somewhere.

To read the other postings about this project, click here and scroll to the end.

Veterans Day, Remembrance Day, Armistice Day - always remember and never forget

The poppies at Flanders Fields, a large military cemetery in Belgium. (Image copied, without permission, from

November 11 is a holiday to remember the cessation of hostilities in World War I, which happened 99 years ago. The guns went silent at the eleventh hour, on the eleventh day, of the eleventh month of 1918.

For 20 years, WWI was known as The Great War, and was nicknamed The War to End All Wars. That didn't work, did it?

In 1919, U.S. President Woodrow Wilson declared November 11 Armistice Day, to commemorate the end of WWI. In 1954, it was renamed Veterans Day.

Also in 1919, Great Britain's King George V declared November 11 Armistice Day. In 1931, in Canada, the holiday was renamed Remembrance Day, and is celebrated as such in all countries of the Commonwealth of Nations (what's left of the former British Empire).

Most people, including me, confuse the meanings behind Veterans Day and Memorial Day. Veterans Day is to recognize and honor all of those who have served in the military. Memorial Day is to remember and honor those who died while in military service. (Thanks to Wikipedia for making that distinction.)

Personally, I think we should honor all of them, all of the time.
Today, I recognize and honor the following:

  • COL Edwin French, USAAF, killed 1946 in occupied Japan.
  • SGT Donald McIlveen, Royal Canadian Army, who fought in Italy in 1944-1945 and came home to live a long and happy life.

... all of my friends who fought in Vietnam, too many to name ...

... and these members of the next generation, who either recently served or are still serving:

  • Jason Depew
  • Jennifer Depew
  • Robyn Chalupa
  • Todd Williamson
  • Alisha McKee
  • Van James Walther Jr
  • Chris Barela
  • Casey Barnum
  • Nathan Murphy
  • Heather Hansen's husband, Joshua Hansen 
  • Dustin A Giesick
  • Don Bugg
  • Peter Boone
  • Nikki Yaste and her husband, Alex Yaste
  • Tom LeNeave
  • Ruth Ann LeNeave

... and any friends that I forgot to list.

Sunday, November 5, 2017

Arduino Project One: (Not really a ) Progress Report

For a project with no timetable or deadline, this one is progressing nicely.


I've collected all of the electronics I will need. Here's a picture of them:
The stack in the center includes: the Arduino (this one's an Elegoo Uno R3) on the bottom; the Sparkfun ESP9266 Wifi shield in the middle; and the Evil Mad Scientist relay shield on top. In front of the stack are two ACS712-based Hall effect sensor boards. The one on the lower left is just the sensor. The one on the lower right includes an amplifier and a couple of adjustment potentiometers.

I will need to enclose the sensor in either a block of potting compound, or a 3D-printed plastic case. It will be in a place rather exposed to the elements, and I don't need it to break down at critical moments.

I'll need to either make a 3D-printed case for the Arduino stack, or find a project box that fits it. Since it will be mounted next to the garage door opener motor, it won't need environmental protection, but it will need to be protected from vibration, and it will have to be able to connect wirelessly to my router.

I'll also need to get a power supply (a wall wart) for the Arduino stack, and about 20 feet of 4-conductor 28AWG or 24AWG wire for the Hall effect sensor.

Finally, I'll need to verify that none of the signals used on the Wifi or Relay shields overlap. I fear I may already have a collision with the software serial interface on the ESP8266 and a relay control pin.


The code for the Hall effect sensor, while not exactly trivial, is stuff I already know how to do. I've been doing this sort of thing for years.

I ran through the ESP8266 tutorial, and I can set up the ESP8266/Arduino combo as a very rudimentary webserver. I've successfully communicated with it via a browser. That's all I need on that end.

I found a webpage that tells how to connect the ESP8266/Arduino combo to the Internet, including the critical step (new knowledge!) of setting up forwarding through my DSL router/Wifi access point.

I found another webpage that expands on that, using JQUERY and HTML to control a servo - or in my case,  a relay.

I've installed Corona on my computer, but I haven't played with it yet. I hope there's a tutorial in there that gives me hints on how to create an app that can communicate with the ESP9266/Arduino's webserver.

I need to find something about installing public/private keys on the Arduino to keep this tiny part of the Internet of Things from getting hacked.

That's it for now

By next time, I should have the web server running on the hardware stack, and I should have some preliminary testing completed on the sensors.

To read the other postings about this project, click here and scroll to the end.

Wednesday, October 25, 2017

Arduino Project One: A long-distance garage door remote

Want to keep updated on this project? See the end of this article for a list of all progress reports.


I've enjoyed "hobby computers" for a long time. I have more than one each of Raspberry Pi, C.H.I.P., and Arduino. There are many others out there, but I don't spend enough time with the ones that I have. I have worked through the tutorials, and I have done some breadboard constructions that are rather fun, but I haven't done any serious work with any of them.

Our garage door opener has given us a scare a couple of times in the eleven years that we've lived in this house. Twice, we have come home to find that it was open when we thought it was closed. The first time, a large lime against the door frame on one side caused the door opener to reverse, lest the closing door squish the lime. The second time, the door forgot where "closed" was, touched the ground, and opened again. Why did it forget? It could have been the house settling, the concrete heaving, or something slipping in the door opener mechanism.

After the incident with the lime, I started getting paranoid about the garage door. Don't tell anybody this, but I have driven two miles back to the house, just to drive past and make sure the garage door was really closed.

Finally! I have a great idea for a hobby computer project! I will build a web-based garage door sensor and actuator. I'm sure it's never been done before! I'll commercialize it and make millions!

Research on the State of the Art

Actually, in the world of hobby computers, I'm a few years behind. A Web search for "Arduino garage door" shows how many people have already done it.

Moreover, in the world of commercial, web-based, garage door sensors and actuators, I'm way behind. Here's a kit for only $120 from Overhead Door (or Genie).

I don't care. I'm going to do it anyway, just because it's fun.

Basic Design

So here's a basic design. TODO: Insert a graphic, a block diagram of the system.

- Arduino
- Wifi shield
Either a tiny webserver on the Arduino, or some executable code on a private webserver
Browser-based interface
Android app

Now for the details:


A garage door can have three states: fully open, fully closed, or moving.

No, a garage door can have five states: fully open, fully closed, opening, closing, or stopped in the middle.

That's too much work. How are you going to keep track of all of that? You could put a shaft encoder on one of the rotating parts of the opener. That would let you tell if it was opening, closing, or stopped — but not whether it was fully open or fully closed. That's three states, but not the two that matter most.

One solution online was to use two powerful magnets and a Hall effect sensor, with the magnets positioned on the drive chain exactly where "fully opened" and "fully closed" should be. That allows the garage door to have three states: fully open, fully closed, or somewhere in the middle and presumably moving.

A one-button controller for a garage door opener works like this: press the button to start it moving. Press it a second time to stop it moving. Press it a third time to start it moving in the opposite direction. The door opener stops automatically at the fully open and fully closed settings. This takes us back to the five states.

How about we simplify the problem? I only care whether the door is or isn't fully closed. If it's not fully closed, then it's moving up, moving down, fully open, or stuck in the middle, and I don't care. Those all count as not fully closed — or open.

I already know that a photosensor and reflector wouldn't work reliably at our house. The photosensor might get confused by the sun's glare on summer mornings.

I could mount some kind of sensor (magnetic, photovoltaic, pressure) flat on the concrete, and the door would come down flat on top of it. This might not work in the winter, when we get a layer of ice on top of it.

I could mount a 3D linear accelerometer on the top panel of the door. When that panel goes completely vertical and stops moving, then the door is closed. I like this idea! But the accelerometer has to have some way to communicate with the computer, and it's attached to a moving door. 

Reed switches. Mercury switches. Mechanical things wear out. What if there were a mechanical switch that doesn't wear out? My pilot son had a great idea.

Aircraft have a switch built into the landing gear, called a squat switch, or a weight-on-wheels switch, which tells them when the aircraft is solidly on the ground. Some things in the aircraft, you don't want to have happen until the plane or helicopter cannot fall out of the sky. These switches are, by necessity, extremely robust. A squat switch will tell you whether the airplane is or isn't on the ground.

Where to mount the switch? Well, when a garage door closes, the top of the door is pressed flat across the lintel of the door frame. (The lintel is the horizontal part across the top. The vertical parts on the sides are called the posts.) When the door starts opening, the top of the door is pulled away from the lintel, and no other part of the door touches the lintel. So the lintel seems like a good place to mount a squat switch.

Now I just have to get one. My son, the pilot, is finding a source for me.

After thinking about it overnight (no wonder I didn't sleep well!) I realized that the location for the squat switch — top of the door, top center of the lintel — is also an ideal place for a magnet and Hall effect sensor. So if the squat switch ends up being expensive, I'll go back to SparkFun for one of their ACS712-based Hall effect sensor boards.


The garage door opener is an Overhead Door SilentMax 4040. Installed by Yours Truly eleven years ago, it works as well as the day I put it in. Its rubber belt drive is almost completely silent, especially after I lubricated the belt with a thin spray of white grease a few years back.

The SilentMax 4040 has a wired remote on the wall of the garage, with two buttons: one for the door, and one for the light. Only two wires go into the opener itself, so the wired remote must do something to differentiate between the DOOR button and the LIGHT button. And it does. Here are the pertinent details:

  • With no buttons pushed, a 4.1Vdc difference exists between the terminals on the opener.
  • Pushing the DOOR button shorts the two terminals, so there's a 0.0Vdc difference for around 200 ms.
  • Pushing the LIGHT button doesn't short the terminals, but engages a voltage divider, so there's a 2.76Vdc difference between them.
Since I don't care about the light, I can just have the computer switch a relay. 
Anyway, I'll need to attach a relay to the same terminals used by the wired remote. The computer will switch the relay, which will duplicate the action of the remotes.


A Raspberry Pi or a C.H.I.P. would be overkill for this project. You don't need Linux to open and close a garage door. I'll use an Arduino. In fact, I'm going to go really old-school and use an Arduino Uno. I have two to choose from: a Redboard from SparkFun; and an Uno R3 from Elegoo. I should be able to run the same program on both boards. I'll try the Elegoo first. It's brand new, and I want to try it out.

The Arduino has general-purpose digital inputs and outputs that will work just fine for the sensor and the relay. I'll need to add a transistor to the relay output, and perhaps an op amp or other buffer to the sensor input.

For Wifi capability, I have two choices from SparkFun: either the Electric Imp, or the  ESP8266. Both solutions are versatile enough that someone smarter than me could figure out how to use the Electric Imp or ESP8266 by itself, without the Arduino, to do this project. I'm not that smart. Both solutions come in either an Arduino R3 shield form factor, which is ideal for my Arduino Uno boards, or in a smaller "breakout" board. I ended up buying both.

I tried the ESP8266 shield first. It worked the first time I powered it up.

I tried the Electric Imp next. It didn't work. That is, I couldn't get it to connect to my Wifi router. The setup requires you to download an app to your tablet or smartphone, power up the Electric Imp, hold it next to the phone screen, and run a function on the app which transmits your Wifi router information to the Electric Imp by strobing the phone screen into a light sensor on the Electric Imp. When the strobing is completed, you're supposed to wait up to 90 seconds for the Electric Imp to connect to the Wifi router.

Wouldn't it be simpler just to set up a serial connection to the Electric Imp and type in the SSID and password manually? It would certainly make troubleshooting easier. The concept of the Electric Imp is intriguing, but if I can't make it work, what use is it?

Since I'll be using an Arduino and a Wifi shield, and one can stack an infinite number of shields on an Arduino (as long as the pin assignments don't conflict), I bought the Relay Shield from SparkFun. I will stack it on top of the Wifi shield - or maybe the Wifi shield should be on top. We'll experiment.

The hardware as of 26 Oct 2017 (rawr)


My first implementation will use a webserver. This could be a mini-webserver on the Arduino, or on the Wifi board (like I said, they're both versatile enough to handle it), or on a private server. All three are viable options right now.

I should probably use a port, for a couple of reasons — the main one being that it gives me some security, however weak. How many low-level hackers are going to be trying different ports?

For the sake of security, the webserver will require some kind of authentication. This is important so that some random hacker doesn't spend all day running my garage door up and down for his own amusement. This could be as simple as a login and password. 

In the long term, I'll also want some kind of security between the webserver (if it's remote) and the Wifi. One of the prior implementations used a dual challenge and response: the server sent the host a hashed number, and the host then replied with the unhashed number. If the number was correct, then the host sent the server a hashed number, and the server had to unhash it and check it. I dunno yet. I'll figure this part out later.

The basic procedure will go like this:
  1. Requester sends authentication; host accepts or rejects it.
  2. Host queries the Arduino for the current status of the door.
  3. Arduino checks the sensor and replies to the Host.
  4. Host tells door status to the requester.
  5. Requester pushes the button to start or stop the door. (Or exits, if they're satisfied with the status.)
  6. Host sends the Arduino the "button" command.
  7. Arduino energizes the relay for 200 ms.
  8. Host queries Arduino once per second, for as long as the requester is logged in or the app is open.
  9. Requester exits the app, Host and Arduino go idle.

Browser-based interface / Webpage

The browser-based interface will be as follows:
  1. Welcome screen: login, password
  2. Main screen
    1. Status indicator: green and "open" or red and "closed".
    2. A big button, labeled "Push this button" or something like that.
    3. A smaller "Exit" button.
    4. An even smaller "setup" button - to specify the Wifi's IP address.
  3. Under the hood
    1. Queries the Arduino once a second.
    2. Sends button pushes to the Arduino.

Android app

The Android app would do basically the same thing as the browser-based interface, without the need to login. Well, maybe - as a security precaution, in case the phone is stolen.

Software Tools

The Arduino is programmed in its own dialect of C. The ESP8266 is controlled using good ol' AT commands. The Electric Imp is programmed in a C-like language called Squirrel. The webserver could be JavaScript, perl, or who knows what else?

For the Android app, I considered using Xamarin, but I didn't want to get trapped in the Microsoft tar baby, so I'm going with Corona. It's advertised as a 2D game engine, but it's much more powerful than that. I've used game engines before, and I know what they can do. Besides, I can get some expert help with Corona.

Proposed Enhancements

I've seen people connect spy cameras to hobby computers. I'd like to connect a camera to the Arduino or the ESP8266, and have a tiny picture of the garage door on the main screen.

I need to measure the time it takes for the garage door to close. If the door status is "not closed" and someone pushes the button, the door status should changed to "closed" in a reasonable amount of time. If it doesn't, then the status should change to "there's a problem".

I'm not afraid of a more complicated state machine. With the right sensors, I could incorporate all five states. I'll try other sensors, if I can figure out how to make them work &mdash and if they're reliable.

Not that it affects the basic functionality of the machine, but I'm going to have to do some graphics work to create the objects that make up the app. Call me old-fashioned or steampunk if you will, but I still enjoy the skeuomorphic user interfaces that Apple and Microsoft used to use and have since abandoned. My app is going to have a couple of old-fashioned indicator lights mounted in chrome or bronze bezels, a 3D push button bigger than a fingertip, and a black leather (or black crackle-finish or black powder-coated metal) background.

Project Timetable

There isn't any timetable. This is a hobby, a just-for-fun DIY project. But here's a list of milestones as they occur.

25 Oct 2017 First draft of this project plan is written. Happy birthday!
26 Oct 2017 Added details about the Wifi shield and relay shield from SparkFun.. Added details about the wired remote.


I ended up posting each update as a separate article. Here are the rest of them.

Saturday, October 21, 2017

John Kelly, you have disappointed the nation.

John Kelly, you were one of the last people in the White House that I respected. Now you're just like all the rest of them: a big fat liar.

That was the short version. Here's the medium-length version.

I listened to MSNBC's "All In" on the radio yesterday. Chris Hayes is the host.

Chris Hayes played John Kelly's entire talk to the press, where the White House chief of staff told, in detail, the story of Florida Congresswoman Frederica Wilson's speech at the 2015 dedication of a new FBI building in Miramar, Florida. He told a convincing story about how she had spent her time at the podium taking credit for the building, and how she had personally gotten a $20 million commitment from then-President Barack Obama to build the building. According to Kelly, her whole speech was about herself and how great she was, especially for bringing the pork home. In his words, "... we were stunned." The gall of the woman's ego and self-promotion was beyond — well, beyond almost anybody in modern history, except perhaps Donald Trump.

Well, the Florida Sun Sentinel had dug up a videotape of that dedication ceremony, and All In had obtained a copy of it. So Chris Hayes played Congresswoman Wilson's speech, in its entirety. She told a story about how, four weeks before the dedication, the FBI had approached her and asked to have the building named after two FBI agents who had been killed in the line of duty. That literally takes an act of Congress, and so Wilson talked about how she had contacted the leadership of both the House and the Senate, and gotten that act of Congress through in record time. There was nothing "stunning" about it. She spent the rest of her speech praising the FBI, law enforcement and first responders in general, everyone involved in raising the building, and her colleagues in Congress for helping to get the building named.

She didn't say anything that John Kelly had accused her of. She bragged a bit about rushing that bill through Congress, but it was a fun story, and she gave credit to all of the other players.

As for the $20 million from President Obama, Wilson pointed out to reporters this week that the $20 million was appropriated by an act of Congress in 2009, and she didn't get elected to Congress until 2011.

Everything John Kelly said about her was a lie. Everything.

The long version? If I'm able to find a transcript of Kelly's words and one of Wilson's speech, I'll add them to this post so that you can read them for yourself.

Friday, October 20, 2017

An inside joke for an audience of one

I talk to a lot of people on my morning commute. I talk to the DJs on the radio. I talk  to the texting app on my phone (guilty as charged, yer honor). I talk to my car. I talk to the traffic lights, especially the red ones. I talk — politely, of course — to the other drivers on the road. And I talk to myself.

I have fun conversations with myself. Sometimes I even make myself giggle.

For example, this morning I was coming up behind and to the left of a VW Beetle that was stuck behind a slowpoke in the right lane. I said, "Come on over, bud, there's room for you." Then I said to myself, "Actually, that's Bug, not bud."

It was an inside joke for an audience of one. The audience liked it. I thought that you might like it too.

A QUESTION FOR YOU: What do you talk about, when you're alone in the car?

Monday, October 9, 2017

Looking ahead to 2020

Every day with President Donald Trump is a new disaster. We try to distract ourselves with hurricanes, earthquakes, mass shootings, and a trust-fund baby juggling nuclear missiles, but Trump is like the guy at the party who manages to insert himself into every conversation in the room — and ruin it.

If the USA were a publicly traded company and he were the CEO, the shareholders would have kicked him out by now. Too bad it's not that easy to get rid of the Chief Executive of the United States.

It's clear now that electing him was a disaster. Don't worry, if Clinton had gotten elected, we would be saying the same things about her. The 2016 election was a lose-lose proposition.

What can we do to make sure the 2020 presidential campaign doesn't go the same way?

Well, this article on NBC News got me thinking about 2020. The second-to-last paragraph says:

Late last month, [retiring Tennessee Senator Bob] Corker announced that he would not see[k] re-election, fueling speculation that he might challenge the president in a GOP primary. 
Unencumbered by the need to watch his mouth and make sure he gets re-elected to the Senate, Corker has been speaking his mind. Speaking truth to power. Calling out, repeatedly, that the emperor has no clothes. Using his bully pulpit to stand up to Trump and Co.

I don't know, he's starting to sound downright presidential. He would be a better president than Trump.


After Vice President Pence's little rehearsed stunt at the Colts-49ers game yesterday, I'm starting to believe Corker would be a better president than Pence, too.

If you want to read about Pence's stunt, Google "Pence walks out". Every link I found was biased one way or the other. Read multiple sources to get a balanced view. But it was rehearsed. It was a stunt — a rather expensive stunt.. And if his airfare and hotel were paid for by the U.S. taxpayers, then shame on him. I used to respect Mike Pence.

About Pence's stunt, the great Tom Peters tweeted:

Wonder if POTUS gave VPOTUS a "good puppy" dog buscuit after yesterday's scripted showboating episode?


If Bob Corker is serious about running for president in 2020, then he needs to start now building a few things:
  • A team - an organization.
  • A "base". Trump and Clinton have made this a dirty word, but it's still necessary.
  • A platform - a statement of what he believes in, what he's running for.
  • Knowledge.
  • More name recognition.
  • Credibility.
  • Likeability.
  • Even more visibility.
  • Popularity. It shouldn't matter, but every election in the past 100 years (longer?) has proven that it matters bigly.

This year, the Mormons have proven to be faster and more effective than the federal government when it comes to disaster relief. Witness the responses to hurricane Harvey in Texas, Irma in Florida, and Irma and Maria in Puerto Rico (and the U.S. Virgin Islands), and the earthquakes in Central America. LDS Welfare Services started shipping supplies, in their own trucks, even before the hurricanes hit. Local and global LDS leadership was on the ground even before the rain stopped falling. Thousands of LDS volunteers were organized and working hard, in force, before the feds ever showed up. Maybe it's time we put a Mormon in the White House?

I don't know if Mitt Romney wants to give it another try, but I think it's pretty clear that he would have been a much better president than the current occupant. If not Mitt Romney, then how about Jon Huntsman Jr., the statesman, businessman, and diplomat?

But don't vote for Huntsman — or against him — just because he's a Mormon. Vote for him because he's a good man.


I wouldn't mind if the 2020 election turned into a race between two great women — for example, Condoleeza Rice and Madeline Albright. Come on, people, this is the 21st Century. There must be some viable options besides white, allegedly Christian, males.

And there are definitely viable options besides Democrats and Republicans. If enough people opened their eyes and had the courage to vote third party, we would break the duopoly these parties have on the presidency, a duopoly which has proven to be unconstructive, easily corruptible, self-serving, and unfortunately, self-perpetuating.

I don't care if the next ideal candidate is Democratic, Republican, or Pirate Party, as long as it's a person of maturity, integrity, wisdom and vision. All of the above. In no particular order.

Wednesday, September 27, 2017

Time to refocus

My very wise friend, Jenny Willhouse Peterson, wrote this:

Time to refocus.

Things that are of critical importance to the health and wellbeing of millions of Americans today: conditions in and aid to Puerto Rico, healthcare vote. And Russia. Keep that one pinned to the top too.

Things that are thrown out there like chum to keep you divided and distracted: NFL shenanigans. It wasn't this much of a row before someone twisted the message to work everyone into a lather.

You're smarter than this. Focus. Love. Support. Unify.

I hope Trump will be remembered for this

When the history of this decade is written, I hope people will remember that while Puerto Rico was struggling in the aftermath of a Category 4 hurricane, President Donald Trump spent four days obsessing over professional football players who wouldn't stand during the playing of the National Anthem. Not until nine days after the storm hit, did he start taking any action to help Puerto Rico, and even then he spent way too much time patting himself and his buddies on the back and not really doing anything.

I know he's planning to visit Puerto Rico more than two weeks after the storm hit the U.S. territory, but:

1. I think he's being forced into it. His advisers are making him do it.
2. He really doesn't care about Puerto Rico. It's not on his radar.
3. The whole time he's there, he will be thinking, "Why am I doing this? This is a waste of time. And this place is a dump. Let's get out of here."

What this country needs

What this country needs are more radical moderates. Alt-independents. Conservative liberals. Liberal conservatives. People who think with their whole brains, and love with their whole hearts.

And you can quote me on that.

Friday, September 15, 2017

Short Thoughts on a Woman as President of the U.S.

Following up on something I said in my previous article:

To put it more bluntly: American voters aren't against electing a woman president. But they are against electing Hillary Clinton.

Let me elaborate. As I said in the article, "come on, people, it's 2017." Except for a few on the radical right (the remaining 8% of Americans who still support Donald Trump?), we don't live in the Stone Age anymore, and the idea of a woman as president is not only okay, but it's plausible - maybe even inevitable.

I would consider voting for someone like Condoleeza Rice or Madeline Albright, but not Hillary Clinton. To the best of my knowledge, Rice and Albright are not as blatantly greedy or power-hungry as Clinton. They are not rude, whiny, condescending or snobby, while Clinton is all of those things. They do not have the serious credibility or trust problems that Clinton has. They're not as full of themselves as Clinton is of herself. And they enjoy more respect (and credibility!) in both domestic and international circles of power than Clinton does.

Now, to those of you who will accuse me of holding a woman to a different standard than I would hold a man: first, notice that in the previous paragraph, I compared women to women. Second, perform a quick test by replacing "Clinton" in the previous paragraph with "Trump". See? Not a different standard at all.

Thursday, September 14, 2017

No, HIllary Clinton, You've Got It All Wrong.

I'm going to put the concluding paragraph of this article at the beginning. If you don't read anything else, read this:

Nowhere in What Happened will you read these words, "I understand now. The America people didn't like me because I was a thoroughly unlikeable and immoral person who made it very clear that I was only in it for myself - well, for the power and the wealth." But that's the truth, and that's the bottom line.

Now, if you're still interested, you can read the article from top to bottom.

Hillary Clinton is making the talk-show rounds, plugging her new book, What Happened, which is a very whiny and self-absorbed analysis of why she lost the 2016 presidential election to Donald Trump.

No, I haven't read the book. But I've heard a lot of the interviews — too many. Clinton's main contention is that it's everybody else's fault that she lost. Here, in no particular order, are my observations on her comments. Please note that I'm not citing any polls or news articles to support my assertions. I don't feel like doing that today. If that hurts my credibility, tough. Clinton and her election opponent, Donald Trump, did (and do) the same thing.

1. I agree that the Russians were undoubtedly involved.

2. I agree that James Comey's bumbling undoubtedly played a part.

3. Point 2 notwithstanding, I don't think the emails themselves had anything to do with it. But Clinton's attitude, that she could do whatever she wanted and that she was above the law, had a lot to do with it.

4. Trump's charisma, and the voters who were deceived by his charisma, played a big part. Hillary Clinton has never had charisma. See also Kennedy vs. Nixon, Bill Clinton vs. anybody, and Reagan vs. anybody. Charisma wins votes.

5. I disagree that sexism (or misogyny, a stronger word) played a big part. Come on, this is the year 2017. Sexism may have played a part in the right-wing fringes of the Republican Party, but I don't think it played as big a part with the general electorate as Clinton says it did. I think that the majority of Americans are not opposed to a woman as president. After all, we've witnessed successful female heads of state in Great Britain, Germany, India and Israel, to name only a few, but those women were (and are) great leaders and, ahem, statesmen. Clinton's not even in the same league with them.

5a. To put it more bluntly: American voters aren't against electing a woman president. But they are against electing Hillary Clinton.

5b. Do you remember, "Who wants to see a woman president?" Clinton herself shouted this from the podium at a rally, at the beginning of the primary season. She got an overwhelmingly positive response. There's no difference between "Vote for me because I'm a woman!" and "They didn't vote for me because I'm a woman." She was not above using sexism to her own advantage.

6. And point 5a, of course, brings up the Electoral College. She can blame that antiquated institution for her loss, but hey, the Republican side knew how to play the game, and they played it very well. She could have done the same thing. She chose not to. That's her own fault, and nobody else's.

7. Simply put, the American people didn't like her. They thought she was devious, manipulative and underhanded. They thought she was greedy and dishonest, exemplified by the Clintons' looting of the White House when they left it in January 2001. They thought she was self-centered, mean, petty and cruel, especially to those in subordinate positions. They thought, accurately, that she wanted the office of President just so she could collect more power and wealth for herself.

8. Who can forget:
- "I could have stayed at home and baked cookies," her disenfranchisement of half of the electorate in the country;
- "I will do whatever it takes to get elected [president]," justifying her campaign for the U.S. Senate;
- "What difference does it make?" her handwaving dismissal of the Benghazi debacle/tragedy;
- "Get the @#$%* away from me!" to her Secret Service escorts;
- and many other condescending, insulting, dismissive, or imperious remarks? To mix metaphors, she opened her mouth and shot herself in the foot, over and over again.

9. She was married to Bill Clinton. The country still hasn't forgiven him, and they still think she was complicit in some of his debauchery. This may not be fair, but it's real.

10. Many of you will reread point 7 and say in Clinton's defense, "Hey, you can say all these same things about Trump," and you will be right. Everything I said in #7 about Clinton can be said about Trump (except, maybe, looting the White House). Donald Trump was just as bad a choice for president as Hillary Clinton. I've already talked about that, in this article and this article, for example. Neither of them should ever have won their party's nomination, let alone the general election.

Nowhere in What Happened will you read these words, "I understand now. The America people didn't like me because I was a thoroughly unlikeable and immoral person who made it very clear that I was only in it for myself - well, for the power and the wealth." But that's the truth, and that's the bottom line.

Monday, September 4, 2017

Donald Trump is Nothing But a Mean Old Man

Donald Trump is a mean old man. Nothing more.

In June 2015, I had declared Donald Trump an idiot.

In October 2016, during the height of the election season, I declared that he was a lot of other things, none of them very good. And I meant every word I said.

More recently, I had come to the conclusion that  he was an infant and a jackass.

Last Thursday, I declared that Donald Trump is an impostor.

Well, now Donald Trump himself has revealed that he is nothing but a mean old man.

Yesterday, on a Sunday in the middle of a three-day weekend, the White House announced that Trump had "decided" to end the immigration policy known as "Deferred Action for Childhood Arrivals," or DACA. This policy, instituted by Trump's predecessor, Barack Obama, in June 2012, gave hope to the children of illegal immigrants — children who didn't choose to come here, in the legal sense, but came with their families. DACA was a way to give them hope that they could build a future in this new country — the only country they had ever known, and the place that they considered home.

Donald Trump is not doing any good by canceling this policy. Nor does he care that he is making innocent people suffer.

Trump did not take this step to Make America Great Again, because this does not make America great. It makes America small, petty, and mean — just like its chief executive.

He did not take this step to secure our nation's borders. It has no impact at all on national security.

He took this step because he's trying to fulfill at least one of his campaign promises, and he hasn't had a lot of luck so far.

He took this step as part of his (unwritten) policy to undo everything that President Obama did, good or bad.

And he took this step to solidify his standing among his so-called base. (According to Time magazine, that's only 35% of Americans, and the number is falling. Can't Trump do math?) Donald Trump's base has shrunk to the point that it now includes only the baser elements of American society: the racists, the neo-Nazis, and the right-wing extremists. Oh, and closed-minded, two-faced hypocrites.

If you knew any of these so-called Dreamers personally, you would feel the same way I do.

Twelve years ago, I taught mathematics to some of these children, first in English, as state law required, and then a second time in Spanish, so they could understand and learn.

Six years ago, my sweet wife taught literacy, English, to some of these children. One of them, a young girl, had to skip school every Wednesday to help her parents work in the fields.

Some of these children have now graduated from college. The rest of them have found honest jobs. They have become contributing members of American society. They pay taxes, Social Security and Medicaid/Medicare. They are marrying and raising families of their own.

Where is the justice in sending them back to a country that they don't call home? Where's the fairness? There isn't any.

Let's hope that Congress has the courage and the will, to do something to ward off the damage this "decision" will cause, before it takes effect six months from now.

Please feel free to share this article - I won't consider it copyright infringement.

UPDATE: Tuesday, September 5

So, Trump had his attorney general, Jeff Sessions, give the official announcement this morning. Sessions wrapped it all up in pretty little legalese justification, inventing the word "effectuated" to help him get his point across. But according to MSNBC, a metric trainload of legal and constitutional scholars have rebuffed every point Sessions tried to make, including the most important assertion, that Barack Obama's executive order memorandum, setting up DACA, was illegal.

Then Trump tweeted something to the effect of "Get to work, Congress! You have six months." First of all, he's still laboring under the impression that he's the boss of Congress, and second, he's using an ultimatum again, one of his favorite negotiating tools. Ultimatums are stupid. What do you expect?

Finally, tonight, the Daily Beast reported this:

President Donald Trump said Tuesday night that if Congress cannot pass a legislative fix for the Deferred Action for Childhood Arrivals (DACA) program that his administration scrapped, he will “revisit” it. “Congress now has 6 months to legalize DACA (something the Obama Administration was unable to do). If they can't, I will revisit this issue!” Trump tweeted. He declined to offer specifics on what “revisiting” would entail. 

Vague threats like this are another one of Trump's negotiating tactics. To bring this article full circle, he sounds like nothing as much as a mean old man, like a grouchy neighbor.

Thursday, August 31, 2017

Donald Trump is an Impostor

Donald Trump is an impostor. Donald Trump is a fake.

At one time, I admitted that I might be wrong about Donald Trump, and that it was possible that he was nothing more than a braying jackass.

As his presidential term lurched forward, I changed my mind, and thought of him as little more than a bawling infant.

I've changed my mind again. Just like Frank Abagnale in the story Catch Me If You Can, Donald Trump is nothing more than an impostor. A total fake.

Donald Trump has demonstrated, repeatedly, that he doesn't have what it takes to be president of the United States. He has no leadership ability. He has no morals. He has no empathy. He has no courage. He has no integrity. In place of depth, he has shallowness, an appalling superficiality. In place of knowledge and wisdom, he has willful ignorance and selfishness.

He has no talent. Okay, let me amend that: he has whatever talent it takes to be a unscrupulous, unprincipled real estate tycoon.

And all along, every time he opens his mouth — or Tweets — all I can think is "Jeez, what an idiot". The "idiot" theme spreads over all of my other opinions of him, like gravy covering everything on the plate at Thanksgiving.

The 30-something percent of Americans whom he is still fooling? He doesn't care about them. They don't realize the utter contempt in which he holds them.

It still astounds me that he made it into the White House. I didn't vote for him.

Insert picture here: If I could, I would post a picture here of protestors at an airport, waving huge signs saying "GO HOME TRUMP", "TRUMP IS A FAKE" and "GOOD RIDDANCE", as Trump's private jet lifts off in the background, carrying him back to ... well, to anywhere. Away from Washington D.C.

Update, 4 Sep 2017: Actually, Donald Trump is a mean old man, and nothing more.

Wednesday, July 5, 2017

Five out of six Democrats and Republicans are stupid

Okay, I've seen two news articles lately with polls like this. These poll results are powerful indictments of the stupidity of the majority of Republicans, and the majority of Democrats.

Here's one example, but it's only an example. Don't get hung up on it. This is a poll that asks people "Whom do you trust more: Donald Trump, or CNN?"

I saw a very similar diagram last week, for a poll that asked people something like "Do you believe in the Trump-Russia collusion connection?" and I've seen similar diagrams for the health care bill, Supreme Court nominees, James Comey's firing, and so on. Let's paint a generic picture of the results of these polls:

Now, I'm going to use some math here. If you're not very good at math, that's okay. You may have a lot in common with the majority of the people I'm going to talk about here. And if you're offended by my condescending attitude, that's your problem, not mine. Don't look here for an apology.

Let's dissect that figure above. First of all, look at the line marked "Independents". These are people who vote, but who don't consider themselves Democrats or Republicans. Most of them don't identify with any political party - not because they're politically apathetic, but because they prefer to do their own research and weigh the pros and cons of an issue (or a candidate) before making their own decision. The party line does not exist for them.

So you can use the statistics on the Independents as a bellwether: politically, they're atheists, logical, dispassionate, and not swayed by labels like red/blue, liberal/conservative, or Democrat/Republican. In this example poll, you can see that 40 percent of the independents lean pro-Trump on the issue, and 55 percent lean anti-Trump. Let's round that 55 percent up to 60 percent, to make the math easier for this example.

(Those of you who don't understand math and statistics may cry "Not fair!" at my rounding. Relax. 40 vs 60 is being kind to Mr. Trump. I saw a poll in June, where 30 percent of independents leaned pro-Trump and fully 70 percent of independents leaned anti-Trump on the question being asked. How about I use 30 vs 70 instead? No? Then stop whining.)

Now, I'm going to propose a theory. I think that political parties are composed of two kinds of people. One kind actually thinks about an issue or a candidate before they make a decision or form an opinion. The other kind always toes the party line. They only need to know what the party line is - no thinking required.

I'm going to pose a second hypothesis. I have nothing to base this suggestion on, other than my belief in the basic goodness of people, and humanity's natural gifts of logic and reason. I'm going to suggest that, if only the thinking Democrats AND the thinking Republicans were polled, their split would be very similar to the Independent results, as shown above.

This means that it takes some independence of thought for a Republican to lean anti-Trump, or for a Democrat to lean pro-Trump.

So let's give those 9% of Republican respondents who leaned anti-Trump credit for thinking for themselves. Using the 40/60 ratio from the Independents, let's also give 6% of the Republicans credit for using their heads, thinking it out, and coming out pro-Trump.

What does that say about the other 83% of Republicans, the ones who voted the party line without bothering to think? It says that they're stupid.

Is stupid too strong a word? How about sheep? Blind followers? Willfully ignorant?

On the Democrat side, let's give those 5% who leaned pro-Trump credit for thinking for themselves. Again using the 40/60 ratio from the Independents, let's give 8% (I rounded up; so sue me) of the Democrats credit for using their heads, thinking it out, and coming out anti-Trump.

What does that say about the other 83% of Democrats, the ones who voted the party line without bothering to think? It says that they're stupid.

Is stupid too strong a word? How about sheepBlind followersWillfully ignorant?

Wow. According to this and other public opinion polls, 83% of Democrats and Republicans are mindless party loyalists. THEY ONLY THINK WHAT THE PARTY TELLS THEM TO THINK.

Democrats think that they are the party of "thinkers" and the Republicans are the party of "stupid". Republicans think that they are the party of "thinkers" and the Democrats are the party of "stupid". Both parties are wrong. As the results of this and many other polls show, they're both the party of "stupid".

If you are a Democrat or a Republican, and you think you're one of the thinking minority, there's an 83-percent probability that you're wrong, that you are one of the party loyalists. The sheep. The stupid ones.

If you disagree with me, there are a couple of articles on Wikipedia that you need to read. The first is about fundamental attribution error, and the second is about self-serving bias, both of which are logical mistakes to which we mortals fall victim, over and over again.

The acrimony, the political divisions in this country will continue to get worse until people stop blindly supporting their party and learn to think for themselves. The poll results will get more and more extreme, and the divide between the two major political parties will get wider and deeper. Polite
political discourse has already ceased; inflammatory rhetoric has taken over. Violence is stomping through the door, and oppression is not far behind.

If you are a Democrat or a Republican, you have to do something to fix this. You don't need to abandon your party affiliation. You do need to abandon your mindless loyalty to your party. Use your brain to figure things out. If your party, or your party's representative, is wrong about something, then separate yourself from the majority on that issue, and make it known.

I don't pledge allegiance to a political party. I pledge allegiance to a flag, the nation that it symbolizes, and the Constitution that it is built upon. I don't vote for party leaders, political appointees, or lobbyists and influence peddlers, and I don't want them running the country - I mean, dictating how people think. That happened in the Soviet Union, but it should not happen here.