Cardboard Keyboard

Showing it with code

We first got a historic recap of how Processing came to be, a history of IDEs and a glance of what generative art could be.

Intro to Arduino

Arduino starter kit
The MAU Arduino kit

We went on with an intro to Arduino and buttons and such. We had a nice little library called EduIntro. That helped a lot as we didn't have to debounce the presses and would get stateful switch buttons for free. We where then set free to make a small project together with a student from Product Design.

As I had a bit more experience than most with arduino I could start playing with it a bit and showing my team mates how to do more stuff. I made a small Morse code LED blinker. It can at the moment just say "SOS", but do you really need more.

During the Processing part of the seminar I made some different small programs like an "analog" watch face and some other small things.

Workshop: Multiplayering a Singleplayer game

Brief: Take a singleplayer game and make a multiplayer input device for it. You got 4 hours (this became maybe 6 hours in the end).

Materials: cardboard, Arduino, copper tape, tape, glue and wire.

Team: Katten, Lottie and me

We started by deciding on a game. Katten likes the game Snake and we started brainstorming on how we could make that a multiplayer experience. We had some idea about letting the players crawl on the floor to connect point to steer left and right. The idea seemed more fun for a single player and was abandoned.

First sketch of the instrument

After that we started thinking of a music game instead. We decided to go with a Guitar Hero clone called Bemuse. It's not the nicest game but we just needed something to control.

Lottie working on the drum
Lottie shows some serious cardboard skills. It's quite clear the Product Designers have us beat when it comes to building physical stuff.

We found some plastic tubes and insulation lying around. It fit perfectly as we could route the cables through the tube and with Katten's soldering skills we could make them really robust.

Katten makes drum sticks
Katten makes drum sticks.

We went a bit overboard with the copper tape. As it was a fast project we didn't stop and think of more effective ways of doing it. One thing we noticed was that players would not always get that they had to connect the vertical copper strips to the horizontal ground strip using the hand held pad. This would probably have been easier if we skipped the ground strip and just would have grounded the pads.

Drum and keyboard
Drum and keyboard getting done.

Drum and keyboard
Connecting the whole thing to the code.

Starting to connect the whole thing together I realized I had not thought about this so much during the design of the instrument. This is very unusual for me as I often think in code very early in the process. It felt like a new and fun process to first build everything to connect it together. The program ended up being a very simple thing using the EduIntro and Keyboard libraries.

#include <EduIntro.h>
#include <Keyboard.h>

// reconfigure these pins to be the ones where you plug your wires
byte tonePins[] = {D8, D7, D6, D5, D4, D3, D2};
byte drumPin = D10;
byte crashPin = D11;

// which are the keys you will be using ... ?
byte key[] = {'s', 'd', 'f', 32, 'j', 'k', 'l'};
int toneCount = 7;

Button tones[] = {
  Button(tonePins[0]),
  Button(tonePins[1]),
  Button(tonePins[2]),
  Button(tonePins[3]),
  Button(tonePins[4]),
  Button(tonePins[5]),
  Button(tonePins[6])
};

Button drum(drumPin);
Button crash(crashPin);

void setup()
{
  // initialize the keyboard controller
  Keyboard.begin();

}

void loop()
{
  if(drum.pressed()) {
    for (int i = 0; i < toneCount; i ++) {
      if (tones[i].pressed() || tones[i].held()) {
        Keyboard.press(key[i]);
      }
    }
  }
  if(drum.released()) {
    for (int i = 0; i < toneCount; i ++) {
      Keyboard.release(key[i]);
    }
  }
  if(crash.pressed()) {
        Keyboard.press(KEY_RETURN);
  }
  if(crash.released()) {
        Keyboard.release(KEY_RETURN);
  }
}

Drum and keyboard
The final version.

The take away

We where very pleased with our results but there are a lot to improve. People had some problems connecting the copper pads with the handles. This could be improved by making them into keys instead. This would also let the players press more buttons at once and would probably help with the spacial orientation of the hands.