add comments to a gcode file

I’ve just written a new command-line tool (CLI), this time in NodeJS/JavaScript but as usual, it’s open-source. The program will create a new version of your 3D printer’s GCODE file, adding comments along the way which describe what each command does.

repository

I would suggest that it’s best to install it somewhere in your path and then you should be able to just invoke it easily in your working directory where the GCODE file(s) live:

 

$ gcode-comments file.gcode

;FLAVOR:RepRap
;TIME:11265
;Generated with Cura_SteamEngine 2.3.1
M104 S205            ; Set extruder temperature
M109 S205            ; Set extruder temperature and wait (blocking)
;LAYER_COUNT:28
;LAYER:0
M107                 ; Turn off fan
M205 X10             ; Adjust jerk speed
G1 F2400 E-1         ; Move and/or extrude to the indicated point
...

Input:  file.gcode
Output: file_commented.gcode
Advertisements

chaco canyon

I spent much of the morning at the Taos Pueblo but not really any photos to show because they don’t really approve of that. They’re nice people, though, and I had some amazing fry bread and green chili.

Next stop was Chaco Canyon and the thousand-year-old ruins found there. At one time over a thousand people lived in this thriving community.

DSC_0782

meow wolf

Santa Fe turned out to be a fun city (at least the original/old part of town) with lots of shops, art galleries and cafes/restaurants. Had a quiche and a cafe au lait at the French Pastry Shop & Restaurant there and later, lunch at the Blue Corn Cafe nearby.

A very cool spot to check out is an artistic interactive/mystery sort of place in a converted bowling alley called Meow Wolf. They call it an immersive art installation. The current rendering is named House of Eternal Return and features what appears to be an entire house inside. From inside this house, you gather clues about the whereabouts of the family members. There are a variety of interactive musical pieces like the dinosaur skeleton and opportunities to go inside furniture you wouldn’t otherwise suspect is a portal to another dimension.

spiderIMG_0375IMG_0381refrigeratorIMG_0384IMG_0387dryerIMG_0393IMG_0413

hoodoos

So, I’m traveling throughout the Southwest for Christmas break—merry Christmas by the way—and I wanted to share some photos of Chiricahua National Monument park, New Mexico. A hoodoo is a column or pinnacle of weathered rock, in case you didn’t know that. And this park is quite full of them on every turn.

DSC_0376DSC_0390DSC_0403DSC_0407

Quite a few of the rocks have been weathered down so that a remaining piece stands precariously on top, threatening to fall. It’s interesting to imagine just how long these have been forming.

Wikipedia lists the balancing stone in the third photo above as one of the best examples on the planet.

Next stop appears to be Silver City today which was a booming town in the 19th century and location of the famed Billy the Kid character. (Stay tuned.)

hello

Since I’m now an instructor, I thought I would create a repository which demonstrates  code for the many languages out there which could produce a command line tool/interface (CLI).

HelloCommandLine

Currently, there are nine languages represented but I may add more later. Note that everything here is decidedly OSX-specific. Each subsection includes the instructions for running and/or compiling each, noting that some are compiled languages and some are not.

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.

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.