Adobe Javascript

Pasting paste

Pasting paste

I occasionally create PDF forms for work that would be a lot more useful with just a little bit of logic.  Luckily, PDF’s can run javascript.  To save me from having to continually search for this same information every few months, I’m copying and pasting a piece of an Adobe forum thread here:

// Obtain the value from the first field

var v1 = getField(“balance1”).value;

// Obtain the value from the second field

var v2 = getField(“amount2”).value;

// Set this field value equal to the sum

event.value = v1 + v2;

That should do it.

Photo courtesy of pvera.

A Little Bit of Javascript Goes a Long Way

avengers endgame poster

I use a web based CRM for work, and it’s pretty good.  That said, I wrote a chrome extension to slightly improve it in dozens of small ways.  The cumulative effect of these changes is that I have a quantitively and qualitatively different experience than everyone else using this software.
Working remotely, where so much of the information comes through a web browser, being able to force a website to work the way I prefer feels like an infinity stone level reality warping super power.

How to Reverse Text String in LibreOffice or OpenOffice

After spending a bit of time trying to figure out how to reverse the text in a LibreOffice cell, I found some information from mikekaganski which solved the problem for me.  I find it easier to learn such things with written information rather than a combination of written and video, so I’m reproducing the steps here.

Once LibreOffice is launched:

  1. Tools -> Macros -> Edit Macros
  2. Under “Module 1” copy and paste the code below
  3. Save and close this window
  4. Use the function “=(StrRev(A1))” to reverse the text of A1
Option VBASupport 1
Function StrRev(str As String) As String
StrRev = StrReverse(Trim(str))
End Function

That’s it!

Photo courtesy of Tim Samoff

How to Fix Outlook “Get Add-Ins” Grayed Out Button

Work requires a particular Outlook Add-In, but Outlook wasn’t having it.  A bunch of Googling and searching revealed this is because of some esoteric privacy setting that needs to be twiddled.1 Here’s how you fix that:

  1. File > Options > Trust Center > Trust Center Settings > Privacy Options > Privacy Settings2
  2. Check the box “Enable optional connected experiences” and “OK”3
  3. Restart Outlook and you should be able use the “Get Add-Ins” button now

Yay!

  1. This page says what needs to be done – but doesn’t say where to find the necessary privacy settings []
  2. This page explains these options might be limited at the administration level []
  3. This sounds creepy to me. []

QMK: The Adventure Begins

Richard Feynman

Richard Feynman

Noted philosopher / physicist Richard Feynman has a now-famous method for quickly learning a topic.  It boils down to (a) pick topic (b) write everything you know (c) research to understand gaps (d) simplify.  While I’m not big on biographies, I found this graphic novel version extremely compelling.

I suspect most makers do something very similar to this, whether they realize it or not.  My own variation on this method is to create an outline of what I want to learn with each feature I want to include, do some preliminary internet research, add links to resources to the outline, read, drill down on topics, ask questions, LRR.1

Sometimes I’ll document stuff in a notebook, but when it’s something I know will take some time to learn and probably require code and other digital resources, I like to type them up in blog posts.  It feels therapeutic, getting all this stuff written down.  I think of it as closing mental browser tabs.  Also, by adding links into a post, I can actually close real browser tabs, which is a distinct side benefit.

Default Series Title
  1. Lather, rinse, repeat []

A Cornucopia Keyboard Options

Once I started looking, I found a lot of options for a custom keyboard.  In fact, I started seeing them everywhere.1 I found these offered as some combination of “media,” “macro,” “button,” “board,” “keypad,” and “keyboard.”  I’m offering this list in no particular order – other than how I noticed each one.

 "6 Key Macro Keypad" by @iHayri1

“6 Key Macro Keypad” by
@iHayri1

1. 6 Key Macro Keypad” by @iHayri1, ~$87

I found @iHayri1‘s keyboard in HackSpace magazine, issue #37, page 101.  If you don’t happen to have it lying around – no problem!  This magazine published by the Raspberry Pi Foundation gives away their digital version!  While on the pricier end of the keyboards, it’s got a lot of interesting features.  Six buttons, a media dial, an RGB LED under each key, a series of LED’s at the base of the keypad, and an LCD screen displaying each key’s current function.  I would have ordered this one, except it’s been out of stock for a little while.  :)

"NoodlePad" by @TheMadNoodle

“NoodlePad” by @TheMadNoodle

2. “NoodlePad” by @TheMadNoodle, ~$86

I found the NoodlePad by @TheMadNoodle on Etsy after searching for media keypads.  This is another beautifully designed board – eight buttons, knurled metal knob, mounted onto a shaped board and thick lasercut acrylic plate.  This was the first board I saw referencing “QMK” firmware.  This board is also offered in a “semi-assembled” state where the buyer supplies their own switches and keycaps.  If you’re going to fall down a rabbit hole on mechanical keyboards, the switches may be what get you.  The ordering options also offer “Cherry Red,” “Cherry Blue,” “Cherry Brown,” and “Cherry Black” switches.  At first I thought this referred only to the color of the switch underneath the keycap.  As it turns out, each color matches the little bit of plastic connecting into the keycap which in turn is associated with a different set of mechanical features for that particular kind of switch.  Maybe you want a key with more bounce, requires more force, or a more gentle touch.  That you can order your keypad with the exact keys you need says a lot about this maker and their product.

This slideshow requires JavaScript.

3. “BYO Keyboard” by @travis_the_makr, starting at $36

I happened to catch @travis_the_makr showing off a prototype “BYO Keyboard” on Adafruit’s Show and Tell.  I should probably feel a little bad for hassling Travis to sell me one of these board immediately after his appearance on the show.  Intended as both a way to get started with soldering and programming as well as an actually useful final project. I kinda love the project is powered by an Adafruit Itsy Bitsy M0 so you can use either Arduino or CircuitPython.  I note QMK firmware support is a stretch goal.  :)  Don’t let this bare bones DIY kit without LED’s, knobs, and displays fool you.  If, like me, you’re only now embarking on your mechanical keypad journey and don’t have a drawer full of Cherry MX switches and keycaps, this is an excellent and affordable starting point.  Suffice it to say, I immediately pledged the Kickstarter and am really looking forward to playing with this project.

BigKnob by Leafcutter Labs

BigKnob by Leafcutter Labs

4. “BigKnob” by Leafcutter Labs, starting at $45

Of all the various keypads I’ve looked at, this was the very first one I ordered.  I opted for the version with the black steel case, wonderfully heavy metal knob, and asked the owner for some variation in the keycaps.  Craig shipped the keypad immediately and it arrived well packed in bubble wrap, only requiring that I pop in my choice of keycaps and apply the included sticky rubber feet.2 This keypad rocks four Cherry MX switches, a big hefty knurled metal knob, six RGB LED’s which glow through the lasercut acrylic base plate.  My configuration (with the metal case) was $62, including shipping.  While this is the only keypad I’ve actually used so far, it’s going to hard to top.

5. “8K Controller” by 2XLNetworks, starting at $32

Once I started tweeting about picking out some keypads, my buddy Pete told me about the “8K Controller” by 2XLNetworks.  This keypad has no LED’s, no metal knobs, no LCD displays – but it doesn’t need any of that.  It comes with a built-in USB cable, you can order it with pre-programmed with custom button assignments at no extra cost, reprogram it if you like, and it unlike a hipster clicky-clacky Cherry MX switch, it rocks arcade buttons.  If you need a bulletproof box that can stand up to repeated abuse at the hands of the public (perhaps for a photobooth, art project, school installation?), this is be the keyboard for you.

Default Series Title
  1. I’m reminded of the Baader–Meinhof phenomenon; after the first time you notice something, you notice it more everywhere []
  2. These are a great touch! []

Cephalopod Robot Friend Progress

Well, it’s here!  Today is the start of #CephalopodWeek on ScienceFriday!  There’s a little progress to report on my, tentatively named, CuttleBot.  I’ll post a picture first, then get to describing the progress so far.

Assembled CuttleBot head, side view

In the prior post I listed some of my sources of inspiration.  Another such source is the work of Sean Charlesworth and his awesome Octopod, Gowanus Monster, and newly published Scuttleship.   ((If you like his work, be sure and check out his Etsy shop!))

This slideshow requires JavaScript.

Since I need special connectors for the articulated/articulating tentacles and I wasn’t able to edit the files in OpenSCAD, I wasn’t able to use Sean’s STL files.  However, I really like the aesthetic of his designs1 and how they really evoke the form of an octopus or cuttlefish.  Here’s a mock up I used to help me visualize what a full-scale Scuttlefish head might look like with the tentacles I designed.

Scuttlefish with placeholders for tentacles

Scuttlefish with placeholders for tentacles

Unfortunately, the Scuttlefish head and body parts are just a tad too large for my small printer’s build volume.  However, even if I were using a larger printer, I would still not want such a large robot as I’m hoping for this to be a shoulder-mounted companion.

Thus, I began work creating an OpenSCAD cephalopod cuttlefish head inspired by Sean’s work.

This slideshow requires JavaScript.

Now that I had a design, I set the printer to work over night.  This design is mostly to see if the various parts for the tentacles would work with this head.  Since I want to put some LED’s in the eyes and possibly the mouth, I’ll need to hollow it out later.

The print took a little over an hour for the head.

This slideshow requires JavaScript.

How about a video of it working?

I’m very happy with the progress so far.  If I can shrink down the tentacle mechanisms, I can add more tentacles for more interesting emoting and animations.  The video just shows the results of me yanking the fishing line running through the CuttleBot’s head.

Here’s a few more sketches of how I am planning on putting it all together.

This slideshow requires JavaScript.

I might add some fabric frills / fins, instead of printed ones.  I was also contemplating letting the top “shell” of the CuttleBot be formed from 3D printed spines with a fabric or thin plastic sheeting covering.  This might help reduce weight or allow for internal lights to shine through the body.

Companion Robots: Building Robot Friends
  1. Cephalopod Robot Friend, the story so far
  2. Cephalopod Robot Friend Progress
  3. CuttleBot Body and OpenSCAD Design Tips
  4. An Assembled CuttleBot Body
  5. Building the Monocle Top Hat Cat for #MicrobitVirtualConcert
  6. Companion Robots and Maker Faire Season!
  1. Cephalopod Steampunk?! []

Maker Faire Application: Vacuum Forming Workshop

DIY Vacuum Formed Arc Reactors

DIY Vacuum Formed Arc Reactors

I’ve been making some notes as I work on my vacuum former and the proposed workshop for this year’s Bay Area Maker Faire.  Here’s some ideas and thoughts, in no particular order.12

  • Workshop Proposal
    • I’ve demonstrated my bucket vacuum former at my daughter’s school a few times – and it is always a huge hit.  The vacuum formed result looks like so much more than the product of very cheap and accessible materials.  Two years ago I put on a presentation at Maker Faire about how to build a vacuum former – and this year I want to try something even more ambitious.  Here’s the slideshow from 2017.

    • I want to do an entire workshop on how to build and operate a vacuum former – and then let people try to vacuum form their own objects.  One of my favorite things to vacuum form is an “Arc Reactor” and then augment it with an RGB flashing LED and a coin cell battery.  However, I think people would also enjoy making goggles and phone cases.  It takes about 30 seconds to heat up the plastic and just seconds to actually vacuum form a shape and let it cool down.

https://www.youtube.com/watch?v=9Prj04gPeLw

This slideshow requires JavaScript.

  • New Developments
    • Several months ago, just before Thanksgiving, our stovetop stopped working.  Yeah.  I know.  Talk about timing, right?  While we scrambled to get a new cooktop ordered, delivered, and installed, we also purchased an inexpensive hot plate from Amazon.  I had originally used an old hand-me-down large toaster oven to heat up the plastic, but wondered … is there a better way?  That toaster oven is huge and takes a long time to heat up.  This weekend I was delighted to learn the hot plate heats up very quickly, gets hot enough to soften the plastic, and works as a fantastic and compact replacement for the toaster oven.
      • There are a few caveats to using the hot plate.
        • The heat was more localized, causing the center of the plastic to become thinner and saggier.  When the plastic plates were heated in the toaster oven, they tended to heat more evenly.  Perhaps if I tried a lower heat setting or held the plastic plate higher, this might be mitigated.
        • It’s hard to get a sense of the plastic without actually watching it get soft and wobbly.  This is especially true when the plate is inside the toaster oven – there’s only room enough for one or two people to see what’s going on.  However, with the hot plate, there’s no enclosure3 to obscure an audience view.
        • I was somewhat paranoid about letting the plastic droop down onto the heating element.  I’m pretty sure it would smelled horrible, made a huge mess, been nearly impossible to clean, and made the hot plate unsuitable for any other purposes.  I may try to locate a cheap hot plate from a second hand / thrift store / goodwill to take to Maker Faire.  Though, now I’m also wondering if it might be possible to repurpose an old coffee maker, grill, griddle, or panini press, into the heater for this project.  Maybe if I covered the heating element in aluminum foil first, that would protect the surface?
      • The power switch of the vacuum head / bucket head is conveniently placed right on top for normal operation.  For unusual operations such as this, where the vacuum is upside down, it is decidedly inconvenient.  I used a power strip with a switch which made it much easier to operate the vacuum.  I think I may invest in a dedicated foot switch extension cord for this project.  It’s a very cheap upgrade that would make it a lot easier to do.
    • I also have a prior post discussing some additional ideas on how to improve this process.
  • Accessories / Things to Bring to Maker Faire.  There are SO many little parts to a project – forget any one little thing and you’re going to be making a last minute trip to the hardware store.4 Here’s a few lists of things I will need:
    • Parts
      • Bucket
      • Vacuum head
      • Hot plate
      • Power strip or foot switch extension cord
      • One or two wire coat hangers
      • 6x Small to medium binder clips
      • Wooden dowel (1x 6″ riser, 3x 8″ legs)
      • 3D printed parts (1x plug, 2x riser caps, 3x leg holders, 3x feet)
      • Hot glue
    • Building Tools
      • Drill (for drilling holes)
      • Ruler and / or paper grid
      • Chisels
      • Hacksaw (cutting the wooden dowels)
      • Hot glue gun
      • Sharpie
    • Presentation Tools
      • Heat gun
      • Scissors (cutting plastic plates)
      • Old socks (DIY oven mitts)
    • Materials
      • Examples of plastic plates in various stages of the process
      • Examples of items made, also in various stages of production
    • Consumables
      • Plastic plates
      • Tape (clear packing tape works well)
      • Fishing line
      • Elastic cord
      • Pens (metallic permanent markers)
      • LED’s
      • Batteries
      • Maybe stickers to give away?
Bucket Vacuum Former
  1. How to Make a Vacuum Former
  2. How to Use a Vacuum Former
  3. Vacuum Former – Things to Form
  4. Vacuum Former – Ideas to Improve Vacuum Former
  5. Maker Faire 2017 How to Make a Vacuum Former Presentation Slides
  6. Vacuum Forming an Arc Reactor
  7. Maker Faire Application: Vacuum Forming Workshop
  1. As always, as much to inform you, dear reader, as to order my own thinking and jot things down before I forget them []
  2. DOCUMENT!!! []
  3. And, now that I think of it, it may be the enclosure which causes more even heating… []
  4. Not that this is a bad thing.  But, I’d rather have to go because I want to do go []

Loudest 3D Printed Whistle – now with 100% more science

Extremely loud and compact emergency whistle v1

Extremely loud and compact emergency whistle v1

I ordered a decibel meter from Amazon the other day so I could drop some science on the claims from various 3D printed whistles on Thingiverse.  There are several that claim to be the loudest.  Well, today, I began my quest to put these claims to rest.

The closer the decibel meter is to a sound source, the higher it registers.  To eliminate some of these variables, I placed the decibel meter on a counter in front of me and a chair 24 inches in front of that.  For each of the whistles I was testing I stood just behind the chair and gave the whistle three hearty puffs.  The decibel meter, which was set to record and display the “max” reading, would then tell me the loudest reading for that set of three whistle toots.

Without further ado, I declare the “Extremely loud and compact emergency whistle” by Whistleblower on Thingiverse the clear winner at 121.1 decibels.  Both whistles by this designer took the top two scientifically determined spots.

NameThingiverse IDMass (grams)PricePrint Time (minutes)DecibelsSubjective Rank
Extremely loud and compact emergency whistle [v1]29330213.9$0.1222121.11
Extremely loud and compact emergency whistle [v2]29330213.7$0.1118111.53
v29 (Over 118 db!)117916013.9$0.4290110.44
2 chamber whistle (LOUD) [w5]26165128.1$0.2449109.52
Emergency Whistle with Solidworks 2014 source4951721.2$0.047101.85
Whistle Ring Modified [v2]20271151.6$0.05990.86

Just how loud is 121.1 decibels? 1  Well, for starters, it’s just above the pain threshold of 120 decibels.  It’s louder than:

  • Your iPod headphones at maximum volume
  • A baby crying, next to your ear
  • A full symphony orchestra
  • The subway
  • A sporting event
  • A chainsaw
  • A jetski
  • A marching band

It’s on par with:

  • Thunder
  • A shotgun
  • An ambulance siren
  • A rock concert

And, if you didn’t have earplugs, you would exceed the daily safe exposure limit for 121 decibels in 7 seconds.

There may be louder whistle on Thingiverse2 and, if so, please let me know.  I’ll print the model and test against the others in my arsenal.

Default Series Title
  1. This page has several charts to help explain. []
  2. Or some other online 3D design repository []

Loud 3D Printed Whistle Test, Take 2

Impatient for my decibel meter to arrive from Amazon and eager to get more feedback on the loudest 3D printed whistle, I brought the four loudest whistles to work and enlisted the help of two friends.  We performed the test much the same as the last time – only this time they were on one end of a large parking lot and I had driven to the far side to blow each whistle once, then repeated them each once.  Here’s the result on their subjective test:

NameThingiverse IDMass (grams)PricePrint Time (minutes)RankDecibels
Extremely loud and compact emergency whistle [v2]29330213.7$0.11181TBD
Extremely loud and compact emergency whistle [v1]29330213.9$0.12222TBD
2 chamber whistle (LOUD) [w5]26165128.1$0.24493TBD
v29 (Over 118 db!)117916013.9$0.42904TBD

Whether the1 loudest whistle is the v1 or v2 of the “Extremely loud and compact emergency whistle,” Thingiverse user whistleblower clearly designed an amazing, quick printing, low cost whistle.  It has a very high pitched piercing tone that can be downright painful to be near, let alone create. 2

As before there’s a number of different things that could be happening here.  Perhaps the particular tone of this whistle travels better through open spaces (such as a parking lot) rather than through a door and down a hall (such as inside my house).  I know there are some whistles that require a lot of blowing power to hit maximum volume and others which almost “choke” on too much pressure.

In two days my decibel meter will arrive and I’ll try all of these tests again and post a new table.  If you think you’ve got a contender or have seen a really loud whistle on Thingiverse, let me know in the comments so I can print and test it.

Default Series Title
  1. Subjectively []
  2. Again, I had my earplugs in for the test []