Categories
Hardware What I’m Up To

New life for an old Raspberry Pi with a 3.5″ touchscreen

Since getting my Raspberry Pi 4 as part of the cybersecurity course I took last summer, I haven’t done any work with my older Raspberry Pi 3, which is still a decent computer, especially considering its size and price.

That all changed when I finally unboxed my Kuman 3.5″ LCD display, (a steal at $20) which my in-laws gave to me for Christmas (they went through my Amazon wishlist for gift ideas). They had no idea what it was, but figured I’d like it, which I do!

Tap to view at full size.

With a 3.5″ diagonal and 480 by 320 resolution, this screen isn’t meant for reading web pages or PDFs or writing code, documents, or spreadsheets. It’s meant to be a display for an IoT project that doesn’t need to display a lot of information, such as a weather app, smart thermostat, or even low-res videogames.

Tap to view at full size.

The screen’s not just an output device, but an input device as well, since it’s touch-sensitive. Once you’ve installed the driver, the Pi treats the screen as if it were another mouse, treating taps as mouse clicks, and the location of your tap as mouse coordinates.

Tap to view at full size.

The screen plugs directly into the Pi’s GPIO (General Purpose Input/Output), a 40-pin connector located along the top edge of the board, which it uses for power. It’s also what physically holds the screen to the Raspberry Pi.

Tap to view at full size.

The video signal is fed to the screen through a U-shaped HDMI connector that connects the Raspberry Pi’s HDMI port to the screen’s HDMI port.

Tap to view at full size.

I’ll post the results of my noodling with this new Raspberry Pi/screen combo here on Global Nerdy. It should be interesting!

Tap to view at full size.
Categories
Hardware Mobile

It’s the 14th anniversary of the original iPhone Stevenote!

On January 9, 2007, Steve Jobs said this near the beginning of the Stevenote where he introduced the original iPhone:

Three things: A widescreen iPod with touch controls, a revolutionary mobile phone, and a breakthrough internet communications device.

An iPod. A phone. And an internet communicator.

An iPod! A phone! Are you getting it?!

These are not three separate devices. This is one device…

Today is the 14th anniversary of that keynote. It caused Google to go back to the drawing board with Android. It led to the redefinition of the mobile phone and the downgrading or demise of the big hardware players of the day (BlackBerry, Motorola, Nokia, and Palm). It changed Microsoft’s trajectory, and brought about the end of Flash. It redefined the boundaries of personal computing and the web. For better and worse, it changed the way we communicate, navigate, “vegetate”, and relate.

Happy anniversary, iPhone!

Recommended reading

Categories
Hardware How To

What to do when the USB-C ethernet adapter for your Mac doesn’t work out of the box

I recently got a Mokin 10-in-1 USB-C dongle for use with my work computer, a 2019 16″ MacBook Pro, whose only connectors are 4 Thunderbolt/USB-C ports and a 3.5 mm audio jack.

The dongle worked like a charm out of the box with the notable exception of one part: The Ethernet port. I had a pretty good guess why this was happening and how to fix it.

The problem and the plan

Most dongle vendors are integrators. They may manufacture the cases and simpler electronics, but they purchase lot (or all of) the fancier tech from manufacturers, such as networking chips.

Here’s a pic showing a Mokin dongle and its internals:

From Mokin’s site. Tap to view at full size.

My plan was to find the manufacturer of the networking chip inside my dongle, then find their webpage, then hopefully find a driver.

Here’s what I did.

Step 1: Identifying the vendor

With the dongle plugged into my MacBook, I opened the Apple menu and selected About This Mac. This window appeared:

I clicked the System Report… button, which opened the System Report window:

This window provides a run-down of the hardware, software, and networking on your Mac. Its Hardware list provides information about the hardware in and attached to the computer. A lot of peripherals have information such as vendor IDs encoded to them, and you can use System Report to find it.

I expanded the Hardware menu and selected the USB item. The USB Device Tree list appeared in the window’s right pane.

I then went through the USB 3.1 Bus entries in the USB Device Tree list in search of an entry containing the word LAN. Once I found that entry, I clicked on it, which then caused its details to appear in the lower part of the right pane.

I found the information that I needed: the Vendor ID, and better still, an actual vendor name: Realtek.

This shouldn’t have been a surprise: Realtek, a chip manufacturer in Taiwan, have had the majority share of the ethernet controller market since the early 2000s. They also have a good chunk of the sound chip market, so I’m no stranger to their drivers or their distinctive “crab” logo.

Step 2: Search for the vendor’s site, and in particular, the page containing the driver you need

Now that I had a vendor name, I did a search with using the search term realtek lan 10/100/1000 driver mac. This was my first result:

What if you don’t have a vendor name, but just a vendor ID number?

In the case where you just have a vendor ID number and no name, you should consult as USB ID database, such as the one at The SZ Development:

I decided to see if I could find the driver using this route.

I entered the vendor ID reported by my Mac, 0x0BDA, in the Vendor ID field and the reported product ID, 0x8153, in the Product ID field. I clicked Search and got these results:

  • USB 10/100/1000 LAN
  • RTL8153 Gigabit Ethernet Adapter

The links that the site provides aren’t all that useful. You’ll get much farther if you simply include the result text with the words driver and mac as your search term.

Doing that took me to the same page as the previous method:

Step 3: Install the driver

From the Realtek page I found, I downloaded the installer that applied to me and ran it. It worked without a problem.

(They would be well-served by a team that could do a half-decent job localizing the language on their installer.)

Step 4: Enable wired networking

With the driver installed, it’s time to make wired networking happen!

Open System Preferences. To add wired networking, you’ll need to add a new networking service, which you do by clicking the + button at the bottom of the menu on the left side of the window:
You’ll be asked to select the interface and provide a name for the new networking service. Select USB 10/100/1000 LAN from the Interface menu, and enter whatever you like for in the Service Name field. I entered “Wired” for mine:

I clicked the Create button, which created the service and dismissed the dialog box. The new service, named Wired, appeared in the menu on the left side, with Not Connected as its subtitle.

I clicked the Apply button…

…and the Wired service went from Not Connected to Connected:

Success!

Now it was time to test the connection. I shut off wifi and ran Speedtest.net on my wired connection. The results shown below are for my work computer, which uses a VPN that I need to always keep on (or there will be. consequences):

That’s a good deal faster than I get on wireless, and I’m sure I’ll get better speeds on my personal computer when it’s not on a VPN.

Categories
Hardware Programming

Yes, you can run Visual Studio Code on Raspberry Pi

This is the first in “Cobra Pi”, a series of articles on getting the most out of your Raspberry Pi!

Yes, you can run Visual Studio Code on Raspberry Pi!

You’ve got many options for editing code or other plain text files on your Raspberry Pi. It is, after all, a Linux machine, and you’ve got all the classic command-line editors — vim, emacs, and…

And the windows-and-mouse-based Geany (text editor) and Thonny (beginner-friendly Python IDE) come along with even the bare-bones version of the Raspberry Pi OS setup.

But if you’re like about half the developers who answered the 2019 Stack Overflow survey, your “home” editor is Visual Studio Code. And yes, you can run Visual Studio Code on Raspberry Pi.

How to install Visual Studio Code on Raspberry Pi

If you go to Visual Studio Code’s “downloads” page, you’ll see this:

Tap to view at full size.

For the Raspberry Pi, you want to download the Debian package for systems with ARM processors (click on the ARM button in the .deb row).

Once downloaded, go to your Downloads directory and double-click on the the .deb file you just downloaded. You’ll see greeted with this dialog box:

Click the Install button. You’ll be presented with another dialog box, this time asking for your user password, since it’s required when installing new applications:

Enter the password you use to log into the Raspberry Pi into the Password field and click OK.

Visual Studio Code will be installed on your Pi. Once the process is done, you can launch it by clicking on the Start Menu (the raspberry icon in the upper left-hand corner)…

…and in the menu that appears, select the Programming menu. A sub-menu will appear, and one of the items will be Visual Studio Code. Click that and…

Screenshot: Visual Studio Code on Raspberry Pi
Tap to view at full size.

You’ll be in the Visual Studio Code that you know and love from Windows, macOS, and Linux! And yes, all the plugins that you’ve come to depend on will be available.

Go forth and code!

Categories
Current Events Hardware Programming

Raspberry Pi 400: A lot of computer for as little as $70!

Photo: Raspberry Pi 400, front/top view showing keyboard as seen by the user.
Tap to view at full size.

The Raspberry Pi 400 — a Raspberry Pi 4 board with 4GB RAM built into a compact keyboard — was announced just today, and the base unit (just the computer built into the compact keyboard) retails for $70!

The computer

Photo: Raspberry Pi 400, back/top view showing keyboard and ports.
Tap to view at full size.

The Raspberry Pi 400 is a slightly updated model from last year’s Raspberry Pi 4, and has these specs:

Feature Notes
Processor 1.8 GHz ARM Cortex-A72 CPU
(A little faster than the Raspberry Pi 4’s 1.5 GHz CPU)
RAM 4 GB
Networking
  • 802.11ac wifi
  • Gigabit Ethernet
  • Bluetooth 5.0
Video 2 micro HDMI ports that can each drive 4K/60 Hz video
USB
  • 2 USB 3.0 ports
  • 1 USB 2.0 port (preferably for the mouse)
Power Provided via adapter and USB-C
Additional ports 40-pin GPIO interface

The complete kit

Photo: Raspberry Pi 400 kit, showing the computer, micro HDMI to HDMI cable, The Official Raspberry Pi Beginner’s Guide, mouse, and power supply, as well as the box they came in.
Tap to view at full size.

For an extra $30, you can get the kit, which is the complete “ready to go out of the box” package. It starts with the Raspberry Pi 400 computer-in-a-keyboard unit described above, and it adds:

The kind of computer that hasn’t been seen since the 1980s

Let’s quickly take stock of what you get with just the Raspberry Pi 400, never mind the kit:

  • A fully-equipped computer with a decent processor, decent RAM, wifi/wired/Bluetooth networking with 2 fast USB ports to spare once you’ve plugged a mouse into the slower one.
  • A computer that you can do hardware experiments with, thanks to its GPIO pins, and an abundance of hobbyist-focused expansion kits.
  • A computer that you can plug into your TV.
  • A computer that costs $100.

There hasn’t been a computer like this since the machines pictured below came out…

Photo: ZX Spectrum computer

Photo: Commodore VIC-20.

…and those machines couldn’t hold a candle to the proper desktops of that era.

On the other hand, you’ll find that the Raspberry Pi 400 can easily keep up with the sort of computer that gets issued for standard office work. You could easily use it to do schoolwork or office work, and it’s actually a decent Linux software development machine and retro-style gaming console, too! And with its expansion capabilities, it’s an excellent machine for IoT and sensor projects.

This is the sort of machine that children of the 1980s and early 1990s learned on, many of whom are today’s techies…

…and this machine will probably be the machine that a lot of children of the 2020s will cut their programming teeth on, and who’ll be the techies of the 2040s and 2050s.

Given a choice between a Chromebook and a Raspberry Pi 400, I’d take the Pi, because I can do a lot more with it. In fact, I might be able to do a lot of my new job with it (which is something I might try soon, just to see what happens).

Graphic: “Cobra Pi” logo

By the bye, keep an eye on this blog for a new feature: Cobra Pi, which covers programming on the Raspberry Pi, and whose motto is: “Code hard! Fail fast! No latency!”

It’ll cover all sorts of cool programming tips, tricks, and techniques on the Raspberry Pi, including JavaScript, Python, and even C and ARM assembly language!

Categories
Hardware

Before you freak out because iPhones no longer come with chargers…

…go check your drawers. I just opened the drawer on my right-side desk and this is what I saw:

Photo: An open drawer packed with USB chargers.
Tap to view at full size.

And these are the ones that aren’t being used to charge phones, iPads, Apple watches, or drive other USB-powered things including my videochat lighting rig.

You probably have lots of them around your place as well.

Categories
Hardware What I’m Up To

This just arrived…

…and it’s not something I ordered. I don’t even own a USB-C MacBook!

Of course, this means that the matching computer — which the new employer is sending my way — should be arriving soon.