get to dah choppa

Today’s post title comes from the Schwarzenegger movie Predator but the dialog has taken on a life of its own in the world of memes.

Get-to-the-choppa

GetToDahChoppa CLI tool

I’ve just completed another program written in the Go language compiler which will take an existing GCODE file for 3D printing and chop it into as many layers as you’d like.

Repository

Color by layer

You might be wondering why you’d like to do such a thing. One of the best reasons I could think of would be to print different colors on the same part. In this part example displayed, black filament is used from layers one through seventeen and white is used from layers eighteen and up. The result looks quite professional even if this is using the lowest quality setting on my printer and it took less than twenty minutes to finish.

DSC_0199

Saving an aborted print

Sometimes things go wrong. In the example below, my (costly) carbon fiber—infused filament spool ran out during the print job, noting that the printer arrived with a faulty run-out switch. For most people, they would just start over on such a part, wasting the plastic and the hours spent and begin again.

IMG_0213

Fortunately, you can now chop your original GCODE file to just print the missing top to save the day (and the part, of course).

IMG_0195

Advertisements

keeping busy

Sorry for what must seem like a brief interruption in posts but I’ve been busy lately. Perhaps three weeks ago I left my job at the pharmaceutical company and I’ve now picked up an evening gig two nights per week at a software coding academy in downtown San Diego, having started on Monday of last week there.

Parts

Of course, I’m continuing to print parts on the 3D printer. I just designed a pencil holder and a coin with the academy’s initials as part of the logo and have printed each as samples.

Software

I’ve recently created some programs and plugins in the 3D printer space.

Tutorials

I created a short fifteen-minute presentation for ES6 Let & Const and presented that on Tuesday evening and I just finished a tutorial on 3D printing for them as well. I’m now an instructor so I’ve been reading through their curriculum to get myself up-to-speed as quickly as possible.

Upgrades

I’m currently working on a pass-through for the Robo C2’s now unused filament holder hole through the back of the printer since the dual-spool upgrade has been so successful.

In conjunction with this is the second-extruder upgrade project as well as another to allow my Nikon D3200 camera’s remote shutter release option to be fired off by the printer itself. As part of this, I’ll be moving the speaker to the outside of the printer so that it can be heard better.

I’m continuing on the final implementation for the dual-filament run-out detection block which wants me to do some soldering.

Food

I’ve had some recent successes making tasty meals. One advantage to working less hours is that you now have the time to make great food instead of relying upon packaged dinners. I’ve made some convincing Indian meals from scratch and without a recipe which is new for me. And when I say “successes” earlier, I guess I mean to say that I’ve created what is to me some of the best food I’ve ever eaten (soup, chowder, chili, spaghetti sauce). I now have perfected mango lassi, another Indian favorite, and the basic smoothie recipe. I’ve learned to buy chicken in bulk and then to cook it in a variety of ways which keep it tender and moist while still ensuring that it’s thoroughly-cooked. I routinely pan-flip what I’m cooking like a pro.

Did I mention that I own a toque blanche and a chef’s uniform? I was fortunate enough to take some seminars at the California Culinary Academy. I would say that sauces and breads would be my specialties… or perhaps apple pie.

I’m now batch-making tea and iced mocha for several day’s consumption because I’m like that. I would be baking things to the extreme but San Diego’s weather has been so hot lately that I avoid the oven now when I can. Perhaps next week will cool down a little for that.

circle of fifths and a capo

I’ve learned a lot by watching other guitar players like James Taylor who is both smart and a little lazy. I like that, though, because I’m the same way. Rather than remembering odd chords like C#min, which fret that’s barred across and the chord shape, I’d rather focus on making fast chord changes in an area of the guitar’s neck that I can better control for sound. But maybe you don’t know all this, so a small refresher could be in order.

Chord Progression

Honestly, most western music has a chord progression which is reasonably similar, believe it or not. But knowing this requires a little music theory. Rather than going into that, I’ll just say that it does and that we can use a trick to make this a lot easier.

Circle of Fifths

Somebody spent the time to organize all the chords and their relationships with each other. It’s called the Circle of Fifths because any major chord clockwise from the last is the “fifth” in the last one’s progression.

For example, in the key of Cmaj: C, D, E, F, G… that G note is the fifth note of Cmaj. So you’d expect Gmaj to be the next clockwise chord and of course it is.

CircleOfFifths

Majors and Minors

A Cmaj scale begins with C and has all white notes on a piano in its scale. Oddly enough, an Amin scale begins with an A and also has all white notes on the piano in its scale. So depending upon the lowest of three notes you might play within a Cmaj or Amin, it might sound similar. The distinction is probably even less on a guitar with only six strings and a limited set of octaves, given the tuning.

We then say that Amin is the relative minor to Cmaj. In the Circle of Fifths, you’ll find them either on an inside/outside ring close to each other like the one above.

All Kinds of Time – Fountains of Wayne

The guitar song I’m learning today is something I bought from iTunes yesterday. It sounds simple enough and I’ve just searched for the guitar tabs although they’re often unusable as published. I say this because a lot of guitar players out there don’t know enough musical theory to make this easy.

What I do get from these websites is the key that the song was written in and an attempt of someone’s to follow the chord progression. I’ll then use this as a starting point to make this a useful tab.

Circle of Fifths + Capo = Win

A capo is a device which you can attach to the neck of your guitar to basically change the pitch of all strings at the same time. By putting a capo in the right place, you can adjust what chord you actually play to get the chord you want.

Capo

Back to the chords in question, All Kinds of Time includes the following chord progressions.

Intro & most stanzas of the song: Emaj, Bmaj, C#min, Amaj
Chorus: Emaj, Bmaj, Dmaj, Amaj
Bridge: Amin, Emaj, Bmaj, Amin

Unfortunately, that’s a lot of barred chords. In theory, they’re alright but they don’t allow you to easily add/remove strings (hammer-on/pull-off) to make things a little more interesting. If I can move things down to the first position, I know that I can do this so it’s worth the effort.

Looking at just the intro for a moment, I’ve written the chords as numbers (1 through 4) on the Circle of Fifths. Now that we know the song progression’s shape, it’s easy enough to play it either in a different key altogether or—by adding a capo—we can play in the original key but in a different set of chords that will end up sounding like this.

AllKindsOfTime

So my first attempt was to try to change it—as played—into the key of Cmaj. This resulted in a collection of chords which I was mostly happy with but I didn’t like one of them. Next, I then moved it into the key of Dmaj as played and that works out much better.

The Easier Way

Add a capo to the 2nd fret and play the song with the following chords instead (as if the capo is the nut).

Intro & most stanzas of the song: Dmaj, Amaj, Bmin, Gmaj
Chorus: Dmaj, Amaj, Cmaj, Gmaj
Bridge: Gmin, Dmaj, Amaj, Gmin

Only the Bmin (second fret) and the Gmin (third fret) now are fretted chords and the rest are all in the first position. Having drawn the chord progression numbers on a laminated Circle of Fifths, you can then just move them around and the same shape as used before, just with a new starting position.

This puts a Dmaj chord as the one most-used and it’s quite arguably the prettiest-sounding chord for hammer-on/off decoration on the E string. The Amaj and Bmin chords get similar treatment on the same B string. The Gmaj can be decorated on its A string. It sounds rather good and I’ve only just begun playing it today. This would have been hopeless, as found on the Internet and I’ve just turned it into a playable song with a little trickery that I learned from James Taylor.

go figure

For years, if I needed to write a computer program, I’d have used one of the following: C, C++ or C#. Those have been the mainstays of programmers who needed an executable program for at least the two decades. Today, though, I’ve just written my first executable in a new language that’s surprisingly easy to work with.

Go

The Go language is like the new kid on the block of compilers. Like the ones mentioned before, it will take text and convert it into instructions the computer can do.

Probably the best thing about the Go language is that it’s entirely open-sourced. If you wanted to work on the compiler itself, you could do so.

SlicingInfo

The program I’ve just written is technically called a Command Line Interface (CLI) program and will display technical details inside the selected GCODE file for a 3D print job.

Repository

Typical session of the program in use:

$ SlicingInfo RC_3DBenchy.gcode
Slicer:          Cura_SteamEngine 2.3.1
Layers:          239
Quality:         low
Profile:         Low Quality Robo C2
Filament size:   1.75
Hotend temp:     190
Bed temp:        0
Supports:        False
Retraction:      True
Jerk:            True
Speed 1st layer: 10
Print speed:     50
Travel speed:    80
Infill pattern:  cubic
Finished.

dual-spool coolness, etc

Anticipating a dual-extruder upgrade soon for the Robo C2 printer—imagine printing in two colors for the same part—I’ve designed and printed a dual-spool holder for those two filaments. It’s an upgrade for the printer and works much better than the original holder.

SideView-C2andHolder

The original spool holder stuck out of that rectangular hole in the back of the printer, sometimes falling out during the middle of a print job. Aesthetically-pleasing but impractical, I’ve now replaced the original.

DSC_0062

I’ve created step-by-step instructions for creating two versions: one for the full kilogram rolls and one for the half-kilogram variety.

Repository

Stability

Another design challenge with the Robo C2 printer is the way that the print bed is cantilevered from the back of the printer. It’s a bit like a diving board and similarly wobbles at its front-most extremity as you’d expect. This isn’t really optimal for 3D printing because it results in poor quality with taller parts and especially those which are oriented toward the front of the printer.

robo

CantileverStabilityPlate

I’ve therefore designed a cantilevered stability plate to afix to the bottom of the print bed itself which should provide some firmness in this dimension. Eight M3 type aluminum bolts are the only thing needed other than this part.

Repository

five minutes to admin status

You’d think that a work or home computer would be reasonably secure since companies like Microsoft have 70,000 employees and perhaps some of them are dedicated to the task of keeping you safe.

Would it surprise you to know that it takes me on average about five minutes to hack into a Windows (NT/XP/7/8/10) computer?

No, really. In about two minutes and with physical access to the computer in question, I can insert a USB drive, boot it into another operating system and make a couple of adjustments. Rebooting then without the USB drive (perhaps another three minutes), the system is hacked and I have admin access.

If you wanted to protect your computer from this kind of hacking attempt, you’d need to physically lock it up when you’re not there.

BadUSB

Not that I use this technique, but there’s even a hack now in which something innocent-looking like a keyboard or USB thumb drive or a camera could go rogue. We’re used to devices like this to be well-behaved. If it’s a keyboard, it behaves like a keyboard. But just because they usually behave, that doesn’t mean that someone couldn’t program it otherwise.

In this case, hackers pushed code to the small firmware area of a USB drive so that it initially behaved like a USB drive… only later to change its mind and report to the operating system that it now wanted to be a keyboard. I don’t think anybody saw that coming.

So… re-formatting the USB drive would make the problem go away, right? No. In this case, the actual code is on a different chip in the device so you—the consumer—have no way to get to that chip.

But it gets worse. The device could pretend to be an Ethernet card or almost anything else. It could log your keystrokes, alter files, send emails using your email program, install software, it could transmit your keystrokes via radio waves so that someone remotely could pick them up.

If you wanted to protect your computer from this kind of hacking attempt, you’d be super vigilant about which devices you plug into your computer.

Broadpwn

As if that weren’t enough, someone hacked what is quite possibly the most used wi-fi chipset in all mobile devices, the Broadcom chip. At least six billion smartphones are affected by this exploit which was described this summer.  If an Internet worm is created which uses this exploit, it could jump from one device to the next and right past login prompts, anti-virus software and firewalls without stopping.

If you wanted to protect your computer from this kind of hacking attempt, you’d need to immediately upgrade your smartphones and other portable devices which include wi-fi.

Conclusion

At the moment, there doesn’t appear to be an unhackable operating system. I can’t imagine being someone in the military or the government or in charge of a bank right now because it’s just an ugly time for security. You seemingly can’t trust even a computer mouse in a world like this.

I suppose it’s best then to suggest that you backup your important data frequently enough so that you don’t lose everything at some future date.

photography

Soon enough, I’ll be hacking some sort of remote shutter thing to my 3D printer and firing off photography from GPIO within a sliced print job. But for now, I’m just getting used to this camera. It’s a Nikon D3200 and these were all through a Nikon AF-S 55-300mm zoom lens, aperture-priority, F/8 on a semi-cloudy day in Pacific Beach with an Insignia UV filter and lens hood.

DSC_0068DSC_0079