don’t make me clamp you, part 3

Oh, the fun.  After a few fails, I managed to print out several C-shaped clamps in carbon fiber—infused PLA, finally getting the temperature right.  I then spent several more hours in Autodesk Fusion 360 to further tweak/finalize the bottom of the chassis for the Raspberry Pi 3 supercomputer and sent that off for a 56-hour print job.  Whoa.

IMG_0139IMG_0138

Four of these clamps then were employed during last night’s printout while it was still going.

IMG_0149IMG_0151

Unfortunately, the pause feature that I’d asked for in the slicing software went rogue upon resume and tried to bury the extruder into the plastic, forcing me to abort at 4am this morning.  <_<

At least there’s much less part curling at the base versus last time. So I think I’ll redesign the clamps to have an even lower top profile and clamp right after the first four layers of the raft are down.

 

don’t make me clamp you… (part 2)

You wouldn’t believe the difficulty I just had getting Autodesk Fusion 360 to do what I’d thought would be trivial: I wanted to cut down an existing part from Thingiverse to meet my needs.

Thingiverse ≠ OpenSource

The first thing I learned yesterday from this is that—even though Thingiverse seems like a wonderfully collaborative place—it isn’t actually open-source. If this were open-source, then in addition to the mesh (STL) files that are shared, each author would also include their project file as well (DWG, for example).

Don’t get me wrong, Thingiverse allows people to share their work. And yet, it isn’t the same as github which allows someone to take 100% of what you worked on, tweak it and then share that as well. It’s this iterative modification that makes open-source so powerful. And the reason behind that is that each new person doesn’t have to start from scratch.

CAD Project File

A typical computer-aided design file will include a variety of information. Most, though, are built around the concept of an initial sketch in two dimensions with a variety of measured constraints, for example. One then brings that 2D sketch into the third dimension and suddenly you have a part.

If you’d like to then edit the sketch or change the height of the sketch in that third dimension, you’d need to have that project file. (Thingiverse does not share project files.)

Mesh File

At the end of a design session, it would be necessary then to export that part into a 3D model which is usually a collection of points and triangular faces. The sum of these describes a solid in 3D space. (These STL files are shared on Thingiverse.)

Toolpaths File

Once you’ve exported your own design to an STL file (or you’ve downloaded one from someplace like Thingiverse), the file is taken into software like Cura if you’re trying to print to a 3D printer. This is known as “slicing” since it’s Cura’s job to know your printer well enough that it may slice your part from the bottom, up. Each layer then is converted into a number of instructions called G-code which tells the printer exactly what to do at every step of the way. (Thingiverse does not share these files either.)

Autodesk Wants You to Design in Autodesk

It was clear from my initial interaction with Autodesk’s support that they don’t want you to work using other software. They want you to start over and redesign your part in their software. Given that they charge $40/month to use the software, it’s easy to see why.

They actually do support the conversion of a mesh file into your project file in such a way that you can cut it, for example. They just hide the feature as an Easter Egg; only after turning off project journaling (Time Line) can you see the Mesh-to-BRep option. Granted, the program became painfully slow using this feature since it was grappling with about 50,000 triangular faces. Eventually, though, it processed the mesh file and I was able to apply the cutting action to remove some of the clamp from Thingiverse.

Progress So Far

Knowing that I could further modify the C part of the clamp should I need to, I then set the first of two prints into motion.

With the standard white PLA filament in the printer, I was able to print this in just over twelve hours last night. It’s a collection of eight screws plus their respective protector caps for the ends of those ball points. And tonight, I’ll print the C-shaped parts in black carbon fiber PLA for its added strength. (I’ll need to break them away from the adhesion raft, of course.)

IMG_0123IMG_0124

In case you’re wondering, I had to laboriously place each of the sixteen individual parts into Cura’s workplace, carefully including enough space between them. The tighter you bunch them, the less movement the printer will have to do and the faster it will print. Get them too close and the extruder might bump into one of the other parts or perhaps merge two parts together.

As you can see from the slight bit of raft curl on the right side in the second photo, these clamps in theory will do a nice job of holding the raft down into the bed for the first inch or so of the part’s printing. In some cases, they should save what would otherwise be a failed printout.

keeping your pi cool

An average computer’s operating system maintains some logistics about the cpu, like its input voltage, temperature and the like. The Raspberry Pi single board computer is no exception and will even scale back its speed if it determines that its internal temperature is getting too high. That’s a good thing but another approach is to proactively cool the cpu with a fan when it’s approaching that threshhold.

pi-temp.png

Since I’m creating a cube-like chassis to hold four of these Raspberry Pi 3 computers, I’ll soon need this functionality. So I’ve just created a new repository with JavaScript code to return the cpu’s temperature in fahrenheit/celsius as a string or a number. One could then programmatically turn on/off a fan using the GPIO pins using this information.

Here’s that repository:  raspi-temp

taking the bite out of stamps.com

Stamps.com offers an online service in which you can digitally apply postage to an envelope.  They even include a nifty/free digital scale to attach to your computer.

StampsDotComScale

The problem of course is that in order to make back the cost of that “free” device, Stamps.com wants to charge you on a monthly basis to use this service and most people decide that it’s not worth those charges.  I often see these sitting idly on someone’s desk and it’s only useful for measuring the weight of something.  Without their service, you’d then need to manually lookup the postage and then count the right number and types of stamps.

I’ve written a Windows program which will do all that for you, weighing the envelope, calculating the postage and letting you know how many stamps of which kind to put on it.

Postage

Here is the new repository on github.com.  You can run it directly or build the program yourself if you have a copy of  Visual Studio, to include the free Community version.  Your computer will need the .NET Framework 4.5.2, for what it’s worth.

the robo 3d c2 printer

For months now, I’ve been wanting a 3D printer to create plastic parts and I’m guessing that I just made the best choice by buying the Robo C2.

robo

First Impressions

First of all, it’s an attractive printer in the same way that EVE (from the WALL•E cartoon) was cute.  Perhaps you can see the resemblance?

eve

Second—and you guys should know by now how I love them—this printer is driven by a Raspberry Pi 3 computer inside!  I hope to clone the microSD card in that computer and go to school on their efforts to hack an even better printer out of it.

Third, the product is open-sourced and crowd-funded.

Fourth, they’re a local company.  Their office is maybe a 20-minute drive from where I live in San Diego.  Given that most people would have to purchase this online and have it shipped, they wouldn’t get to see it in action like I just did.

Fifth, it includes an iOS app which allows you to control this and any other Octoprint-enabled printer.

Sixth, at 20 microns, it looks to have the best resolution of any of the printers I saw at Frye’s Electronics and most of those had a price tag above $1400 to reach the 50 micron resolution level.

Finally, it looks like it comes with a one-year license for Autodesk Fusion 360 which appears to be a very nice program for designing.

Research and Past Experience

I spent a fair amount of time before purchasing this by researching 3D printing, the types of plastics, the pitfalls to overcome, etc.

This particular printer doesn’t have a heated bed (the place where the project is made) so it may not do a great job with ABS plastic without a lot of trickery.  The standard voodoo that is necessary is to get inventive with the bed covering so that the project adheres nicely, doesn’t skip around and further, doesn’t warp due to uneven heating.

So for an unheated bed, the PLA type of plastic is the suggestion here and I’ve purchased an additional two rolls of the stuff to get things started.

Interestingly-enough, a few years ago I worked in a large plastic manufacturing plant so I have a little experience making plastic of the rotomolded variety.

caveman

In this industrial-sized version, colorized plastic powder is measured and put into aluminum molds on a steel frame wheel.  And this wheel then is inserted into a very large 700°F oven.

But for the consumer variety, you spend most of your time in a computer-aided design program, send a job to the printer and then wait hours (usually) to see how it turned out.  This ought to be interesting.

Projects

I have a few projects in mind for this.  I snagged a Robo Drone Kit while I was at Frye’s to give me a project which should produce some reasonable results.

dronekit

I hope to design and print an enclosure for the e=mc2 project from earlier.  Although it’s difficult, I hope to make this a clear enclosure ultimately.

I’d like to work up a design for a heated bed for the Robo C2 since it sounds like this would make ABS-related print jobs more successful.  I think I’d also like to test new bed materials since the field of 3D printing is still new and inventiveness is required here.

Given that the Robo C2 has a Raspberry Pi computer inside with OctoPi software running on it, I should be able to modify the design, add things onto the printer and do notifications, for example.  I could add an internal webcam to it, for example.

And then finally, I think I’ll spend some time on post-print finishing techniques to see what I can do in this area.

Results

Here’s the first printout from the Robo C2 after some upgrades and dialing in that critical z-adjustment.  Obviously, it’s a money clip.  It’s light blue but the red background makes it look gray otherwise.  It’s very smooth for a 3D-printed project and amazingly so for the $699 price tag on the printer.  The small, flat piece is called a “raft” and is meant to make things stable during printing, btw.

to type or not to type…

that is the question.  Rather than a Shakespeare reference, I’m here referring to a term in software development which determines how a language deals with variables, for example.

Define: type

When you create a variable in a computer language, it’s usually something like this:

var someVarName = 1;

In a case like this, we might infer that someVarName stores a number (an integer).  We might say that the someVarName‘s type is integer.  Using a pet-ownership metaphor, it’s like purchasing a dog house first (“someVarName”) and then next buying a dog to put into it (“1”).  You wouldn’t buy a fish bowl to store a dog… although this seems to work out great if you own a cat.  JavaScript, e.g., is like this picture:  it doesn’t seemingly care if you want to store a cat in a fish bowl.

cat-in-a-bowl

Two Schools of Thought

There are two camps out there:  those who like languages which force the variable type and those who don’t.

A statically-typed language usually involves a step in which your code is converted into something else (compiling) and any type-related issues must be fixed before a program can be created.

A dynamically-typed language is run “as is” and the code is evaluated at the moment of truth—determinations about the type of a variable are made at this time.  If there is a type-related issue, your end-user could be the first person to see the error.

Statically-Typed Dynamically-Typed
Java JavaScript
C++ Python
C# PHP
C Objective-C

The Pendulum Swings

Over the past three decades, the popularity of either approach has waxed and waned.  It’s safe to suggest for the moment that the less-strict languages are gaining rapidly in popularity over their stricter counterparts.

most-popular

We have the world of open source to thank for the popularity and speed of development we’re currently seeing in these dynamically-typed languages like JavaScript and Python.

Seeing the Future

Honestly, though, there are too many people in that strict-is-better camp and their influence is felt within software development companies.  If I were to guess at the future of JavaScript, I’d probably have to say that TypeScript and Flow will gain in popularity as larger development teams look to lower the number of bugs in their code.

I don’t know, though.  Maybe it’s time that we just relax and let the cat hang out in the fish bowl.

 

the rise and fall of the microsoft empire

1975-1980

Our historical timeline begins in 1975 when an unlikely duo—Paul Allen as Batman and Bill Gates as his awkward “Boy Wonder”—started Microsoft Corporation.  I’m guessing that ro-sham-bo was involved in this decision but incredibly somehow Bill was made the CEO when the company got its start.  Maybe dropping out of Harvard gives you that kind of confidence.

1981BillPaul

1981-2000

Nothing really significant happened until they managed to modify an existing operating system for the IBM PC in 1981 from another company and rename this to MS-DOS. Significant sales of the IBM series of computers and those of their competitors then launched a thirty-year stretch of dominance in the business world in the area of operating systems, software and development platforms.

For most of us, we reasonably dismissed Apple’s hardware and the MacIntosh operating systems as nothing we could seriously use in business outside of the marketing department.

Consumers bought new versions of software and that license was good for life.  It could often be transferred from one computer to the next as long as the last one was de-registered first.  If you built software for Windows, you likely used a Microsoft compiler to do so and you paid for that.  In fact, the Microsoft Technet collection of CDs was quite expensive.

2001

About six years into the “Internet Tidal Wave” as Bill would call it, Microsoft was starting to lose its way.  They tried to dominate in the browser wars but never quite managed to quash the competition.  Others saw their efforts in this area as annoying.  Their software for creating programs, Visual Studio, first hit the scene about four years prior to this.

Google was founded some five years prior and was just beginning to get attention from an investor before they had anything real yet.  In 1999 they moved from their garage to an actual building in Palo Alto.  Yahoo’s popularity as a search engine from a decade ago was waning.  Google’s ad-based revenue from keywords was paying off; they’d planted a money tree which eventually created an entire forest of money trees for them.  It wouldn’t be long until Microsoft’s executives behind closed doors would consider Google their biggest threat.

About this time Apple created a very clever method of provisioning content for one-and-only-one device within the music-delivery space.  The iTunes store would turn out to be the goose that laid the golden egg, as seen in the following revenues.  And yet, it would take years for either Microsoft or Google to realize the beauty in this fulfillment model and to come up with their own versions.

showmethemoney

The “Internet of Things” concept started gaining in popularity at this time.

2009

Microsoft’s attempts at copying Google’s success (MSN Search, Windows Live Search, Live Search) now culminated in the introduction of Bing as their default search engine destination for all things Microsoft.

Apple introduced the first iPhone and the first iPad about this time, noting that the same provisioning model from iTunes was incorporated into both via iOS.  The subscription model of sofware licensing was born with this, if you think about it.  If you wanted to write a program for either, you needed to use Apple’s software to do so.

Google has just introduced Chrome as a browser and would begin their campaign to slowly break Internet Explorer.  The same was true of the Android phone and its related operating system.  It would take a few years for Microsoft to catch up to either the iPhone or the Android before releasing their own app-savvy smartphone offering.

Amazon some three years prior had introduced the beginning of what would be a full complement of cloud-based services to support web development.  It would take Microsoft two full years to realize that they needed to be in this space and they didn’t have their offering ready for a few years more, too late to effectively compete.

Github.com had just celebrated their first year online, hosting over 46,000 repositories by then.  The world of open source was the very antonym to the way that software had been developed prior to this.

The free Ubuntu operating system was released about four years prior to this, backed by the well-funded company Canonical.

2015

Microsoft releases Windows 10, “the last version of Windows” (they claimed).  Rumors suggested that Windows would eventually go from a version-based license model to an annual-subscription model with respect to pricing.  I think it’s safe to say that the market hasn’t really embraced either Windows 8 or Windows 10.

The subscription-based model for Office 365 was introduced four years prior to this so the writing was definitely on the wall:  Microsoft wanted to depart from their former methods of making money and to chase the monthly subscription model.

2015-popular-coding-languages

The world of open source was offering new programmers a wealth of free code.  All they had to do was to take it and make it their own.  Formerly, Microsoft-friendly coding languages like C, C++, C#, VB and .NET dominated the playing field but this graphic shows how the game had changed.

2017

And here we are, present-day.  That curious number 42 now describes the number of years that Microsoft has been around.

Yesterday evening, I attended a very geeky meetup of perhaps fifty or sixty coders and only saw one Windows-based laptop.  Almost everyone had a MacBook of some kind.

I just spent about two hours today installing the free Visual Studio Community 2017 software so that I could—in theory, anyway—alter a free copy of the source code for TightVNC software.  Out of the box, so-to-speak, Visual Studio doesn’t want me to build this project since it uses an earlier target platform (Windows 7 or 8, one would assume).

Microsoft only wants me to make things for Windows 10.

So rather than making it easy for me to build a program that will happily work with Windows 7, they’re forcing me to jump through hoops in order to add the necessary pieces for this to happen.

Add two more hours to this and I find that my installation does not want to download the earlier pieces to allow this to happen.  I’m forced to then upgrade the code to Windows 10 compatibility mode… only to find that the build fails with 528 errors.

The main crux of all these errors appear to be:  “we can’t find common files”.  It’s a very amateur sort of error from a company that’s been providing compilers for several decades now.

I have to think that Microsoft doesn’t want me to do anything with Visual Studio unless it benefits Microsoft.  And this is the core of the reason why I suggest that they’re doomed.

Every time a coder like myself runs into obstacles like these, the usual seed that’s planted inside their head is “this would be easier with another free compiler or another language from someone else”.

2022

Fast-forward another five years and Microsoft will have lost ground on many fronts.  New software development here, there and everywhere will be via some language which wasn’t popularized by Microsoft on computers which aren’t Windows and with browsers which aren’t Internet Explorer or Edge.  Our toasters and refrigerators and our cars will be powered by the Ubuntu operating system or perhaps Debian, a similar free Linux flavor.  These appliances will be connected to our wi-fi and even to the Internet but there won’t be a scrap of anything Microsoft about them.  They’ll be coded up with something that isn’t C#, doesn’t use .NET and doesn’t need Visual Studio in order to compile it.

The only thing with a Microsoft pedigree with some staying power could be some of the websites and services currently served up at Microsoft’s datacenters via Azure.  But Amazon or Google could kill that by simply lowering their own prices for cloud-based services.

the 21st century digital résumé

It used to be that a programmer’s résumé was a single sheet of onionskin paper (expensive, semi-transparent) with a carefully-selected collection of one’s job history and such. Parts of what you were trying to “sell” to the would-be employer were your wordprocessing and layout design skills.

Now, everyone can type, has access to printers/computers and Microsoft Word. In fact, they can even select an attractive template from the many offered so it’s not like much skill is now involved in those areas. At one time, spellchecking was an activity that involved a Webster’s dictionary. The world has changed.

Github

To be an open-source programmer, you must now have a public set of repositories on github.com or so it seems.  My collection of repositories on github.

jsfiddle

As of today, I now have my very own jsfiddle.net collection. My public dashboard on jsfiddle.

WordPress blog

More and more, programmers are encouraged to be social and outgoing enough to want to communicate to others. Obviously, you’re here already so you have my blog’s address.

Slack

And part of that “being social” requirement now seemingly includes spending a fair amount of time during your life chatting with others within the coding space. Since slack.com projects appear to be project-centric rather than coder-centric, there doesn’t appear to be a way of publicizing your identity outside of a particular team URL.

Website portfolio

And then of course, potential employers want you to highlight several existing website concepts in which you either participated or you directly own them.

blinking the raspi’s built-in LED

I’ve just added a repository of some JavaScript code to take over and exercise the built-in activity LED on a Raspberry Pi Zero W (and presumably other models). It’s called gpiozero-toggle-led and it’s a pretty simple interface with installation instructions and some sample code. It works with the underlying js-gpiozero JavaScript port of the popular original Python code. This would be an excellent way of simply demonstrating GPIO without any additional wiring, components, breadboards, extra power supplies or electrical knowledge (like finding a 330-ohm resistor using its color bands).

zero-wireless

Note that the “zero” in the title of the repository and in js-gpiozero does not refer to the Raspberry Pi Zero but to the original gpiozero Python library.

This should remove some of the guess work when attempting to use the relatively-new library since their documentation examples at the moment are taking a back seat to their code port from the more-extensive Python offering.

This approach can easily be modified to instead exercise external LEDs (as soldered or otherwise attached to the header pin locations seen below).  Note that you’ll use “BCM numbering” for APIs such as this one. For external LEDs, you would need to connect it inline with a resistor from a selected pin to one of the grounds for this to work with correct orientation of the LED’s anode/cathode, of course.

raspberry-pi-pinout

If you’re trying to use this with a Raspberry Pi of a different model, you’ll likely want to adjust the JavaScript slightly as seen below.

/routes/index.js:

// Existing code, for a Raspberry Pi Zero
var ledActivity = new LED(47, false);
// For Raspberry Pi 3, for example
var ledActivity = new LED(47);

And that’s it. Since the Raspberry Pi Zero assumes an opposite value for true/false than the bigger models, it’s necessary to configure this in the device constructor to make things work as expected. Since BCM pin 47 is the activity light on the board itself, this will allow you to control it.

o please, gentlemen, a little bluer…

Today’s inventiveness involves a new teaching method for music, a synesthetic approach to colorizing musical notes. The title’s quote comes from Franz Liszt, a 19th-century composer who was a synesthete—he saw music in full color.

Although western doctors probably think of synesthesia as a malady, I would suggest that it is a product of beneficial neuroplasticity. The brain has cross-wired itself across the senses to allow for better recognition and appreciation of something. There’s a long list of famous musicians and composers who wrote of this personal condition and in each case it helped them to succeed.

vexflow-syn

In order to promote this cross-wiring in young musical students, I’ve created a repository to colorize musical notes in client-side JavaScript. I’ve developed an organized method for this and have described the process there.

Compatibility

Given that the client-side JavaScript approach requires the newer HTML5 canvas features, this will work on newer browsers (and seems to be working in IE11 if you “allow blocked content”).

Musical Talent

I have always had a fondness and an early aptitude for music. In fact, I had such a brilliant audible memory and an ability to play anything I’d just heard, that I used this as a crutch when confronted with the task of learning to read musical notation. I didn’t actually have to read the notation in band since the sound of the music was in my head. So although I was a slow reader with respect to notation, nobody actually could tell.

My earliest formal training was for the saxophone, noting of course that you only play a single note at a time. Unfortunately, this led to my later difficulties in learning to play the piano in my thirties. Piano chords on a stave? To me, this just seemed like jumbles of notes piled on top of each other. I had no easy way of interpreting what I was seeing.

After many weeks of painstakingly trying to decypher these heiroglyphics, if you will, I began to have a small breakthrough. My brain started to recognize some patterns. Due to some unfortunate timing, I had to stop all this training and abruptly move and had to sell the piano. It would be another decade until I’d bought another piano to re-learn piano notation.

Attacking the learning of chords-in-notation anew, I realize that colorizing the notes would be a benefit to me.  All C notes are red.  All E notes are yellow.  C-E-G are primary colors (C-maj).  The Eb in the middle of the C-min chord is more orange than the original yellow. A synesthetic approach to musical notation is a wonderful adaptation to a centuries-old teaching methodology I’d suggest, at least in my own case.