Book Read Free

Geek Dad: Awesomely Geeky Projects and Activities for Dads and Kids to Share

Page 12

by Ken Denmead


  We are going to make a simple LEGO structure that will let you and your child track the day, month, and date manually in binary. What does manually mean? Sort of the way the set of calendar blocks at the bank counter works—someone sets the date manually with them each morning. No, it’s not very high-tech. That’s not the point.

  First, how are we going to represent the day, month, and date in binary, you ask? Well, it’ll be a representational code, as I mentioned above. A given binary sequence, translated to its base 10 equivalent, will represent the calendar item. For example, the day of the week. There are seven days of the week: Monday, Tuesday, and so forth. If we represent each one with a number, 1 through 7, we can now translate that into binary. Since 7 is less than 8 (duh!), we can represent the day of the week in a 3-digit binary number, for which there are 8 (23) possible variations—1 in binary (001) represents Sunday, 2 in binary (010) is Monday, and so forth.

  For the numbers 1 through 7, which will represent the days of the week Sunday through Saturday, here is the day-to-decimal-to-binary relation:

  If we’re going to do the same with months, we have to expand a little. There are 12 months in the year, so we’re going to need a bigger binary number set to count up to 12. This time we’ll use a 4-digit binary number set (24 gives us 16 possible combinations, of which we’ll only use 12). See if you can see the pattern in the 3-digit set.

  And last, we have to do the same with the numerical day of the month. Since there are up to 31 days in any given month, we’ll need a 5-digit binary number this time (25 gives us 32 possible combinations, which is just enough to cover our needs).

  Now that we’ve got the code, what are we going to do with it? Well, what we want to build is something that lets us easily differentiate between two choices: 0/1, off/on, black/white—any pairing that makes it obvious that one of two possibilities are being displayed to demonstrate a binary state. There are a number of variations on this project online, the simplest of which uses pennies faceup, or facedown, to represent 0 or 1. But we like LEGO bricks. With LEGO bricks, there are some simple options available: either colors or face. And to make things really visual, we’re going to use both!

  Here I’ll acknowledge we’re really stretching you and your kids’ quick translation abilities with this project. The end product will require quick translation from a color/surface combination to the binary digit it represents; then translation of a group of such digits to their decimal version, and from there to their calendar meaning. Pretty tricky! But it’s doable, and a great training device for a sharp mind.

  This will be a pretty simple build as LEGO projects go. It makes use of pretty standard pieces, and if you don’t have them all on hand, you can improvise. Or even better, there is a downloadable file of the LEGO Digital Designer file for this project on www.geekdadbook.com, which you can take to the online store at www.lego.com to order the pieces you’ll need, or print out and take with you to your local LEGO store to buy the loose pieces.

  My version of the calendar is made on a 12-by-24 base plate. It’s somewhat of a nonstandard piece, and if you can’t find one easily, you can user smaller plates, overlapped and built up to get the same size and shape.

  All we’re doing is creating a double layer of black bricks that cover the entire base plate except for the places where our 2-by-2 bricks will fit to be used as the binary counters. In each of those slots, there will be a 2-by-2 base plate with a 2-by-2 smooth-topped plate at the bottom. This will allow us to slip the binary counters in and out easily.

  Make sure you put the smooth plates on the 2-by-2 plates before you start building the second level, or you’re going to make things harder for yourself later on.

  Once you have the base set up, you’ll make your binary counters—the easiest part, really. Just pick sets of contrasting 2-by-2 bricks, and make two-layer stacks. You’ll need three pairs of one color combination, four of another, and five of a third combo. You’re probably way ahead of me here, but these are going to be our 0/1 choices for our three different binary numbers that will represent the day, month, and date as we worked through above.

  So now you have to decide, for a given set of color-combined blocks, which color is going to be 0 and which will be 1. Whichever you decide to be 0, make that the bottom brick, so that when the pair is upside down, you actually see the circle shape that looks just like a zero, making it easy to remember.

  With all that figured out, assemble your counters and put them in their appropriate slots on the appropriate rows, all upside down (or 0) to start with. Then figure out what day it is, and use the charts above to figure out what the calendar should read. For example, the day and date of the writing of this chapter is Sunday, May 17th. Sunday is the 1st day of the week, so the decimal number is 1, and the binary number is 01. May is the 5th month, so the decimal number is 5, and the binary number is 0101. The date is the 17th, so the decimal number is 17, and the binary number is 10001. And the calendar readings should look like this:

  With a few weeks’ worth of practice, reading and adjusting the calendar should become second nature, and your geeks-in-training will have gained one more cool math skill that will hold them in good stead in the future.

  An Even Cooler Idea!

  Of course, if you really want to make this interesting, build a Mindstorms NXT robot that uses the color sensor to identify the counters and automatically updates the calendar each morning. Since the stock kit comes with instructions on how to use the color sensor to sort colored balls, it shouldn’t take too much geeky engineering with your kid!

  Portable Electronic Flash Cards

  Back in the day, there was nothing more intrinsic to the education process—especially the part of the education process that favored rote memorization over a holistic understanding of ideas and problem solving—than the flash card. They were, and continue to be, a simple idea: 3-by-5-inch rectangles of heavy paper stock, often with lines on one side, and available in a rainbow of colors. You write the question/problem/ buzzword on the blank side, and the detailed data or answer on the lined side. Then you take the cards and run through them, over and over, testing and confirming or correcting until the whole stack of learning has been transferred (hopefully) into your long-term memory—or at least into your short-term memory long enough to pass that upcoming test.

  These days, save for the hipsters and their Luddite PDAs, paper is passé, and toting around sets of cards for the sake of memorization seems so . . . quaint. But the function of first creating the cards (tactile learning through writing the data), and then repeated self-testing (visual and verbal learning), is still a valid technique. And it’s not as if our kids aren’t already used to carrying around portable information transference systems everywhere they go—Nintendo DSes or Sony PSPs, various Web-browsing smartphones, and so on. So what if they could carry around their flash card decks on their portable entertainment devices? Well, why not?

  Many portable devices these days have the means to browse the Internet, meaning they have some kind of Web browser installed, whether it’s Safari on the iPhone, the mobile version of Internet Explorer on Windows Mobile devices, or the browser on the Sony PSP. What this means is, they can view HTML files and can usually also read the JavaScript language. The goal of this project is to give you a JavaScript file you and your child can edit (even if you’re not a true “coder”) to create your own decks of flash cards to carry and access anywhere on a portable device.

  But let’s take a step back to the beginning. This project started with my friend Bill Moore, a buddy of mine since high school and a groomsman at my wedding. Bill is a good geeky dad in his own right. He would faithfully help his son prepare decks of flash cards to learn school material, but he was troubled by the inefficiency and downright environmentally harmful nature of the task. The cards were usually of value only for a short time—once the subject was quizzed and done with, the cards were not useful any longer and they became a terrible waste of money, effort, and trees
. He and his son tried writing them in pencil so they could erase the text and then reuse the cards, but that became very annoying very quickly. They didn’t want to abandon the usefulness of the flash-card method of learning, but they needed to figure out a better way of doing it.

  Then one day, Bill had a brilliant idea. Considering that his son carried his Sony PSP just about everywhere he went, Bill realized doing something electronic could be the solution. Since it was what he was familiar with, he started with a Perl script that would generate a file viewable on the PSP’s Internet browser, and then worked out how to save and access that file in the root directory of the PSP’s internal storage. The proof-of-concept worked, but it was a little ungainly for repeated use, so he did some research and figured out JavaScript could be the answer he was looking for. With a bit of work, and about 30KB of coding, he had a functional script with which to build “decks” of electronic flash cards.

  The full script is available online for free, as an open-source project, at www.geekdadbook.com.

  Most of the code builds the look and functionality of the tool (features which, if you are a scripting guru, you are more than welcome to improve and share), but the important part to understand is this stretch:

  This is where the actual data is stored. Everything between “function initCards() {“ and the last ”}” is the contents of the deck. The structure is pretty simple: “newSubject” creates a new subject listing for a stack of cards on a particular topic (in this case, Science—with the quotes); “newChapter” starts a sub-subject (or, um, chapter), and then “addCard” starts a new card. In between the parentheses goes the front side text, in quotes, a comma, and the back side detailed info, in quotes. Like this:

  What’s very cool is that you can do as many subjects, as many chapters, and as many cards as you want, simply by repeating the basic script over again on new lines and changing the titles. You could, if you and your geeklet wanted to, have a stack for every school subject (say Science, Math, English, Foreign Language, Social Studies). In each of those, create a chapter for every chapter in his textbook for the given subject, and then as the school year progresses, add the cards for a given chapter as it was learned in class, so that by the end of the year, the deck would represent all the key facts your child learned, and be the ultimate study guide for finals.

  But more important, once you and your kids have learned how to build the electronic cards, work with them to choose what goes on a given deck, but have them do the coding. Just like making handwritten cards in the “old days” provided half the educational benefit (tactile learning—going through the experience of writing or typing the information, is just as valuable as auditory—listening or speaking it), building the electronic cards may hold just as much import in the learning process.

  The last step is getting the file (probably named “flash-cards .htm” or something like that) onto your portable device. Since the project was first devised for the Sony PSP, let’s look at that:

  ELECTRONIC FLASH CARDS ON A SONY PSP

  1. Use a USB cable to mount the PSP as a drive on your computer (may require a trip to the devices settings to allow it).

  2. Create a folder in the root directory with a short, easy name (like “local”), and drop your flash card file in there.

  3. Unmount the PSP.

  4. Go to the PSP’s Web browser and manually open the following URL: file:/local/flash_cards.htm. Please notice there is only one forward slash in the URL. For the savvy Web-heads, no, this is not a typo. It is rather a quirk of the Sony PSP’s root access that took some deep Googling to uncover.

  5. Having accessed the file, you should be up and running with the flash cards. I suggest you use the PSP’s bookmarking ability to save the URL so you don’t have to reenter it manually each time. I will also point out that knowing all this about root access of the PSP opens up the ability to save and access music, movie, and other files locally on the system. However, hacking your PSP is not what this book is about, so I’ll leave it to you to explore some other time.

  ELECTRONIC FLASH CARDS ON AN I-PHONE OR I-POD TOUCH

  Devices from Apple are notoriously less accessible than their counterparts from other manufacturers, for both good and bad reasons. For our purposes, though, it doesn’t matter. Indeed, the process is easier than the PSP but slightly more expensive, because you’ll need to pick up a helper application. There are a variety of file storage and viewing apps available on the iTunes App Store for a variety of prices, but the two with which this project has been tested are Files and Pogoplug. Files costs $4.99 but is a great utility for accessing the storage available on your iPhone, and it allows you to upload files from your desktop/laptop computer to the phone for viewing. Pogoplug is free, but it requires you to own the $99 Pogoplug device for turning an external hard drive into network and Internet-accessible storage. Both these apps will let you store the flash card file on your device and run it. As more apps are tested, they will be listed on the www.geekdadbook.com Web site.

  ELECTRONIC FLASH CARDS ON OTHER PORTABLE DEVICES

  Realistically, any portable device with a browser and local file access should be able to use this tool. This includes all manner of smartphones as well as (rather obviously) netbook and laptop computers.

  ELECTRONIC FLASH CARDS HOSTED REMOTELY

  The alternative to actually carrying the file with you is, since the portable flash cards tool is in its essence a Web page, to host it on a personal Web site or other remote-access file storage and call it up whenever you have Internet access.

  The portable flash cards tool is intended to be an open-source project, and you are welcome to take it, improve it, and adapt it for your needs.

  Wi-Fi Signal Booster

  Most modern households, especially those with geeky parents and children who spend copious amounts of time connected to the world via the Internet, have wireless LAN setups with a router so the whole family can enjoy a wireless connection from anywhere in and around the house.

  At least, that’s the idea.

  The reality is often something less functional. If a router is set up in the den/office, and Mom wants to connect and check her stock portfolio while sipping a mai tai in the sunroom, her connection may be fuzzy. Or if one of the kids wants to do research for his report on quantum vibration from the tree house out in the backyard, the signal may not be able to keep up with him. This is because the strength of the radio signal from a Wi-Fi base station drops off in steps over various distances (assuming nothing reflective gets in the way), and each step usually also degrades the available bandwidth. You need to maintain a strong signal to have a strong, higher-bandwidth connection with the base station.

  It is possible to use repeaters—additional routers placed elsewhere in the house to repeat and amplify the signal—if you have a large house to cover, but that means buying extra hardware to place in additional locations, which could be a waste of money if you need the extra-strength connection only occasionally, or in a variety of locations. What if you could make yourself something with simple materials to boost the signal to your laptop and that you could move around the house with you as needed, and for less money than an extra wireless router? You can!

  If it isn’t yours, there is likely at least one house in your neighborhood that gets satellite television. While the modern dishes are rather more compact than the van-size versions of the past, they all use the same concept: A concave reflector gathers and focuses electromagnetic waves of a particular range of frequencies into a receiver for translation into useable data. They point at a satellite out in orbit that is blaring its signal toward the side of the Earth facing it, and the dishes collect those signals and reflect them to a middle point for greater strength of reception. Our receiver will do pretty much the same thing with the radio signals given off by your Wi-Fi router.

  There are three key elements to this project—the bowl, the USB Wi-Fi adaptor, and the USB extender cable. Everything else is about how to make the se
tup useful and mobile, and you may want to play with other ideas.

  The bowl doesn’t actually have to be a mixing bowl, but those are easily available in a variety of sizes, and while I haven’t done extensive testing, it would make sense that the larger the bowl you choose, the better the results in signal boost. You can also use a pan or skillet lid, but whatever you choose should be metallic and concave.

  STEP 1: To start, drill two holes in the bowl, one at the exact center (where, if you use a pan lid, there may already be a starter hole from the handle/knob you’ll have to remove), for the Wi-Fi adapter, and one partway down the side for the tripod mount. Carefully measure the adapter, and it will take a little drilling and filing skill to get the center hole right, because the cross-section profile of the adapter will probably be more of a rectangular ellipse than a circle. You should draw the profile on the bottom with a black marker, then drill two to three holes to clear most of it, and use a metal file to finish it off. If you’re going to use a camera tripod as your base, the second hole you drill should be ¼ inch, located about a third of the way down the side of the bowl or lid. Try to make sure it is located on a line that is perpendicular to the wide axis of the adapter hole (math geeks should understand that sentence; if you need help, go find a math geek and have him or her explain it to you).

 

‹ Prev