Arduinome, now what?
Nov 9, 2015 · 5 mins read
Having built such a well constructed device I thought it was time to create a few pieces of software for it to run. For anyone considering building an Arduinome like this I would strongly suggest starting with the examples from Adafruit Learning System. They really help making sense of the library functions available and how to use them properly. From now on, I’ll assume the reader has tested the basic functions. The following sketches are divided into three sections: Testing, Games and Music. All the code referenced in this post is available at the Github repository Arduinome-OONTZ-Trellis.
T is for Testing
The testing sketches were designed to help create the other examples.
T_Draw is a simple program that allows one to press the desired buttons on the Arduinome and then print the lit buttons on the console. This is very helpful when designing animations as you can create them on the Arduinome instead of having to decifer the bitmap arrays in the Arduino IDE.
T_Draw_XY has the same purpose as the previous program but instead of printing a bitmap array it outputs pairs of (x, y) coordinates thanks to the Adafruit_Trellis_XY library.
T_Numbers is a sketch created to test how to draw numbers on the Arduinome and how to control the adding and subtraction of values.
G is for Games
The next section is about entertainment, that is, creating little games to fill in the gaps of a long trip or that period just before dinner…
G_LightsOut is an implementation of the game Lights Out for 4 Trellises. The software is heavily based on the Adafruit’s example with some corrections to work better on a 2x2 matrix of Trellis; I fixed the odd behavior of lights turning on in the left end side of the board when you pressed a button on the right end side of the Arduinome.
G_Memory is a little game of memory. The game consists on a pattern that appears for 1 to 3 seconds (depending on the size of the board), and then the user has to press the correct buttons. If you guess right you gain points, if not you loose points. It’s quite simple. By pressing the lower left and lower right buttons, the user can decrease and increase the board size changing the difficulty of the puzzle. Check out the demo on the video below.
G_TicTacToe is a multiplayer game, which only purpose is to save paper waste. When powered on the Arduinome shows a simple 3x3 grid. Inside each cell there are 4 buttons turned off. Each player has to choose a position (top left, top right, bottom left or bottom right) and when it’s his turn the user chooses a cell and presses the button in the correct position to mark his move. When one player wins (or ties) you can simply press the lit buttons to turn them off or reset the Arduinome and start again. Watch the video below for a quick demo.
M is for Music (or MIDI)
Finally, this section has some examples to use the Arduinome as a… well… an Arduinome! Thanks to the Arduino Leonardo the Arduinome can function as a MIDI device sending MIDI notes through USB to the computer.
M_NoteMapping is a simple program that maps the Arduinome buttons to common music notes to make the process of assigning samples to each note easier (on Ableton for instance).
M_StepSeq is once again a sketch heavily based on Adafruit’s. The title is preatty self explanatory. It’s purpose is to use the Arduinome as a Step Sequencer: you press the buttons and they become active, when the bar reaches the lit button it plays the correspondent note on the computer. Check the video below to see how this works.
That’s it for now. I’ve been testing lots of applications with this device, I’ve even used it as an interface for a digital magazine, but that’s a story for another post.