2017/06/16

20170616_115847

Using copper plating and tape I assembled rudimentary drum sticks. I soldered wires to the copper plating in order to create my input. Each “tap” will create either a “x” or a “z” the inputs required for taiko.

20170616_121115

This is the full wiring for the project including the leds. I used green and yellow led’s to signify the color differences similar to the red and blue that taiko uses.
But I know you can’t tell the difference so the colors I used for the led’s do not matter. : )

2017/06/16

arduino_official_logo__

 

#include<Keyboard.h>

const int led1 = 5;
const int led2 = 4;
const int buttonX = 3;
const int buttonZ = 2;

void setup()
{
pinMode(led1, OUTPUT);
pinMode(led2, OUTPUT);
pinMode(buttonX, INPUT);
pinMode(buttonZ, INPUT);

Keyboard.begin();
}

void loop()
{
if (digitalRead(buttonX) == LOW)
{
Keyboard.press(‘x’);
digitalWrite(led1, HIGH);
}

else //Otherwise,
{
Keyboard.release(‘x’);
digitalWrite(led1, LOW);
}

if (digitalRead(buttonZ) == LOW)
{
Keyboard.press(‘z’);
digitalWrite(led2, HIGH);
}

else //Otherwise,
{
Keyboard.release(‘z’);
digitalWrite(led2, LOW);
}
}

 

This is the edited version of the code now lincluding led’s

6/14/2017

21125716-taiko-video-game-ryan

Taiko drummaster is a popular arcade game in Japan and other countries.

The game is rhythm based and involves hitting a drum to the notes so to expand on the project I’m working on I decided to do something similar.

For this part of my project I will be creating “drum sticks” and using led’s to signify the color differences.

 

2016/06/08

arduino_official_logo__

const int buttonM = 6;

pinMode(buttonM, INPUT);

if (digitalRead(buttonM) == LOW)
{
Keyboard.press(‘m’);
}

else
{
Keyboard.release(‘m’);
}

#include<Keyboard.h>

const int led1 = 5;
const int led2 = 4;
const int buttonX = 3;
const int buttonZ = 2;

void setup() //This executes the next commands only once
{
pinMode(led1, OUTPUT); //Set up the pins 4 and 5 as output.
pinMode(led2, OUTPUT); //
pinMode(buttonX, INPUT); //Set up the pins 2 and 3 as input.
pinMode(buttonZ, INPUT); //

Keyboard.begin(); //This allows control over the keyboard.
}

void loop() //This repeats the next commands as long as the Arduino is powered on.
{
if (digitalRead(buttonX) == LOW) //if the input reads that it is activated,
{
Keyboard.press(‘x’); //press the ‘x’ key.
}

else //Otherwise,
{
Keyboard.release(‘x’); //release the ‘x’ key.
}

if (digitalRead(buttonZ) == LOW) //if the input reads that it is activated,
{
Keyboard.press(‘z’); //press the ‘z’ key.
}

else //Otherwise,
{
Keyboard.release(‘z’); //release the ‘z’ key.
}
}

This is the code for the controller.

2017-06-07

maxresdefault1

After minimal success on the keyswitch portion of the breadboard I decided to switch to a design based on this picture.

The use of a baseplate made of metal, some resisters an arduino micro and tinfoil or an alternative light metal.

As seen in the picture the inputs are on your hand, for this project I’m using copper that I’ve cut with a shear and then soldered wire to them.

For the resistors I will use 10k ohm resistors.

This will be coded using Arduino

 

 

2017/05/30

maxresdefault

Over this week I made a breadboard version of a input using a mechanical keyswitch, the breadboarding and wiring was based on the picture above. I used a modified code to fit my needs from http://www.makeuseof.com/tag/make-custom-shortcut-buttons-arduino/

 

int keys[] = {2, 3, 4, 5, 6, 7, 8, 9, 10};

void setup() {
 // put your setup code here, to run once:
 Keyboard.begin(); // setup keyboard
 for (int i = 2; i < 11; ++i) {
 // initilize pins
 pinMode(i, INPUT);
 }
}

void loop() {
 // put your main code here, to run repeatedly:
 for (int i = 2; i < 11; ++i) {
 // check buttons
 if(readButton(i)) {
 doAction(i); 
 }
 }
}

boolean readButton(int pin) {
 // check and debounce buttons
 if (digitalRead(pin) == HIGH) {
 delay(10);
 if (digitalRead(pin) == HIGH) {
 return true;
 }
 }
 return false;
}

void doAction(int pin) {
 // perform tasks
 switch (pin) {
 case 2:
 Keyboard.println("Testing for keypad");
 }
}