IRLib2 Documentation Updated. Improved SAMD21 Support.

We are pleased to announce that IRLib2 support for SAMD21 has been rewritten and greatly improved. It will allow us to and support for more boards using that processor much more easily.

Also the documentation available in Microsoft Word, Adobe PDF, and EPUB e-book format as received a major update. This is the first update or rewrite since the extensive 116 page manual was originally written.

The updated code and documentation are now available on GetHub at https://github.com/cyborg5/IRLib2

The user’s manual now includes extensive details about support for SAMD21 processors such as those used in Arduino Zero, Arduino MKR series, Adafruit M0 boards including the Circuit Playground Express. We’ve also shared online a Google docs spreadsheet that gives a handy reference to pin numbers we support on the SAMD21 processor. You might find it a useful reference for other purposes as well. The document can be found at https://docs.google.com/spreadsheets/d/1rY79Hfl4f9e5TQBas_rWI3LeyTD8Hr-lhqi349ZwVXU/edit?usp=sharing

The documentation now also includes an explanation of protocol 12 CYKM which facilitates IR transmission of mouse and keyboard commands. These are especially useful in creating assistive technology devices for the disabled.

IRLib2 Updated to Support Trinket M0 and Gemma M0

We are pleased to announce the release of the latest version IRLib 2 which now includes partial support for the Adafruit Trinket M0 and Adafruit Gemma M0 boards. IRLib2 is a library for Arduino and related boards that facilitates the receiving, decoding, and transmitting of infrared signals such as those used by TV remotes. The code is available on Github at https://github.com/cyborg5/IRLib2

All forms of input are available on any of the digital input pins. There are limitations however on the output pins. Neither of the boards support hardware PWM on the pin 1. So that support will not be forthcoming. Theoretically the Trinket M0 should be able to use pin 3 or pin 4 but for some reason we cannot get that code to work. Similarly the Gemma M0 should be able to do output on pin 2 but it does not work either. Both boards are configured to default output on pin 0 and that works fine. Alternately you can use pin 2 on the Trinket M0.

Anyone who can help us figure out what’s going wrong we deeply appreciate it. Feel free to email me or discuss the issue publicly on Github issue #44 links here. https://github.com/cyborg5/IRLib2/issues/44

Late Update February 9, 2018: Resolved problems with Trinket M0. It can now use pins 3 and 4. Thanks to Limor “LadyAda” Fried who found the problem. I defy you to name another electronics CEO who will take the time to debug someone else’s library. Another in a long list of reasons Adafruit is such an amazing organization. It turns out there never was a problem with the Gemma M0. My initial tests must’ve been wrong.

IRLibCP Updated for Circuit Python 2.x

IRLibCP has been updated for use with Circuit Python 2.x and has been tested on Circuit Playground Express using Circuit Python 2.2.0. Note that previously this library was only available for use on Express style boards because they were the only ones that supported the required “pulseio” module. Theoretically with Circuit Python 2.0 and beyond that module is available on non-express boards but we have not yet tested the library on those platforms.

There have been no changes to the code since the previous version. This update merely provides updated .mpy files compatible with Circuit Python 2.x.

IRLibCP is available on Github at https://github.com/cyborg5/IRLibCP

Another example of how the Assistive Technology procurement system is broken

There used to be a humorous TV ad for the Yellow Pages. For those of you too young to remember, Yellow Pages was a printed telephone directory full of advertisements for various businesses. You had to use these before there was Internet or Google. In the ad, a salesman was trying to sell a Yellow Pages advertisement to a business called “Don’s Rug”. It was a business run by a guy named Don who had a rug for sale. Singular. Just one rug. It wasn’t “Don’s Rugs”. He didn’t want to advertise because then someone might call him and want to buy his rug. Then he would be out of business. Then the voiceover said “Unless you don’t want to have any customers like Don, you should be advertising in the Yellow Pages.”

The ridiculousness of the example is what proved their point. If you want to sell your product you need to make it easy for people to find you and to purchase the product. Otherwise why did you even bother going into business?

Apparently some people in the assistive technology business must be a lot like Don’s Rug. For some reason they aren’t very anxious to get people’s business. Let me explain what it is I’m trying to purchase.

I’ve always been disappointed that Windows 10 doesn’t have switch control features to the extent that Mac OS or iOS devices have. I’ve never been a big fan of Apple. I only reluctantly purchased an iPhone because I needed the switch control features. Even though Android has made progress in that area, it still isn’t anywhere near what’s available in iOS. With the exception of the on-screen keyboard it Windows 10 that only supports single switch not dual switch scanning, there just isn’t anything in Windows 10. It’s nice that the latest update has built-in support for eye tracking but I don’t want to do eye tracking.

So someone recommended I check out some software called Grid 3 sold by a company called Think Smart Box. It’s a general AAC communication software the duplicates some functions you would see in speech generating application such as Cough Drop. But all I really want is to use it for its ability to control a Windows PC. Cough Drop can’t do that. It’s just four generating speech. So I go to the website for Grid 3 and they don’t have any prices. There is a form you can fill out to get a quote. Right then I knew it wasn’t a good sign. But I thought I would humor them and asked for a quote.

Two days later I get a nice email explaining that they don’t do direct sales. They only sell through dealers. I appreciate the fact that many users need a lot of support. They want to bundle switches, other input devices, need training setting up communication screens etc. etc. But I just want to control my Windows PC and I’m perfectly capable of installing it all myself. Not only do they only sell through a dealer network, they don’t have a dealer in the state of Indiana. They referred me to a dealer in Wisconsin. What? They don’t even have someone in Chicago, Cincinnati, St. Louis, Cleveland. Basically I told them thanks but no thanks. It’s bad enough that they won’t tell me what the software costs. Add to that they don’t want to sell it to me directly. I told them they lost a customer with their stupid policies.

I will leave it as an exercise for the reader to speculate why they would have such a policy. Perhaps they really are like Don’s Rug and don’t want to sell their product. Or perhaps they’re more concerned about lining the pockets of their dealer network then they are providing their product to the end-user. Just a couple of possible explanations.

Meanwhile I’m 3D printing a bracket that will hold my iPad Mini 2 on top of my TV monitor so I can watch TV and/or use my Windows laptop as a computer and then use the iPad for communicating while I’m on my ventilator. Just another way that the whole AT system is broken.

Epilog: I did eventually get another email reply from the company. The tone was pleasant and apologetic. They do offer direct sales in the UK but not the US. The software is $735. While that’s pretty steep, given all of the capabilities it’s not completely unreasonable. But I really only need it for a small portion of its capability and I’m not really sure it’s worth it. I will have to consider it as an option. The email explained that most of their purchases are through Medicare, Medicaid or other insurance providers. While it offers some explanation, it just furthers my contention that the system is badly broken.

How I Made 3D Printed Customized Christmas Holly Ornaments

My computer rendered Christmas card that I sent to friends and family this year had 3D printing as a theme. You can read all about it here.

My 2017 Christmas Card: Santa Adopts New Technology


Because many friends and family have never seen a 3D printer for the objects it creates, I decided to make a little Christmas to stuff in their Christmas cards. It’s a little piece of Christmas holly customized with their name on it. This video shows how I designed and 3D printing these little trinkets from my friends and family.

3D Printed Icosahedron Star Christmas Ornament

One of the fun things I like to do with my 3D printer is create Christmas ornaments. My radiused is this 20 pointed star shown here on my living room Christmas tree.

The basic shape begins with a 20 sided shape where each shape is an isosceles triangle. In order for it to print properly I had to cut that shape into two pieces. Then I separately printed the 20 spike shaped pieces to connect to each of the 20 triangles. One of the spikes includes a little loop so that you can hang the ornament.

We used super glue to put the pieces together. After gluing of the spikes onto the two halves of the central core it looks like this.

Then we finally glue the two sections together.

The files so you can print your own ornament are available on https://www.thingiverse.com/ by clicking here.

3D Printed Christmas Tree Illuminated by Circuit Playground Express

In 2015 I created some 3D printed Christmas ornaments as seen here. It occurred to me the other day that the tree ornament was just about the right size to sit on top of an Adafruit Circuit Playground Express. The Neopixels would reflect upward onto the ornament. I would have to resize it slightly and cut out some notches for the USB port and JST power connector.

I printed it using white PLA and I think it turned out pretty well. I also have some transparent T-Glaze filament that I may try as well. Here are some photos and a YouTube video showing how it looks.



I will post the code that I used to animate the lights sometime soon. It is currently written in Arduino C++ but I also want to create a Circuit Python version as well before I publish it.

Here is a link to the STL file on Thingiverse.

Here is a link to the original ornaments also on Thingiverse.

Announcing IRLibCP — a Circuit Python Module for Infrared Transmitting and Receiving

We are pleased to announce a very early pulmonary beta release of IRLibCP. This is a Circuit Python module for receiving, decoding, and transmitting infrared signals. It is a translation from the original IRLib2 written in C++

The module can be found on GitHub at:

https://github.com/cyborg5/IRLibCP

Because the module depends on the “pulseio” module of Circuit Python it can only be used on “Express” versions of Adafruit boards. Specifically Circuit Python Express, Feather M0 Express, and Metro M0 Express. It cannot be used on other versions of Circuit Python such as Feather M0 Basic or BLE nor on ESP 8266 platforms.

As previously mentioned this is a very early beta release. Further example programs and updated documentation will be coming soon as well as refinements to the modules themselves.

Also a bit of disclaimer… I began computer programming writing and BASIC when I was in high school in the early 1970s. I went to college and wrote Fortran and Pascal and God help me even a little COBOL as well as other programming language that don’t exist anymore such as Algol and PL/1. For the last 25 years I’ve written nothing but C and C++ with minor dabbling’s in JavaScript and PHP. But converting IRLib2 into Python is only the second Python program I’ve ever written. I’m sure experienced Python programmers will cringe when a see my code. Please be patient with me. I’m still learning. If you want to give me some constructive tips please send them to me at cy_borg5@cyborg5.com

Switch Controled Assistive Technology Mouse Using Feather 32u4 and OLED Display

In the ATMakers.org Facebook page we’ve been discussing the development of an assistive technology device we are preliminarily calling APHID. It’s my belief that at least one version of our APHID device will need some sort of display. Here is a proof of concept of the device using a feather 32u4, OLED display and three switches. It does every kind of mouse control that you could imagine as well as the limited keyboard commands. This device is connected through USB but we could also make a Bluetooth version.

3D Printed Easter Eggs

Last Christmas I made some 3D printed Christmas ornaments so when Easter rolled around this year I decided I would try my hand at designing some 3D printed Easter eggs. Here are the results…

Just like my twisted spear and twisted tree ornaments from Christmas, this one consists of basic shapes given a twist and multiplied at different angles. For the egg I started out with a simple doughnut shape called a torus, selected the top half and scaled that by 1.75 in the vertical to make a basic egg shape.

en twisted the shape 180° like this.

I then made another copy and twisted it 180° the opposite direction. Here I have color-coded each piece light blue and dark so you can see which is which.

I then made two more copies and rotated them 120° and 240° respectively so that we have a total of six twisted tori. I’ve color-coded all of these as well. There is both a front view at a top view.


l started wobbling as it printed and I ended up stopping the print because it was just coming out too nasty. I also had lots of problems with threads. Here’s a photo of my first failed print sitting up on a little podium I built.

I tried putting supports under it but the automatic support system in Simplify 3D was also creating supports inside the egg which I didn’t want. And I couldn’t get the manually placed supports where I wanted them. I decided to just go back to the CAD program and model supports exactly the way I wanted them and then not use supports in the slicer. I added a base disc and six pillars. These pillars were not necessarily traditional supports to make overhangs print easier. Instead they were just to steady the model while it printed. By the way I was printing with 2 shells and no infill also with 4 top and 4 bottom layers. The base is 1 mm thick. The 6 supports were 2.5 mm in diameter.

Initially I was still printing with the point down and here is the results.

As you can see I was getting very bad threading. I also didn’t like the look of the model with the pointed end down and that’s when I turned things upside down and put the pointy end at the top to emphasize the egg shape. I also needed to try to reduce the threading somehow to get a cleaner print. I tried increasing the filament retraction and the Z lift but it didn’t help much. I finally decided to turn down the heat from 210°C down to 200°C. I made this change mid-print while printing this blue version. You can see the threading is still bad at the bottom but after I reduced the temperature it was still present but much less so. I didn’t want to experiment further by reducing the temperature so I let it finish at 200°C.

I also tried filling in the gaps in printing a solid shell. Again I started with a sphere shape, selected the top half, and scaled it appropriately. Here is the result.

All of this was modeled in Blender 3D which isn’t really designed to be a modeler for 3D printing. It’s more for rendering and animation but it does allow export to STL format. I’ve been using it because I didn’t want to learn multiple CAD programs and I was under the impression that Autodesk Fusion 360 would only allow you to use it for three years for free and then you had to register it at a very expensive subscription price. I’ve only recently learned that you can continue to renew your free license for enthusiast or student use without having to pay for subscriptions. Only commercial use for companies earning over $100,000 per year requires a paid subscription. I’m not quite sure how you would model this particular object using Fusion 360 but I haven’t had time to play with it yet.

Unfortunately Blender 3D has lots of problems when it comes to Boolean operations on objects or what we used to call in POV-Ray CSG for “constructive solid geometry”. It’s a process of taking multiple pieces and either merging or intersecting them. Although there have been some recent improvements in CSG operations on Blender 3D, it still struggles to merge or union objects that have coincident surfaces. Sometimes you can fudge one object or another by 1/10 of a millimeter and get it to work but it is very finicky.

All of the prints shown here were done without merging the objects. I exported them as a single model with multiple parts. I used an option in Simplify 3D by clicking on “Mesh->Separate Connected Surfaces”.


This in effect takes the multiple pieces and merges then in the slicer. There were still some issues with non-manifold parts of the model but I didn’t realize that until after I had printed them. After much tinkering using different options in Blender 3D and fudging the pieces back and forth I was able to get Blender 3D to create a single solid model. Those corrected models are the ones I’ve uploaded to Thingiverse however I have to admit I’ve not actually printed the versions I’ve uploaded. I’m still confident that not only will they print, they should print better than one’s that I actually printed myself.

I demonstrated this project on the Adafruit Show-and-Tell weekly video chat. Click on the icon on the right to see that video.

You can get the original Blender files, some intermediate blender files I used in creating the merged versions, and completed STL files that should print reasonably well. I recommend printing with 2 shells, no infill, and no supports. If you get threading, try turning down your heat. You’re still going to need to do some cleanup on the non-solid version. Threading is always going to be a problem with a print like this.

If you want to export from Blender 3D you can use the file “twisty_easter_egg_merged_2.blend”. If you select the object “Base” it will print the hollow version. If you select the object “Shell” it will print the solid version. The file “twisty_easter_ege.blend” is the original model before I tweaked and merged all the pieces. You can look at it to see how the original design was created.

You can get the files here on Thingiverse. Enjoy!