Another Show and Tell Project

Here is a video about my latest electronic project. It’s a mouse and keyboard emulator that I use when my voice control program doesn’t do certain functions or gets hung up. You just plug it into a USB port, load a driver and use a TV remote to control the mouse, arrow keys or keyboard.

Adafruit Show-and-Tell sticker I earned for this presentation.

Adafruit Show-and-Tell sticker I earned for this presentation.

When I attempted to show this video on the Adafruit Show-and-Tell, I could not get the screen share to work properly. So the video never did get shown directly at the show and tell session. Click the Show-and-Tell logo on the right to see the Show-and-Tell session where I describe the project but failed to show it.

Playing House with Your Food

One of the strangest yet coolest electronic gadgets I’ve seen is an add-on for the Arduino microcontroller called “makey-makey” which allows you to turn ordinary household objects into touch sensor inputs to the microcontroller. From there you interface it to a music synthesizer (or other gadgets) to make them touch sensitive. Of all the uses of makey-makey that I’ve seen this video is probably the coolest. A guy uses a synthesizer/loop sequencer to create a cool version of the theme from the TV show “House”. Actually the name of the song is “Teardrop” by a group called “Massive Attack” but it’s better known as the theme from house.

For inputs he uses ordinary vegetables as touch sensors. Thus the title of this blog post. Enjoy!

Announcing a New Infrared Remote Control Library for Arduino

In April 2012 I begin work on a project to create an infrared remote control using an Arduino Uno. I downloaded a library of code called IRremote which was published by Ken Shirriff in his blog post here.
http://www.righto.com/2009/08/multi-protocol-infrared-remote-library.html
His library is available on github.com at https://github.com/shirriff/Arduino-IRremote
It’s a remarkable piece of work that makes it incredibly easy to receive, decode, and transmit IR signals such as are used for TVs and other consumer electronics. It supported NEC, Sony, RC5 and RC6 protocols as well as a raw data mode and he later added a 32-bit hash code version. Note: so I don’t have to remember constantly have to spell “Shirriff” I’m going to refer to his original library as the KS library.

However I needed to add some additional protocols of my own. It took a lot of research from a variety of sites but I eventually found a pair of websites that will especially useful in helping me to understand the various protocols available.

One especially useful site is this one which I believe KS cites in his blog http://www.sbprojects.com/knowledge/ir/index.php

However the one that had the most information is this one http://www.hifi-remote.com/johnsfine/DecodeIR.html

It uses a notation called IRP notation that is insanely difficult to understand but once you do it is a very concise way of describing an IR protocol. I used that reference to determine that my Bright House cable boxes which are either Scientific-Atlanta or Cisco user protocol called “Panasonic old”. It also helped me identify NECx and Samsung36 protocols which I needed to implement for various devices I have.

After after adding several of these protocols to the original KS library I realize there was a lot of redundant code being created. Also the way it was written you either had to use all of the protocols at once or you had to create your own custom version in which you deleted or commented out the protocols you didn’t need. Although the code was written in C++ it really didn’t take advantage of object-oriented programming practices for which this application was especially suited. What we really needed was a variety of decoder objects based upon a base object that could be extended by additional protocols without having to modify or recompile the original library.

Also found it a bit difficult to understand what part of the code was hardware related dealing with timers and interrupts and PWM signals versus the encoding and decoding of protocols. Once you understand the protocols you really don’t need to know the hardware specifics. In many ways that’s the whole purpose of a library is to make things as “black box” as possible. The user doesn’t need to know the internal details, only the program interface.

For my own deeper understanding of the code and as a programming exercise I embarked upon a almost complete rewrite of the entire library using the principles of object-oriented programming. I am now ready to release my rewritten library on github for others to use. I did not created as a fork of the original KS library because the rewrite is so extensive that it really doesn’t work as a patch to the original code. I’ve also renamed it because it isn’t really very backward-compatible with the previous code at least from a software standpoint. If you have hardware configured for the previous library it should work out of the box with this library.

I also want to acknowledge the work of TKJ Electronics who have created a fork of the KS code. I use their version to obtain additional information about use of the library with other types of Arduino boards other than the standard Arduino Uno. This was especially helpful to me when I needed to point the code to the Arduino Leonardo especially since the Leonardo does not timer 2 and the pinouts are different. The timer and more detection information from this fork has been included in my rewritten library.

Because my library is such a major rewrite and is not backwards compatible I have given it a different name and have not created it as a fork of either of these two predecessor libraries. I have to acknowledge that this is my first publication of code using github and I really don’t know what the proper protocol is for creating a work based on someone else’s material. If I violated some custom or rule in the open source community please feel free to contact me and I will adjust the linkage of my github pages appropriately.

While much of the code is well documented and includes a variety of example sketches, my intent is to create a series of blog posts here which gives further explanation of how to use the library and explains in more detail some of the example sketches. I also hope to write a post explaining how to use the IRP notation. But for now I just want to get the code out there so that people can give me feedback and perhaps start using it themselves.

Here’s the link to my new library which I call “IRLib”
https://github.com/cyborg5/IRLib/

Here is a page where I link to all of my blog posts related to this library.
http://tech.cyborg5.com/irlib/

I welcome your feedback.

I Can Now Zoom My IPod Touch!

As most of you know I operate my iPod touch using a wooden stick in my mouth. I had to put a metal tip on it to get it to activate the touchscreen but other than that it works really well. The only thing I haven’t been able to do is multi-finger gestures such as the pinch to zoom feature. There are other apps that have special features that require two or three finger swipes that I’ve never been able to do. For example there are some levels of Angry Birds that can only be solved by zooming out.

While doing some Google searches about accessible software I discovered that there has been a feature in the iOS operating system ever since version 5 (we’re now on version 6) called “Assistive Touch”. It puts a little floating icon on your screen that is there all the time. If you tap on it it allows you to do all sorts of different things such as rotate your screen, lock your screen, it’s the home key without using the physical button (which is very useful) and especially it allows you to do pinch to zoom and other multi-finger gestures! Here’s a video explaining the new improved features in iOS 6 regarding Assistive Touch. Here I didn’t even know it was in iOS 5! (Kind of embarrassing for technology geek like me).

That’s all for now… I’m off to finish up those levels of Angry Birds Space that I couldn’t do before.

Assistive Technology at Both Ends of the Price Spectrum

Those of you who know me know that not only have I built a variety of gadgets both mechanical and electronic to help me deal with my disability, but that I also many years ago helped a friend of mine named Christopher Lee who had very severe cerebral palsy get access to a computer using software I wrote. With new inexpensive controllers like the Arduino and the new Raspberry Pi credit card size computer running Linux, the opportunities for making adaptive equipment for the disabled are going to go through a new resurgence not seen since the days in the late 70s early 80s when the only way to have a personal computer was to buy a bag of parts and fire them together yourself.

But an interesting phenomena is occurring. There seems to be a great disparity in the cost of these devices. On one hand we have the open source DIY maker community designing gadgets and giving away schematics and software for free. On the other hand we have people commercializing these projects and building businesses around them.

I’m all for people getting paid for their inventions even if the invention is designed with  altruistic motives such as helping the disabled, teaching underprivileged children,  or leveraging technology in undeveloped countries. I appreciate that some of these devices are in such small demand that the overhead to produce and sell them is great because they are built by hand and sold in small quantities. On the other hand some amazing work is being done in the DIY maker community that shares its designs and software for free and allows people to adapt it and further innovate it to meet their needs. It tends to make one wonder if the standard business model is really the best way to get products in the hands of people who need them.

Here are couple of examples… In previous installments of this blog I showed you how I showed off my IR remote control for my TV that was built with an Arduino microcontroller. My venue was Adafruit Industries weekly Show-and-Tell video chat via Google+ hangouts. This week’s hangout included a demonstration from a guy named Dino Tinitigan who had showed off some of his robotic projects in the past. But this time he showed a power wheelchair that can be controlled by tilting your head while wearing a helmet. Although he’s invested a lot of his own design work into it, it pretty much is built from off-the-shelf products the kind of which one could buy at Adafruit or other maker supply houses. He’s demonstrating that anyone with a little bit of maker ability and some time to spare can create incredibly useful technology. I don’t know if he is really creating this stuff as open-source hardware and software or if he intends to commercialize it but in either event he’s creating something and sharing it as a demonstration of what is capable and does not seem to be working out of a corporate model. Click here to see the Show-and-Tell video that demonstrates this.

At the opposite end of the spectrum is another device I stumbled onto today. It is called a Tecla device. Click here for details. It allows you to use pushbuttons or joystick or other adaptive devices to control touchscreen devices such as android and iOS phones and tablets. This is an amazing accomplishment even though it doesn’t allow 100% full access it does allow some use of such gadgets. It is Arduino-based so I understand the underlying technology. However it is only available as a commercial product and the cost is $289 Canadian. My initial reaction was Holy $#!+ That’s outrageous! On further review it probably is a reasonable price for a commercially built product with all of the capability it includes. It has a variety of interfaces that are designed to work with pushbuttons and input controls that meet an industry standard for adaptive devices. It includes the capability to use one’s wheelchair joystick as an input device. Given that it has to be designed to work with a wide variety of devices and it is a commercial enterprise I can understand the price. At the point when I can no longer use my iPod touch, I will probably be buying one of these at whatever price they want to charge for it. I’m sure the people behind it are decent people. They describe themselves as not just for profit. And I certainly have no trouble with doing well while doing good as it were. On the other hand… If I knew what I was doing I could build something similar for about $75 worth of parts.

There has to be a happy medium in here somewhere. Perhaps an open source design that demonstrates the basic functionality and would allow others to adapted as needed combined with a fully developed commercial product with all the bells and whistles for those who don’t have a friend who is a DIY maker aficionado to put it together for them.

Somebody proved me (slightly) wrong.

In my previous post in this blog I gave a lengthy demonstration in an attempt to disprove a recent message that has been making the rounds on Facebook regarding privacy when using the like and comment features. Facebook message says that you ask your friends and family to go through lengthy procedures to secure your own privacy. At the end of the explanation I challenged people to prove me wrong. Much to my surprise at least two people inadvertently did prove me wrong. At least partially wrong.

While everything that I said in the original post was true, there was one other privacy issue that I was unaware of and did not test. Here’s what happened… I posted a link to the blog as a comment on a couple of different people who posted the original Facebook message. People who I did not know commented on my comment and liked my comment. I was able to see their comments and likes. Here’s an image that shows what I’m talking about. The image below shows the original message that I first showed at the beginning of the previous blog. Below that there was a comment from someone I didn’t know but I could see their name and the comment. Then you see where I posted the link to my blog as a comment. Then the person who had commented before both liked and commented again. You can click on the image to enlarge it as always.

Comments and likes from stranger

Comments and likes from stranger

Anyone who uses Facebook on a regular basis has seen this behavior but I’ve never really thought about it in terms of privacy. One question that came to mind… Did this person who liked my comment and who commented upon my comment have their profile set to “public” or to “friends”? To verify this I had the BS account go back in like and comment upon the test message from my dad. Here’s what that looks like. Note this is as seen from the BS account in his privacy setting is still “friends”.

Mr. Shagnasty likes and comments my dad's post.

Mr. Shagnasty likes and comments my dad’s post.

So my original post implied that the only thing you need to do to keep your own information private was to set your privacy settings to “friends”. That is not 100% true. Regardless of what your privacy settings are, anytime you like or comment on someone else’s wall (or presumably images etc. as well) your comments and likes will probably be visible to anyone.

Now I logged into my own personal account. Remember that I’m not friends with Mr. Shagnasty. When I look at my dad’s page I can see his public post titled “test message” and I can see that Boliver Shagnasty has both liked and commented upon it. This is despite the fact that BS’s privacy settings are set to “friends”. Here is what my dad’s post looks like from my account.

My view of dad's wall with BS comments

My view of dad’s wall with BS comments

So if you post on your timeline “To celebrate New Year’s Eve I’m going to rob a bank” then only your friends will see it. However if one of your friends writes “What are you doing on New Year’s Eve?” and you comment in reply “I’m going to rob a bank” then it will be public. Or at least as public as your friends post was. This “loophole” that I’ve discovered doesn’t really have anything to do with the wording of that original Facebook warning. The original warning said “… with the recent changes in FB, the “public” can now see activities in ANY wall. This happens when our friend hits “like” or “comment” ~ automatically, their friends would see our posts too.” I still believe that I have proved that statement is incorrect and challenge anyone again to prove me not slightly wrong but completely wrong.

What am I doing for New Year’s Eve? Sitting home updating my blog and watching NCIS on my DVR. At least that’s all I’m saying in public 🙂