talking at the speed of lightning

I give so-called “lightning talks” at San Diego JS, a four-times-per-month local group on Meetup.com. Each talk only lasts five minutes so there’s time for several speakers within the span of a single event.

The venue is typically packed. Here’s a photograph of a typical turnout—there were about 120 attendees this month alone.

I suppose you can communicate a lot in a mere five minutes. It is a bit challenging to try to distill down all the things you need to say into this timeframe. There’s really no room for story-telling, just tell the straight facts and details as you race through your slides and screenshots and nothing more. At best, you can hope that someone will ask a relevant question which may allow you to go into some detail you’d earlier hoped to have included.

Challenges

Many of my projects involve more than one computer. Unfortunately, the security settings on most wi-fi routers at venues like this don’t want you to connect from one computer to the next. The router would actively prevent your demo from working. So I’ve learned to bring along my own networking, which is a hassle. This is especially difficult with IoT projects, for what it’s worth.

Another challenge is related to power. It seems like each of the speakers needs to setup prior to the event and so they all want to bring along their power adapters and plug in. This means that the venue would need to accommodate all those brick-style adapters and they usually forget this.

And I suppose, a recurring problem is that of screen resolution compromises that you have to put up with. You will have formatted all your screens for one resolution while creating your content, only to find that you’re now presenting in a smaller resolution. This then threatens to clip off content or the font size is now too small to be seen by those near the back.

Regardless, it’s a rewarding experience and I hope to give more talks in the months to come. I would encourage others to do the same. It’s a great opportunity to give back to the community of like-minded coders.

Advertisements

mobile app for the robo

I’ve written a new mobile app for the Robo C2 and Robo R2 set of printers by Robo 3D, a local San Diego—based company.

Robo-Home

Details

It’s written in the Adobe PhoneGap (Cordova) platform with Framework7 for the styling and scaffolding. It communicates to the underlying OctoPrint interface inside the printer itself. Rather than building several smartphone apps and being subject to the recurring annual developer fees by Apple/Google/Microsoft, I intend to serve it up in a more economical way: embed another single-board computer inside the printer.

PiZero

This will fit nicely on a $10 Raspberry Pi Zero W computer, as shown. It’s then powered by the USB 5V supply inside the printer and would be powered on every cycle. I’d then use my iPhone’s or iPad’s browser to simply connect to the app.

Progress

The app is fully-functional for the Robo C2 printer and sports a slick-looking interface.

Repository

Screenshots

And here are some obligatory screenshots of the app.

Robo-LeftPanel

Robo-Motors

Robo-Files

 

small screen for the raspberry pi 3

I thought I’d do some prep work for a project that I’d like to finish before the Christmas break:  a time-lapse rail kit for the Nikon D750 DSLR camera. I’ll be going to Arches National Park in Utah for that week and wanted to do some astrophotography and sunset time-lapse videos. Here’s vaguely what the rig will look like:

pi-lapse

This photographer/inventor David Hunt has done a pretty good job on his rig and has produced some stunning videos. I hope to take things up a notch since I have access to a 3D printer and a variety of extruded 80/20 aluminum rails from ActoBotics, for example.

Oh… and the entire rig will need to be portable since I’ll likely be backpacking it into the park. Fortunately, I have a sewing machine and a good supply of marine-grade canvas to create something to hold and carry all of this.

TFT

Fortunately, Fry’s Electronics sells some of what Adafruit has to offer and in this case, it’s a tiny TFT screen with a touchscreen built in. It’s technically called a “Pi Hat” since it connects right to the top of a Raspberry Pi 3, for example.

adafruit-1601

I’ve got it connected to a Raspberry Pi 3 and have inserted a new 4GB microSD card for this project and furthermore, have loaded Raspbian Jessie Lite for that image. Although my version won’t have a nifty graphical desktop like the photo above, it will still run touch-based graphical menus.

Python

Looks like I’ll be using the Python programming language for this project. I’d prefer JavaScript but I only have a few weeks to get this “production-ready”, so to speak.

Kivy

The next step in developing graphical menus which respond to touch is to install the Kivy  framework for Python. The menu should allow you to set some configuration options for the spacing of the photos, the number of photos for the series and things pertinent to stepping the camera along the rail using a motor. Finally, there would be start and stop features for each session as well as on-going status.

Nikon

The Nikon D750 has a remote-shutter system and I’ve managed to find a good third-party version of the cable which should come in handy for this. I’ve spec’d out that interface so I should be able to remotely fire off the camera from the Raspberry computer.

Overall

This should be a fun project. I hope I can finish it in the perhaps five weeks left before Christmas break.

words are loaded pistols

That title quote is by Jean-Paul Sartre but I was torn between that one and the following for this post:

One great use of words is to hide our thoughts.

~ Voltaire

Scrabble tiles

Was thinking it would be fun to design/print a Scrabble set this morning. And while it was printing I thought it would be even cooler to print extra letters and use them for signage, say, on your desk at work or something. Pretty awesome toy if you think about it; you could have a mugful of letters on your desk and say how you feel on any given day.

I had to tweak Cura’s (slicing software) printer profile to get the holder to print within the print volume since it’s pushing the limits. And I used the new GetToDahChoppa program I wrote for the multi-color printing.

DSC_0227DSC_0214DSC_0225

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

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