Arduino AsyncTimer library

asynctimercode-croped2

So there I was scratching an itch when I realized the scratch would make for a good Arduino library. AsyncTimer lets you create a timer that does something when you start it (or nothing if you prefer), then waits a predetermined time before doing something else. While it’s waiting, it doesn’t lock up your Arudino the way the delay() function does—it just schedules the time-out action to take place some time in the future.

If you’re not the RTFM type, you can just get what you need from the GitHub repository.

Motorized potentiometer for FLOSS remote control

Top view of Volume-AlpsRK16814MG PCB

Bottom view of Volume-AlpsRK16814MG PCB

I’ve just published Volume-AlpsRK16814MG, an open source hardware design that integrates a high-quality Alps motorized quad potentiometer  with an H bridge. The design lets you control the motor’s direction using two logic-level signals: VOL_UP and VOL_DOWN. The fact that it’s a quad pot means you can use it to control regular stereo volume by ignoring one of the dual gangs or a differential stereo signal.

Here’s the schematic* to give you an idea what it’s doing. Gerbers and PCBs are available at OSH Park.

*Subject to change!

Open source audio remote control

audio-remote

I’ve started a FLOSS remote control receiver project for DIY audio preamplifiers. I think it’s just about good enough to make public.

Remote control is one of the more challenging things for an audio DIY person to implement, so I thought having an open source hardware and software platform for doing this would be useful. It uses our good friend Arduino for brains and works with the Philips RC-5 protocol. I like RC-5 because its the closest thing I know of to a universal, well-documented, brand- and model-agnostic protocol.

The IR command decoding is done using Guy Carpenter’s excellent RC5 library. I also considered using Ken Shirriff’s multi-protocol IR library. Ken’s library works with a large number of protocols, but I thought its larger memory footprint might preclude porting this thing to tiny AVRs.

Details on the project are available in my RC5-Preamp GitHub or GitLab repository. [2021 update: This project is currently abandonware, so I have made the above repos private. If anyone wants access, contact me and we’ll figure something out.]

Acceptance testing and BDD with bash

berdea2
I’m working on a project that has some fairly weird acceptance criteria. I’d really like to automate the acceptance testing, but none of the tools I know of will cover all the requirements without a good amount of hoop dancing. So I wrote one … in bash. Truns out a few others have gone down this path as well.

While it’s currently quite limited and coarse, it might form the basis for a more comprehensive framework. Check the repo if you’re curious and/or interested.

Gitorious and GitLab

gitorious-logo gitlab-logo

My last post talked about using alternatives to GitHub in order to (in no particular order):

  1. Encourage diversity in project hosting in light of GitHub’s (not undeserved) domination in the area. This is all the more important because the GitHub stack is completely proprietary.
  2. Patronize vendors who more completely embody the spirit of FOSS (i.e., those who make significant parts of their platform available as FOSS).

I’ve done a bit more work with two Saas projects that can be used to achieve both goals above:  Gitorious and GitLab Cloud. My impressions follow.

Gitorious

gitorious-logoGitorious has been around a long time. I remember considering their hosting and software about the time when Google Code was still really hot (i.e., IIRC, before GitHub was a “thing”; Wikipedia says Gitorious launched in January of 2008 and GitHub in April of the same year). Many well-known and important FOSS projects are hosted on Gitorious.

If Gitorious (the service and the software) were the only option available today, people would be praising it to the nines. It offers repository hosting with decent code browsing, project logging/graphing, project wikis, and an interesting feature that lets you POST stuff to an arbitrary URL whenever a commit is made. The interface is pleasant and generally clear. The software that runs the service is FOSS and easily downloadable. Bitnami even packages a bundle that makes setting up your own service stupid easy.

However, there are a couple caveats. First, compared to other hosting options, Gitorious is a bit short on features. Notably absent are issue tracking and continuous integration support. While there are third-party tools that will do these for you, one of the nice things about GitHub and BitBucket (and, if we limit ourselves to issue tracking only, Google Code and Sourceforge) is that these are part of the service—meaning virtually no setup and good integration with the codebase. Some might actually prefer having orthogonal tools for issue tracking and CI, so this won’t be an issue for those.

The other thing you need to be aware of is that Gitorious organizes repositories based on projects rather than on users. Projects can have multiple repositories in them, but all the repositories will share the the same wiki (i.e., there is no per-repo wiki). Also, the owner of the repo will not be in the URL of the project. In other words, Gitorious isn’t really designed to support a “Here’s a collection of my repos,” Web presence. It’s setup is great if you are deploying a server for internal projects, but it’s not really optimal for being a “social coder.”

GitLab

gitlab-logoGitLab, or more relevantly, GitLab Cloud, is new to me—I discovered it only a few days ago. Indeed, it looks like it’s new to everyone, with late 2011 being the date of the first entry on the company blog.

It seems to me that GitLab is trying to be a feature-compatible alternative to GitHub. Even the names are similar. A GitLab account gets you repository hosting, per-repo wikis, issue tracking, and code review. GitLab also makes a FOSS Continuous Integration product—though I have yet to explore how it integrates with GitLab Cloud. The GitLab Community Edition is FOSS and easily downloaded.

My biggest concern with GitLab is that since it’s relatively new, it might go away. The fact that it’s FOSS hugely mitigates this concern. If Facebook buys GitHub and shutters it, your workflow, community, everything is screwed. But if GitLab shutters, you only need to grab the last release of the software stack, set up your own server, transfer your data to the new server, and update your URLs. As was the case with Gitorious, there is a Bitnami bundle to make setting up your own service brain-dead simple should you need/want to do this. (There’s also one for their CI project). In spite of this, it would be a bit of a drag of they disappeared.

My other concern is that I don’t know how much GitLab’s development will focus on introducing new features not available on GitHub (or elsewhere) and how much it will focus on simply maintaining feature-parity with GitHub. I’d be feeling a bit warmer and fuzzier if they were more aggressively inventing solutions rather than reimplementing GitHub’s offerings.

All said, I think I will focus on working with GitLab to see if there are any unforeseen gremlins. If not, GitLab may become the new primary host for my FOSS work.