November 2020

Friday, November 20, 2020

How to use a mini keyboard with a Raspberry Pi 4

Description

Wondering about the Gecen Mini Keyboard and mouse? In this episode of House of Hacks, Harley unboxes and then does a Gecen Mini Keyboard setup with a Raspberry Pi 4 computer.

Sign up for book updates: https://list-optin.house-of-hacks.com/
Interested in this keyboard? Here's where I got it: https://amzn.to/2InJVnS (Affiliate link)

Here at House of Hacks we do tutorials, project overviews, tool reviews and more related to making things around the home and shop. Generally this involves wood and metal working, electronics, photography and other similar things. If this sounds interesting to you, you may subscribe here.

If you’re interested in learning more about the House of Hacks' values, here’s a playlist for you.

And here’s the most recent video.

For a written transcript, go to Labists Starter Kit for Raspberry Pi 4.

Here's a list of the tools I use.

Music under Creative Commons License By Attribution 4.0 by Kevin MacLeod at http://incompetech.com.

Intro/Exit


Hot Swing

Incidental


werq George Street Shuffle

Contents

Transcript

Introduction

Wondering how well one of these inexpensive wireless mini keyboards works?

So do I. So I got one and we're going to open it up and see how well it works on Raspberry Pi and Linux.

I've used a number of Bluetooth devices on a number of operating systems and hardware platforms over the years. I've always found them to be a little finicky. Sometimes you turn them on and they work and sometimes they don't. I've had some devices i just couldn't work get to work at all.

So, i'm hopeful that this will work. It's got some really cool features:

  • It's got RGB backlight on the keyboard.
  • It's a full keyboard in a very small form factor.
  • It's got a mouse control that has adjustable DPI so, depending on the size of your screen you're working with, it makes it easy to control.

On the surface it sounds really cool, but it's bluetooth and I'm kind of skeptical about that.

So we're going to open this up and take a look at it and try getting it running on a Raspberry Pi.

If we're just meeting, Welcome! I'm Harley and this is the House of Hacks. I make stuff here, usually out of wood or metal, but sometimes that involves technology like Raspberry Pis and mini keyboards.

Unboxing

Let's open this up and see what's inside.

So I'm kind of hopeful that this is going to work well. I would really like it to.

So it comes out with first of all a short USB cable with a large and small connector on it. I'm assuming this is for recharging purposes.

And then we have just the keyboard unit. It's in bubble wrap to help protect it.

A very small user guide. It's all pictorial. No... a little bit of writing inside. And not much to it. A small trifold thing.

And there's the device. It's got some keys for... for controlling things and then the keyboard. It actually has a pretty nice feel to it. It has some a click feel and real positive action. I've been pretty impressed with it so far.

I don't know how to use this at all. It's controls are a little confusing.

It fits well in the hands but so... yeah it doesn't doesn't feel too bad.

It looks like it has a battery compartment back here.

OK, so here's the receiver unit... so maybe it isn't Bluetooth. Oh, that would be cool. Maybe it looks just like a regular keyboard. That would be better... interesting. And it has a little slot in here for storage.

It has one battery that's easily replaced and it's a BL-5C, so that's nice. It's probably rechargeable since it has the cord here but is it easily changed. At first i thought it had AAs in it, or AAAs, and that was going to be a little bit of a pain.

But that looks like a nice unit.

It's got a switch here on the top. I assume that's the power switch and then a plug here for the USB cable which, as I said, I assume that's just for charging purposes.

I'm going to read the manual and take a look at this and try to get it hooked up.

Setup

I've got the Raspberry Pi here set up with my little tiny video monitor and it's plugged in. I don't have any keyboard or mouse though at this time.

I have gone through the instruction manual that came with this thing. Like I said, there's not much to it. It basically says plug it in and turn it on and use it.

One thing of note, it does say though is it will take either the battery that we saw before in it or it will also take two AAA batteries.

Well, the manual said it would take AAA batteries...
and the case has a place for AAA batteries...
but there's no actual connectors for AAA batteries...
so while you could technically put them in here, I don't think they're really going to do anything.

And then it has a little troubleshooting section that has just basic common sense kind of things... and maintenance... "Don't submerge it in water," that kind of thing. So not a whole lot of interesting stuff there.

So I did throw it on the charger for a little bit and I'm going to take this out for the receiver... out of the little holder thing... close that back. I'm going to put this in one of the USB slots and turn it on and let's see what happens here.

I turn the power on my screen... Raspberry Pi boots...

And this does have, in addition to kind of the D-controller that looks like it works for the mouse, there's also a touchpad.

We'll see how that works... We'll turn this on... Now it's booted and... Well the mouse works for the touchpad. It doesn't seem to work using the D-controller.

There's no instruction manual on this so it's kind of going to be a little bit of experimentation.

Looks like there's a mouse button here that brings up the context menu. It's right click and then you use the up and down arrows to select something.

The mouse does work and you can tap it to double to do a click and it's supposed to have some sort of scrolling... Oh, that probably works if you have a... if you have an app open...

Let's try opening the browser... and we'll just pull something up here...

So it's working really well other than learning how to navigate the keyboard.

One thing i did notice is it only has shift and control on the left side. There's nothing over here on the right and also the Windows key is on the right side which is opposite most keyboards. So if you want to do... you know control keys... and you have to kind of reach over the keyboard. Probably not a big deal with a small enough keyboard.

Triple fingers will allow you to scroll... As does the D-controller... scrolls either way.

So yeah, overall it looks pretty cool.

It's got the backlit keyboard. I have no idea how you change change the colors on the keyboard. It defaults to blue.

Oh, I see these... it's hard for me to see without my glasses... This keyboard has buttons on here... This is a right click and looks like a left-click buttons... But that's not kind of what I saw... it seemed to be the other way around.

Oh, if you triple click it will bring up the context menu too.

So the icons seem to be backwards to me. This one says it's a a right click... that's the way i would interpret that icon... but it's actually a left click. And this one is a right click and the button looks like a left click to me. I guess it's one of those cases where you can't... when you only have two items and there's one there's a little graphical differentiation between them, you don't know which the graphical representation means. It's kind of like when you have a menu item and something's highlighted but you don't know if the highlight is the selected item or the unselected item. That's always kind of fun. The same same issue here.

Summary

But it seems to be working just fine. No problems whatsoever hooking it up. It's not Bluetooth like i originally thought so that's probably why it actually works. It doesn't have all those finicky drivers that you need to hook up.

So i'm really impressed with this little thing... I think I paid $13 or $14 for this... I think it was under $15...

So it seems to be working really well. I assume that there's a way to change the colors. I'm not going to try to fiddle with that here on camera but just first impressions it's working.

I give it a thumbs up! Yeah!

Over here is a video that Youtube thinks you're going to enjoy.

And while making things remember: perfection's not required, fun is!

Monday, November 9, 2020

Labists Starter Kit For Raspberry Pi 4: Everything you need to know

Description

Interested in a Labists Starter Kit For Raspberry Pi 4? In this episode, Harley unboxes, assembles and runs through the initial setup wizards for one of these kits.

Sign up for book updates: https://list-optin.house-of-hacks.com/
The kit I got: https://amzn.to/3oYXY45 (Affiliate link)
A list of different kits: https://amzn.to/2TZj187 (Affiliate link)

Here at House of Hacks we do tutorials, project overviews, tool reviews and more related to making things around the home and shop. Generally this involves wood and metal working, electronics, photography and other similar things. If this sounds interesting to you, you may subscribe here.

If you’re interested in learning more about the House of Hacks' values, here’s a playlist for you.

And here’s the most recent video.

For a written transcript, go to Labists Starter Kit for Raspberry Pi 4.

Here's a list of the tools I use.

Music under Creative Commons License By Attribution 4.0 by Kevin MacLeod at http://incompetech.com.
Intro/Exit: "Hot Swing"

Contents

Transcript

Introduction

Today at the House of Hacks we're going to unbox and setup this Labists Raspberry Pi Starter Kit.

OK, the box it comes in is nice and sturdy, not much to it.

Just kind of your basic box.

We're going to go ahead and open this up.

It's got a couple anti-tamper stickers on it.

And we'll just open this up.

Recently I've had some ideas floating around my head for some projects where it needed a little bit more computing power than what an Arduino supplies but I still wanted to be fairly close to the hardware.

So, of course the Raspberry Pi is a great solution for this.

Having never worked with Raspberry Pis before I didn't have anything and I wanted a starter kit to just get going quickly.

So, I searched on Amazon and found this Labists Starter Kit. It came with pretty high reviews and seemed to be pretty complete. So I went ahead and got one.

It's supposed to have a case and power supply and other miscellaneous things that you need to get started.

It doesn't have a keyboard or monitor, of course, but I have those in plenty.

I went ahead and got one of these. It has 8 GB of RAM and 128 GB SD card and so I thought I'd open this up and show you what it takes to get started.

If we're just meeting, I'm Harley. Welcome. This is the House of Hacks where I make stuff.

Usually out of metal or wood, other kinds of media like that. Sometimes it includes things like Arduinos and Raspberry Pis.

Unboxing

It starts off with a Raspberry Pi Model B. 8 gig of RAM.

That looks like the main box or the main computer.

I have to rip the box and there's the Pi.

They are pretty small little units, aren't they?

It has the connectors on the side. The power supply.

Network. USB. Looks like USB 2 and 3.

And yeah, there's not much to it. Not much bigger than an Arduino.

Just for size comparisons, there's an Arduino Uno.

It's a little bit bigger but about the same size.

Digging more into the box...

Packing material.

Oh, and inside this box looks like there's some basic instructions and a fairly large piece of paper with multiple language instructions.

We've got a Quick Start Guide.

A power supply... with an on/off switch.

Labists power supply.

We have, looks like a case.

I assume it snaps open somehow. I won't do that on camera but it's got holes for the connectors.

It must go this way. There's the connectors that way and that way.

And interestingly, it looks like it has a 1/4-20 connector on there which I'm guessing they may have it setup for putting a camera on this. That kind of looks like a camera hole. I don't know exactly.

That looks like a hole for a lens on a camera. They might have an aboard board camera you could put on there and then that would be for taking pictures with.

Interesting little concept.

HDMI cable.

This looks like another HDMI cable.

That's definitely HDMI... and that's definitely HDMI.

So, two HDMI cables.

A cute little tiny fan.

I assume that goes in the case.

An SD card that says Raspbian on it. So, I assume it's preloaded with the operating system. That's handy.

I don't recognize that.

I'll have to read the manual for that one.

A little screwdriver for mounting the fan.

Some heat sinks.

And that's it.

So, everything that comes in the box.

Those are the things that are inside the box in this kit. I want to get into the setup of this and see what happens when we turn it on for the first time but before that I do have an exciting announcement.

Those are you that have been around the channel for awhile may have noticed that my uploads this year have been down from previous years.

That's not because I've been slacking off but because I've been working on a new project.

This is a beginner's guide to working with electronics, specifically the Arduino ecosystem.

So, if you've been interested in getting Arduinos into your projects but don't know anywhere to begin, this book is for you.

I talk about three things in it...

Basic electronics. What is a transistor. What is a resistor. Real basic things like that.

And then I talk about how to setup a computer to program an Arduino.

And third, I talk about the basic elements of what goes into an Arduino program and the fundamental programming issues related to that.

If this is something that's interesting to you, I've left a link down below for a mailing list where I'll be announcing when the book is released and also providing a discount code for those that are interested.

Assembly

Now that we've got everything unpacked, let's assemble this.

The Quick Start Guide is fairly thick and a bit intimidating at first glance but there's six languages in here so for any one language there's only about four pages.

Half of those four pages are how to install the operating system on a blank SD card.

The SD card that comes with this is already pre-formatted so we don't need to worry about those two pages.

About half of the rest is specifications and what comes in the kit.

So there's really about a page, page and a half, of actual instructions for getting started and those seem to be really clear in reading things over.

I don't have any questions off the top of my head.

We'll see how complete they are once we get into it and see if we have any questions.

The mystery piece that I wasn't sure when I was unboxing it is actually an SD card reader which is kind of handy.

It's a type C connector. It pulls apart and there's the connector for plugging into USB and there's where the SD card goes in on the back side.

So that's kind of cute. It's an inexpensive one. It's not great but I'm sure it works for the purposes that we have here today.

There's really only a couple steps we need to do.

We need to install the heat sinks onto the card.

We need to install the fan into the case.

And then we need to install the card into the case and put it all together.

Finally we can install the SD card after the card is in the case and then apply power and keyboard and monitor and see how it works.

They do say that you don't want to have the SD card in the computer when you're trying to put it in the case.

I think there's a fitment problem trying to get it all lined up and stuff.

So you put the card in after everything is assembled and put together.

So, let's get to this.

First we're going to put the heat sinks on the chips and the manual says exactly which ones they go onto and they are self adhesive so they should go on fairly easily.

We've got this one goes on that chip.

We've got this square one that goes on the main CPU.

And then we have this other smaller one that goes on, looks like the chip that's right there.

So that's how it's assembled.

Time to get out the tools.

I've got a pick that works really well for taking off things like self-adhesive tape when it's hard to get off.

That one wasn't too bad.

So that goes on... try to get my fat fingers in here on this little board. That goes on that chip.

Just press it on.

This self-adhesive tape isn't too bad to take apart. Sometimes it can be a real pain.

That does on that chip.

And this goes on the last one.

I assume that is the primary CPU. It's this metal cased one.

That was easily done and I didn't need the pick at all.

So now we want to install things in the case.

The case just pulls apart. There's a little handle there.

And there's screws for mounting the board and there's screws for mounting the fan.

It seems that there's more screws there than I actually need.

And this case also is designed for a camera. I didn't get the camera option but there is a hole in the case and mounting space to snap a camera in there.

The fan can go in two ways. There's no indication of air flow.

I don't know that it really makes a difference which way it goes in.

I'll put it in this way so the strain relief on the cable pulls up.

The self tapping screws go into the fan. They have a round head on the top.

They're a bit longer than the screws in the other package that are for the card.

You don't want to torque them down too tight since you may strip out the plastic.

You just need to make them so it holds things in without rattling.

And that's the fan in there.

Next we need to mount the board.

It's pretty obvious. There's big holes in the case go for the USB and ethernet port.

And this should just drop in there.

And there are...

It seems to fit... fairly snugly.

There we go. You can kind of feel it where it snaps in.

You want to make sure the connectors are all lined up with the holes and the connectors on the side actually fit into the holes on here so there's a bit of a snap feel to it.

Get the other screws.

These screws I'm going to need the spectacles for.

It'd be nice if this screw driver was magnetic but that one went in without too much difficulty.

On screws like this, I tend to start them, get them all started, and then I go through later and with a second pass tighten them down for good.

That way you don't... If you tighten it down one at a time, sometimes you'll knock things out of alignment and then it's harder to get the other screws in.

And for both sets of screws, they sent me one screw more than I actually needed. Which was convenient since I dropped of those on the floor. I'll have to go retrieve that later.

And then I can go through a second time and tighten everything down.

Again, you don't want to tighten it down too tight because you don't want to strip the threads or the head.

And this screwdriver seems to be possibly at end of days.

This one screw... No this one screw has some munged up threads.

The screwdriver is fine. The head is rounded out without putting any torque on that at all.

And I can't get it out so now I need to get the pliers.

Let's try the extra screw that they gave me.

Those are magnetized and it's making it hard to get the screw in.

Once you have threads in plastic you want to do a technique called indexing where you turn backwards until you feel a click and then you can go forwards again.

That way you're not cutting new threads into the plastic.

And this new new screw worked much better.

There we go.

So I think now we are ready to put the operating system SD card into the case.

There's a small slot right there on the back of the case that this should slide into just like so.

And yeah, it protrudes out so if that was in the card when we tried to put the card in here, we'd have problems getting it in. So that's definitely what's going on there.

Now we're ready to wire up the fan.

The fan goes in this way and there's two options on this.

The red wire is positive and the black wire is negative and the manual says which ones go where with some pretty detailed instructions.

There are two options on this fan. You can either run it at low speed on 3.3 volts or at high speed on 5 volts, both of which are available right here on the GPIO connector.

And the black one is ground and it's on pin 6 which it shows right there.

I'll orient this in the way it shows in the diagram. Pin 6 is the third one on the top. So it goes in there.

And then the red is either pin 1 for 3.3 volts or pin 2 for 5 volts.

So I'm going to put it on 5 volts because, hey, more power! Right?

And then everything should just snap together if I can figure out which way this goes on.

And there we have it. We're ready for power, keyboard and video.

Setup

So, we have the things that came with the kit and a few extra items in order to use this.

We need an external monitor. This is a small HDMI monitor that is designed for use with video equipment but any HDMI output source will work.

I also have a keyboard and mouse. Those are really the only things you need in addition to what comes in the kit.

For the purposes of today and this particular setup, I also have an HDMI splitter so that I can run the signal out of the Raspberry Pi, not only to the monitor, but also into my computer to be able to record it and capture it in high quality so that you can see what's going on in the video.

That complicates this particular setup but that's not a setup that you'd normally need when working with the Raspberry Pi.

One thing of note, is while the power supply that comes with a Pi looks like a normal wall wart, it is a high power device.

The Pi requires more than what most wall warts produce.

Most wall warts output in the milliamp to maybe 1.5 amp range.

The Pi needs more than that and this particular one that came with this kit is a 3000 milliamp, or 3 amp, power supply.

So, you do want to make sure that if you're not using a kit that you get a power supply that has sufficient output for the Pi's use.

If you don't have a power supply that has enough power, you'll get weird things happening.

It'll work sometimes and not others.

It will just work for awhile and then suddenly not work.

Just kind of bizarre things like that. So if you do have problems like that and you don't have a power supply that came with a kit, make sure that the output of the power supply is sufficient for the Raspberry Pi.

Let's start putting this together.

Everything's plugged in now, including the power supply into the wall.

I've got the software running on the computer to capture the screen.

I'm using OBS by the way just to record everything.

It's Open Broadcast Software I believe is what it's called and we're just using that as screen capture at this point off the HDMI input and the little converter thingy that I have.

Let's turn it on and see what happens.

First time startup

Down here in the corner I have overlaid a time code on the screen capture.

I'll be speeding up through parts of this so we don't have to wait during the entire video.

The time code will show the actual length of time it took in real life.

It takes a bit to start up and now we have a background with this welcome message.

I'm going to go ahead and hit Next and now we get a chance to setup our country, language and time zone.

I'll set mine for the United States and since I'm in Mountain Time, I'll select Boise.

Clicking Next it takes a couple seconds to set that and now we have the opportunity to set the password for the main account.

I'll put that in here what I want to use and click Next again.

Now it's asking about screen setup.

We can see around the outside edges here that we have a black border where the background screen doesn't take up the whole screen.

This has to do with different HDMI display devices and sometimes you'll see these bars and sometimes you won't.

Since we see them here, I'm going to click this check box and that should remove them in the future.

So now I'll click Next to save this.

And the next step is it's looking for wireless networks.

We can see a bunch from the neighborhood here so I'll scroll down here and select mine and it refreshes the list and now I have to select it again and hit Next.

And now it's asking for my wireless network password. I'll put that in and continue on.

And now it wants to update the software. I'm going to click Next and...

uh, oh. For some reason it didn't connect to the network. I'll have to look into that.

For now, we'll just move along. That's something that I can do in the future.

And I guess that's it for the setup wizard. It's going to reboot and let's see what happens.

OK. That didn't take too long.

Now we can see the whole screen is being used. We don't have the black borders, so that worked.

In the top right corner here we can see that we now have a network connection.

Now let's go look at the software installer.

I'll go over here to the menu and click on the Raspberry Pi icon to pull the menu down and then I'll go down here into Preferences.

Let's start with this Recommended software option.

It'll start off by checking for updates so it's going out to the network and seeing what's different between what's been released now and what the software was originally setup for.

Well that took about a minute. Now we can see all the menu items that are part of the recommended list for the Raspberry Pi ecosystem.

On the left we have different categories and when you select one it shows the items in that list.

You can check or uncheck the box on the far right to add or remove the options that you want installed on your particular Raspberry Pi.

After you have everything you want selected, click Apply and it'll start installing or removing as you've directed.

This may take a bit depending on what you've selected and the speed of your internet connection.

Fortunately it does a good job of telling you what it's doing with all the status messages and the progress bar.

After it's gone through and figured everything out, we get this completion dialog when it finishes.

If I hit Apply again, we'll see that nothing happens since it's all caught up.

So I hit Close to finish this step.

And so now if we look here in the menus, we can see that it installed the software that we asked for.

Now I want to make sure that the operating system is up to date.

To do that, I'm going to go to the terminal window and run a command.

"sudo apt update" will check for updates for everything that's installed on the Pi, both at the base operating system level as well as any additionally installed applications.

It takes a little bit, but generally not terribly long.

When it finishes, we get back to the command prompt.

All this has really done is update some internal lists so that it knows what needs to be updated. It hasn't actually done any updates.

To do the actual updates, I'm going to run the command "sudo apt full-upgrade".

This will compare what I have installed to the update list and tell me what needs to be changed.

I have the option to continue or not. Hitting return selects the default Yes answer that's indicated by the capital Y and off it goes.

This does take awhile. It's a two step process. First it has to download all the actual items that it needs to install and then it has to actually install them.

Again, it does provide good feedback while it's doing this but it may take some time depending on how much needs to be changed and the speed of your internet.

In this situation, it took between 7 and 8 minutes that I've sped up through here.

Now that the updating is all done, I want to see how much storage space I have available for future development.

I'm going to use the "df" command with the "-h" option.

On the first line it's showing that I have 3.1 gig used and 110 gig is available.

That's out of 128 gig SD card. So that'd not doing too bad.

There is some overhead for the operating system of course and things like that.

The update process downloaded a bunch of files that really aren't needed anymore.

To clean those up I'm going to use a "sudo apt clean" command. That doesn't take any time to run. It just returns immediately.

Running the "df -h" command again shows that now I have 3.0 gig used, freeing up about 100 megabytes. Not a whole lot, but every little bit counts.

Now I'm done setting this up and so we're going to use the exit command to close the terminal.

All told, that took around 19 minutes to do the initial setup and now the Raspberry Pi is ready to be used.

For now I'm going to shut it down by selecting Logout and then clicking Shutdown.

You always want to make sure you do this when you shutdown so that everything gets written out to the SD card properly.

Do you have a Raspberry Pi now? Or are you thinking about getting one? What are your plans for it? Leave a comment down below. I'd love to hear about it.

I'll see you over here in this video that YouTube thinks you're going to enjoy.

And when making things remember...
Perfection's not required.
Fun is!