Thursday, September 13, 2018

I like Swiss things

I like Swiss things. They're high quality, very impressive, and not always expensive.

- Swiss chocolate (especially Toblerone, but not just Toblerone)
- Swiss yogurt
- Swiss cheese (not just Ementaler and Gruyère)
- Swiss watches
- Swiss Army knives (both Wenger and Victorinox)
- Swiss airplanes (Pilatus)
- The Swiss postal service
- Swiss railroads and trains
- The Swiss armed forces and military infrastructure
- Swiss mountains, Swiss lakes, Swiss cities, Swiss people
- Swiss computers

On that last one, you're going "WHAT?!"

Where I work, we were looking for a single-board computer for a new project. Single-board computers, or SBCs, have gained popularity, thanks to names like Arduino, BeagleBone, and of course the great Raspberry Pi. But those are all hobby computers. We needed something with real horsepower.

We evaluated about a dozen different SBCs. Most of them were from Hong Kong or Shenzhen, China. Even though they had impressive specifications, we had serious concerns about their quality, reliability, engineering design, and workmanship. In addition, our SBC may have ended up in some government or military projects, and we had serious national-security concerns about designing something made in China into U.S. military equipment.

One of the last SBCs we evaluated, technically a system-on-module (SOM) and not an SBC, was from Toradex. When you go to the Toradex website, you see that they're based in Seattle. But when you dig a little deeper, you find that although Toradex USA is based in Seattle, the parent company is based in Switzerland.

Yep. All of our worries about quality, reliability, engineering, workmanship, and sourcing, just evaporated. The End.

Wednesday, August 29, 2018

An incident at the airport

I saw something at the airport yesterday that continues to bother me, even though it shouldn't.

Actually, I saw a snapshot of the incident.

No, I saw a snapshot of the aftermath of the incident.

I wish I could fill in the rest of it. It would put my mind at ease.

I was on my way home from a business trip. It was about 8 p.m. local time, and I was dressed in a suit and tie.

I got off the airplane and was making my way up the concourse towards the train. On the far end of the food court, I noticed a policeman standing there, looking large and menacing and in control, his gaze focused intently on someone in front of him

As I got closer, I saw that the "someone" was sitting on a bench less than 3 feet away from the officer.

As I walked past them, I couldn't keep from staring. The "someone" was a man in his 30s or 40s, slight of build, with well-groomed, dark hair. He was wearing a suit and tie, just like me, so I concluded that he was also traveling on business. He was also on the concourse, which meant that he had a ticket to fly somewhere —  although he could have been returning from somewhere, like me.

I hazarded a closer look. He was sitting crookedly and rather uncomfortably on a bench, and his hands were behind him, so I concluded that he was wearing handcuffs. He was looking at the floor some distance away, and he looked like he was trying really hard not to cry, as if he were very unhappy to be there.

I had places to be, so I kept walking. I tried not to slow down. A few paces beyond that sad tableau, I passed a second policeman, holding the arrestee's ID and saying into his radio "... and the birthdate is oh five, oh six, ..."

It really was none of my business, but it's hard not to watch a train wreck. Part of my brain kept chewing on what I had seen. In no particular order, these are the thoughts that passed through my brain:

He's going to miss his flight. He's going to spend the night in jail. Somebody's going to have to fly out here, from somewhere else, to bail him out.

What did he do? It must have been pretty bad, and/or it must have unfolded over time, because policemen don't magically appear in a food court on an airport concourse. Maybe one of the food court employees called the police while it was happening.

Had the guy been drunk? Abusive? Irrational? Is that why they called the police on him? He was wearing a suit, so he wasn't just some rowdy tourist. He was a businessman, traveling on business.

Or was he disruptive on an airplane, and the flight crew called ahead, so he was arrested when he disembarked? I doubt this, because I would expect that arrest to happen near the boarding gate, not in the food court.

Oh, that sad look on his face. It breaks my heart. Whatever happened, his business trip sure didn't end the way he expected it to.

I wonder what will happen when he gets home? And I wonder what other pieces of his life will fall apart, as a result of this incident?

Thursday, February 22, 2018

How to: Installing Kodi / LibreELEC on a Raspberry Pi with a 5-inch LCD display

WORK IN PROGRESS: I will pretty this up later. I wanted to get the text online before I forgot what I did to make this work. Acknowledgements at the end.

I bought an Elecrow 5-inch LCD display on Amazon.com in December 2016, on one of their Lightning Deals, to install on a Raspberry Pi 2 Model B.

I finally got around to installing it on the Raspberry Pi. It works great. In fact, it works so well that I also installed it on a brand-new Raspberry Pi Zero W. (You want pictures? I'll add pictures. But the words are really important right now.) On both the Pi 2 B and the Pi Zero W, I was running the Raspbian OS. I'm sure it works just fine with Noobs, but I like Raspbian better.

I'll bet it works on a Raspberry Pi 3 as well.

But what I really wanted to do with it was run a home theatre system, specifically XBMC. XBMC is a wildly successful home theatre operating system. Actually, what used to be called XBMC is now called Kodi, and it's still wildly successful.

The Elecrow display and the Pi liked each other right from the start. I connected them, turned them on, and they played nicely together. Getting the software to run flawlessly on the combination took a bit more work.

Here are the steps to follow to get either Raspbian or the home theatre system working flawlessly with Raspberry Pi 2 Model B and an Elecrow display. These steps are also applicable to other Elecrow displays and other Raspberry Pi computers.

Installation on Raspbian OS


Under "Product Description" on the Amazon page, you will find these instructions:

  1. Download the Raspbian Stretch with Desktop image from the official Raspberry Pi downloads page. Don't bother with the Lite version. You want the real thing.
  2. If you use Etcher to write the image to your micro SD card, you won't even need to unzip it or anything. Etcher handles ZIP files, IMG files, TAR files, all of 'em. Etcher is the slickest program I've seen for SD cards and USB drives. It works on Mac, Linux or Windows PCs. You can get it from https://etcher.io/.
  3. Insert the micro SD card into your Pi.
  4. I can't remember what I did here, but I think I plugged the display into the Pi and powered it up. If you're using the Pi 2 or Pi 3, connecting power to either the display or the Pi will power up both of them. If you're using the Pi Zero, you'll need to connect power to the display first, and then to the Pi Zero.
  5. You will see the boot splash on the display, and the Pi will power up and run, but it only uses a 640 x 480 section of the display. Now you're going to teach it to use the full 800 x 480.
  6. Open a terminal window. Make sure git is installed on your Pi. If it isn't, use the command
    sudo apt-get install git
    to install it.
  7. Then use the command
    git clone https://github.com/Elecrow-keen/Elecrow-LCD5.git
    to download the driver.
  8. To install the driver, use these two commands:
    cd Elecrow-LCD5
    sudo ./Elecrow-LCD5
  9. You may need to reboot to make the change effective. I don't remember. I hope you don't. To reboot safely, use this command:
    sudo shutdown -r now
    (The "-r" means "just reboot, don't power off". The "now" means "don't wait; do it now".)
  10. To calibrate the touchscreen, execute these two commands:
    sudo apt-get install xinput-calibrator
    xinput-calibrator
  11. Using the stylus supplied with the display, poke the four crosshairs as they appear on the screen.

Installation on Kodi / LibreELEC

First came XBMC. It was so wildly successful that it turned into Kodi. It was so wildly successful that it turned into OpenELEC. (Actually, OpenELEC is a tiny Linux OS made specifically to run Kodi, but let's not quibble over details, okay?) Then, because of "creative differences", a lot of developers abandoned OpenELEC and that's where LibreELEC came from. LibreELEC is a fork of OpenELEC.

OpenELEC was last updated in April 2017, and support for it is deteriorating. LibreElec was updated a few weeks ago. LibreELEC is alive and lovingly cared for. But it's still XBMC, Kodi, and OpenELEC deep in its bones.

  1. Follow the excellent instructions on LIbreELEC's own wiki to download and install the LibreELEC USB-SD Creator on your system: Mac, Linux, Windows, we don't care.
  2. Again, following the excellent instructions on that page, run the Creator program to download the appropriate version of LibreELEC onto your micro SD card.
  3. Insert the micro SD card into your Pi.
  4. Plug the display into the Pi and power it up. If you're using the Pi 2 or Pi 3, connecting power to either the display or the Pi will power up both of them. If you're using the Pi Zero, you'll need to connect power to the display first, and then to the Pi Zero.
  5. You will see the boot splash on the display, and the Pi will power up and run, but it only uses a 640 x 480 section of the display. Now things get tricky.
  6. At the top of the left-side menu are three icons: an on-off icon, a gear icon, and a search icon. Click the gear icon to bring up the Settings menu.
  7. Click the LibreELEC icon. It's probably in the lower left corner.
  8. In the LibreELEC menu, select Services. On the right-hand side, select Enable SSH. Make sure it's enabled.
  9. Still in the LibreELEC menu, select Connections. Write down the Address of your device. It will be something like "192.168.0.77".
  10. Leave the Pi alone for a while. Go to another computer and open an SSH connection to the Pi.
  11. If you're on Windows, use  Putty.
    Hostname: 192.68.0.77 (or whatever it says in the Connections menu)
    Port: 22
    Connection type: SSH
  12. When you click Open, Putty will give you a scary message. Select Yes.
    login as: root
    root@192.168.0.77's password: libreelec
  13. If you're on Linux, use a regular terminal window.
    ssh root@192.168.0.77
  14. If Linux gives you a scary message, follow the instructions. If it asks you a question, type "yes".
    root@192.168.0.77's password: libreelec
  15. Sorry, Mac users. You're on your own. But I'll bet it's a lot like the Linux instructions.
  16. Once you're in the SSH session:The files inside libreelec are read-only. Write protected. A simple "chmod +w" isn't going to do it for you. Again, follow the excellent instructions on this page of LibreELEC's wiki to unlock the config.txt file for editing.
  17. It occurs to me that that page may one day disappear. So here's what it says. Type this command to unlock the partition on the SD card:
    mount -o remount,rw /flash
  18. Then type one of these two commands to edit the file, depending on which editor you want to use. If you don't know what vi is, then choose nano.
    vi /flash/config.txt
    or
    nano /flash/config.txt
  19. Look for the line that says "hdmi_ignore_cec_init=1". 
  20. Copy and paste these lines into the config.txt file, just below that "hdmi_ignore..." line:

    #increase HDMI signal strength
    config_hdmi_boost=4
    #remove black borders
    disable_overscan=1
    #set specific CVT mode
    hdmi_cvt 800 480 60 6 0 0 0
    #set CVT as default
    hdmi_group=2
    hdmi_mode=87

    dtoverlay=ads7846,cs=1,penirq=25,penirq_pull=2,speed=50000,keep_vref_on=0,swapxy=0,pmax=255,xohms=150,xmin=200,xmax=3900,ymin=200,ymax=3900

    dtoverlay=w1-gpio-pullup,gpiopin=4,extpullup=1
  21. SPECIAL NOTE: That "dtoverlay" line is all one long, long line! Don't break it up like Blogspot did!
  22. Save the file and exit the editor.
  23. Lock the partition:
    mount -o remount,ro /flash
  24. Reboot the system:
    reboot
  25. You should see the boot splash screen centered in the display, and when LibreELEC comes up, you should see it fill the entire display.

Thanks to:

  • Elecrow, for putting the instructions right on the product page at Amazon.com.
  • Amazon.com, of course.
  • @Auvy and the other commenters on the product page at Amazon.com, who added their technical advice. I had to choose one, and @Auvy's worked.
  • LibreELEC for the excellent instructions on their wiki, and for their SD Creator program.
  • Etcher.io, for their SD creator program.
  • RaspberryPi.org, of course.

Wednesday, February 7, 2018

Seven cool things about the SpaceX Falcon Heavy's maiden voyage

If you've been living under a rock or on a desert island, then you missed SpaceX's test launch of their heavy lift vehicle, dubbed Falcon Heavy, on Tuesday, February 6, 2018.

A picture-perfect liftoff from historic Launch Complex 39A


This is the most powerful rocket since the mighty Saturn V, which last flew in May 1973. It's part of Elon Musk's vision for SpaceX, to make commercial space flight profitable and to make interplanetary travel a reality.

Tuesday's flight  was a test flight, really, the first time that the Falcon Heavy had flown. Traditionally, space agencies put in a dummy payload, literally a huge block of cement, to simulate an actual payload and give the rocket something to push around. SpaceX decided to do something less "boring" (Musk's word), and more fun and whimsical. (Elon Musk himself said, in the post-launch press conference, "Silly and fun things are important.") So they mounted Musk's own red Tesla Roadster in the payload bay, and put a dummy wearing SpaceX's own design spacesuit in the driver's seat. They mounted three cameras on the car, and the cameras were live from the moment the rocket took off.



Here are seven cool things about the launch.

1. All 27 Merlin 1D rocket engines in the boosters fired perfectly. Not a single one of them malfunctioned at the launch.

The 27 Merlin 1D engines.
Perfect execution.


2. The two strap-on boosters returned to earth and landed squarely on their targets, almost at the same moment. It was beautifully choreographed. The main booster wasn't so lucky: two of its engines failed on landing, and it crashed into the unmanned drone landing ship at 300 miles per hour. That was the only thing that went wrong with the flight, out of the thousands of things that went right.

Perfectly synchronized landings.


3. Some friends of mine were camping in northern Arizona / southern Utah on Tuesday evening, and around 9:30 p.m. they saw this in the sky:

Trans-Mars injection burn, seen from Earth
End of trans-Mars injection burn

 SpaceX planned to do a second burn of the second-stage engine six hours into the flight, to send the rocket into its planned orbit. This is called, rather obviously, a "trans-Mars injection burn". A second burn is normal, it's called an "orbital insertion burn", but you don't normally wait six hours to do it. This was to test the variant of the Merlin 1D rocket engine which will be used on translunar and interplanetary flights. SpaceX engineers were worried that it might literally freeze up in the cold of space and not fire when it was time. What my friends saw was that second burn, working perfectly.

4. Actually, it worked more than perfectly: it worked spectacularly. SpaceX used all the remaining fuel in this second burn, and all calculations show that they will overshoot their target. They were looking to send the rocket into a heliocentric orbit reaching out as far as Mars' orbital path. They sent it into a heliocentric orbit, all right, but it's going to go deep into the asteroid belt between Mars and Jupiter.

The space Tesla's (or Starman's) trajectory. (Click to enlarge)


5. The battery in a Tesla Roadster is supposed to be good for 280, 360, or 400 miles. This one lasted for tens of thousands of miles.

Have battery, will travel.


6. The touch-panel display on the Roadster's dashboard says "DON'T PANIC!", a nod to Douglas Adams' The Hitchhiker's Guide to the Galaxy. Maybe it has an onboard version?


The dashboard display. Don't panic!

7. The cameras on the Tesla ran for as long as the Tesla's battery held out. Musk estimated that the battery held enough charge for 12 hours. I was still watching the live feed about 19 hours later. The cameras eventually faded out, as we knew they would, but before they did, the rocket sent back this last picture.

Second star to the right, and straight on 'til morning. Elon says, "Crazy things can come true," and here's proof. Safe travels, Starman.

Photo credits:
My good friend Allison Jackson took the pictures of the orbital insertion burn with her phone. Photos used here with permission.
All other pictures are either photos from SpaceX (or Tesla, in the case of the Roadster) or are screen grabs from SpaceX's live streams of the launch and of Starman's voyage before the batteries died. Used here without permission. I'll delete them if SpaceX or Tesla ask me to.

Want to see some exciting videos of the event?
CGI animation of the launch
The actual launch, the real thing (a shorter version here)
Starman and the space Tesla, sailing through space (also here)
Elon Musk giving a post-launch press conference. Note the euphoria in his face and in his voice.

Sunday, January 28, 2018

We are All Children of Immigrants

NOTE: The only people this doesn't apply to are full-blooded descendants of Native Americans / First Nations / indigenous peoples of the Americas. All the rest of you, listen up.

Jennifer Mendelsohn got tired of hearing Americans speaking out against immigration. So she took the names of some of the loudest opponents, did some genealogical research, and handed them a copy of their family tree — with immigrants at the roots.

My favorite part of this article about Mendelsohn's #resistancegenealogy research was when she told Tomi Lahren, who said Dreamers were not "law-abiding Americans", that her great-great-grandfather had been indicted by a grand jury for forging his naturalization papers.

Every one of us is a child of immigrants - many of them were "illegal", or refugees, or unwanted. Many of them took the low-paying jobs just so they could have a shot at the American Dream, and they were resented for it. But they stuck to it, and today we get to claim our natural-born citizenship because of them.

Actually, I'm an immigrant, too. Brought here as a child when I was 7 years old. Wanna make something of it?

The Wall is a Dumb Idea

Come on, somebody say it out loud: The Wall is, simply put, a dumb idea.

Physical barriers have been tried in the past, and people either go through them, under them, over them, or around them. Witness Hadrian's Wall, the Great Wall of China, the Berlin Wall, the fortified border between West and East Germany, the Iron Curtain, and the Maginot Line.

The only counterexample I can think of might be the fortified border between North and South Korea. but even then, small numbers of people just go around the wall, traveling first to China and then to South Korea.

Walls eventually crumble, or become irrelevant - or they're preserved as tourist attractions. Trump's Wall will be symbolic, but not much else, because would-be immigrants will find ways to bypass it. . The attraction (and the desire) to live and work in the United States, legally or illegally, is simply too strong.

What is needed is not a $25 billion physical wall, but an immigration policy that is sound, enforceable, and humane. Both the Democrats and the Republicans in Congress can do better than they're currently doing. And the President is as dumb as his Wall.

p.s. Why not use the $25 to do something useful? Like give it as a grant to the states, specifying that it be used to increase K-12 teacher pay and to hire more teachers?

Saturday, January 13, 2018

Book Review: Boardroom Bullrider: 5 Lessons Learned about Business in 8 Seconds

Bryan Merritt is a turnaround artist, a hired gun who travels around the world, helping companies who have lost their mojo to become vibrant and profitable again. If his clients are willing to take his blunt, straightforward advice, and make the changes he says they need to make, then they win, and he is successful. He loves this kind of work and it gives him great satisfaction.

Much of his approach to business was learned in the arena – the rodeo arena, to be specific. Ever since he got on the back of his first bull at 16, he was hooked. He loved bullriding, and it also gave him great satisfaction.
                                 
You don’t get a lot of time to think when you’re on the back of the bull. If you’re good, you get 8 seconds, and then the buzzer sounds, you win, and you look for a graceful way to dismount. But bulls don’t like to be ridden, so you’d better know what you’re doing if you intend to win. In his bullriding career, Merritt identified five key lessons to help him stay on the bull – the same five key lessons that he uses as a corporate fix-it man to save floundering companies.

You don’t have to hire his company, Matrix Management Systems, LLC, to benefit from his wisdom. Merritt also does webinars and workshops. Now he offers those five lessons to you in his new book, Boardroom Bullrider: 5 Lessons Learned about Business in 8 Seconds. Skillfully mixing rodeo stories with stories about the business world, Merritt presents his five lessons and, in his straightforward manner, at the end of each lesson he pushes you to “get on the bull,” to do something that will make you make the lesson part of you.

I won’t tell you what his five lessons are. That’s what the book is for. Read it yourself. I measured it against some of the classics in business literature, and Boardroom Bullrider holds its own. 

The one thing the classics have over Bullrider is page count. Merritt manages to make his points in 158 pages, not counting an absorbing introduction. Merritt is a great storyteller, but he doesn’t waste words. That’s his style. It’s part of the 80/20 principle that he focuses on so passionately. Still, you will find yourself wishing that he had spent more time on certain points, turning one sentence into a paragraph or one paragraph into several.

His advice is not just for moneymaking companies. It’s also for nonprofit organizations, government agencies – and you as an individual. Bryan’s advice can help you succeed in life.

Boardroom Bullrider is available from many booksellers, including Amazon.com, or directly from Bullrider Press.