Categories
Uncategorized

OpenSCAD Improvements

When writing code for yourself you can choose to leave it messy and confusing (though you may not want to) and when writing code that other people will see it may be a good idea to attempt to be clear and organized. I’m trying to be more clear an organized. Which you know, can help your Future Self as well.

Here’s a recent project. It’s a 3D model of a simple foot switch. There are two 3D printed parts (a base and a cover) and one non-printed part (a push button) and sometimes I want to see one part, and sometimes I want to see all of the parts together.

Another thing I’m hoping this helps with is that since you need to export each part individually for slicing and printing I used to just add a line that said “Uncomment this to export” above each item to be exported.

I figure this is a bit cleaner as you just need to toggle some values between 0 and 1. (And yes, you can do an export that is all parts laid out ready to print but I tend to not do that.)

Anyway, I’ve never really read up on best practices for writing OpenSCAD code. I’ve picked up things over the years from looking at code others have written, and from making my own mistakes and wanting to improve them.

If you know of any good tricks or have some tips, let me know!

Update: Someone asked why I was using 0 and 1 instead of false and true. I am not an expert on this but I believe since OpenSCAD is not strongly typed that 0 and 1 pretty much work as Boolean values and the only real difference is readability. If so, it’s really just a personal choice. (Let me know if that is incorrect.)

Categories
Uncategorized

Walking in 2022

It’s been a while since an update. November 2021 to be exact. So how has it been going since then? Well… here’s a update.

Fall is the best time of the year. It’s cool out, not too hot, not too cold. It’s just right. Winter was, at times, brutal. I don’t have any December stats here, and that’s okay. They were probably close to November, but not quite as good. Holidays and what-not. January was also bad, but February was even worse. Now, at some point around that time I started doing indoor bike rides, so my steps are down even though my “active minutes” might have been fine.

Around April things started to drop down due to the return of plantar fasciitis. I saw my doctor for it at the end of April (as it was a daily pain thing that was getting pretty bad). I was advised to “take it a bit easier” so May was pretty light with much less walking. I also started doing some stretches and exercises, which helped a little bit, but not enough.

I eventually got a sleep support device (borrowed from my wonderful sister) and that has helped quite a bit. More than the stretching and exercises. I still get some pain occasionally, but it’s nowhere near as bad, and not even noticeable in the morning.

I’ve also been super-busy with work, so I’m not finding as much free time for walks, but I’m still doing at least one 30 minute walk nearly every day, and I’ll keep it up as long as I can.

Below is an individual look at each month of 2022, from January to June.

January 2022

February 2022

March 2022

April 2022

May 2022

June 2022

Categories
Uncategorized

A Real USB Knob and Virtual Knobs

Back in 2021 I built this USB controller featuring a rotary encoder that can turn endlessly in both directions. I sell the S1 Controller on Etsy.

Update: There are now two new versions: S1D Controller and S1A Controller.

If it’s programmed as a USB device it can act like a mouse scroll wheel, which I discovered some people love for controlling analog-style knobs on-screen. Typically someone will have a DAW with a bunch of dial in the interface where they can adjust them by putting their mouse pointer over one and then using the mouse scroll wheel. But some people really like the feel of turning an actual know… So we can do that!

With the S1 Controller you just put your mouse over a control and then turn the knob on the S1 Controller and the knob on-screen changes value. Along the way people would ask if the S1 Controller would work with their software, so I made this for people to test things: raster.github.io/knob

Basically if you can control that knob with your mouse scroll wheel, we can program the S1 Controller to work for you. It’s that simple. (I’m a huge fan of simple devices.)

The S1 Controller can also be programmed as a USB MIDI device. Some people use it to control specific parameters in their DAW. Typically we set the knob to output MIDI CC3 (from 0 to 127), and the button to send 127 on CC9. (But we can use any CC number, or noteOn/noteOff, etc. Anything MIDI really.)

I’ve been pleased that so many people have wanted a physical control for an on-screen UI element. As much as we love what computers can do for us and the capabilities they provide, it’s still nice that the analog world (or the desire to emulate it) hasn’t completely disappeared.

(Oh, the code for the virtual knob can be found here: github.com/raster/knob. It uses the JavaScript pure-knob from Andre Plötze)

Categories
Uncategorized

Trader Joe’s Chunky Salsa

A few people seemed to enjoy my Kroger Private Selection Salsa review so I’m back again with another salsa. I picked up this “Trader José’s” salsa for $1.99 USD, so expect another cheap salsa. It’s mild, and… well, it is mild. If you want plain, cheap, dare I say boring salsa, this is it!

While the Kroger Private Selection Salsa was probably going for an upscale/artisan look with the label, this Trader Joe item is full on “Mexican Restaurant in America” style. It’s fine. Say “fine” to the salsa. It’s 10 calories per serving but I eat half a jar at a time so whatever.

I had to spice it up a bit, and instead of the Sriracha I grabbed the Old Bay hot sauce for a bit more flavor. That helped.

So yeah, boring salsa, but cheap. Not too much liquid like the Kroger Private Selection Salsa so at least you get your two dollars worth. Chips Ahoy!

Categories
Uncategorized

2022 2018 Mac Update

Up until February I was using a 2010 Mac Pro as my main desktop machine at home. (MacPro5,1 Quad-Core Intel Xeon 2.4 GHz with 36GB of RAM) I had all the drive bays filled and upgraded the video card to a SAPPHIRE Radeon 580 a few years ago. It actually worked pretty well, but was definitely showing its age, and with me doing more video work the slowness was starting to get noticeable.

About two years ago at work we upgraded a few machines and I ended up with a Mac mini (3.2 Ghz 6-Core Intel Core i7 with 32GB of RAM) I’ve actually still got a 2007 Mac mini at home in my shop that mainly runs as a music player, but it’s been years (obviously!) since it’s been a useful desktop machine.

Anyway, I was pleased with the Mac mini at work so I figured I’d get one for home. I’m still not quite ready to shell out for an M1 machine, so I grabbed a 2018 Mac mini. It’s only an i3 but I did stick 32GB of RAM into it, and while it’s got a small 256GB internal SSD I picked up an external 1TB SSD which the system boots from. (There’s also a 4TB external backup drive connected for Time Machine backups.)

The Mac mini isn’t screaming fast, but it’s way faster than an old 2010 Mac Pro, and was about $700 USD, which is not a bad price for a “new” Mac. I know the base model M1 Mac mini starts around $600 but I wasn’t quite ready to jump to the M1 architecture and the older Mac Minis have a few features I really like.

So I’ve been using the Mac mini for a few months now, and it’s been great. Exporting videos and rendering 3D models is faster than the old Mac Pro, and I was easily able to upgrade to Monterey macOS 12 without issue (which the Mac Pro could not do). All in all I consider it a solid upgrade. And since it was about $700 even if I only get a few years of use out of it, that’ll be fine with me.

Oh, worth mentioning! I got the Mac mini from Other World Computing. I’ve been a customer for… I don’t even know, maybe 20 years? They’ve always been great to deal with and have good products.