Here’s a quick post to show off my first project using the LED canvas I have been working on (nicknamed Square Wave). It’s based on the old snake game, where the player controls a snake that slithers around looking for apples that appear and disappear. When he finds (and eats) an apple, he grows. When he crashes into himself, he dies.
Arduino is awesome, but using their IDE is uncomfortable for people that would prefer vim or emacs. There is an option in the IDE to allow you to use an external editor, but you still need to use the GUI to get access to the compile & upload tools. Here’s my setup, for a vim-only setup (would be similar for emacs).
As prep for future projects, I’ve built a simple 2D array of individually addressable LEDs. This canvas will ultimately serve as the platform for some games (snake, pong, etc), but I’m hopeful that other people will find this useful and come up with some cool applications.
I picked up a telegraph sounder on ebay this week. I don’t know much about its heritage, but it definitely looks vintage. I wrote some code (see below) to get my Arduino to clack away on it. In the video, the sounder is tapping out the Gettysburg Address, which is the example text in the code.
LED strips are growing in popularity and ease of use. I’ve been playing around with them lately (with my Arduino), and, for the uninitiated, here’s an overview of what’s available, and how much it costs.
Ruby’s standard library includes the Singleton module, which lets you easily implement the singleton pattern. It can make unit testing a little difficult, though, because you cannot easily instantiate different versions of the class. This post will look at three solutions, two of which are hackish/wrong, and one of which is basic and clean (imho).
At Braintree, the developers get every other Friday to work on non-work-related projects of their choosing. Collaboration is encouraged, but even if you end up working on something alone, it’s a great way to spread your excitement about whatever interests you at the moment (and it’s a nice perk to the job).
This week, my project was to get some LED strips unboxed and working. The strips are flexible circuit boards, with full-color LEDs dotting one side. Each “LED” is actually three LEDs clustered together (one red, one green, one blue), and with 21 control bits, they can display more colors than the human eye can distinguish. I bought a variety of strips, with different features, and I don’t know exactly what I’m going to do with them, but step 1 is to learn how to use them.