Project in progress
Gaming Keypad Using Thrilles

Gaming Keypad Using Thrilles © LGPL

ArcheAge gamepad for instant combos.

  • 2,989 views
  • 2 comments
  • 16 respects

Components and supplies

Necessary tools and machines

09507 01
Soldering iron (generic)
3drag
3D Printer (generic)

Apps and online services

About this project

Intro to the Keypad

Well my friend had a problem she want to play a game she found a programmable keyboard on Amazon that was like $180. She then text me and ask if there is another way to get around this with programming. I said yes there is it is called a arduino microcontroller. We total up the cost of it and it was way cheaper about 110 savings just by make it. She then told me to do the Programming of the hardware. She is putting it together and working with me about the code.

The Inter Workings of the Thrilles Keypad

The Thrilles works by I2C with is on the Arduino SDA pins (data) and SCL pin (clock). All I2C devices has a address like this one is 0x70. The Thrilles has 16 LEDS and buttons. The LEDS have to be solder in. You also have to buy the silicone keypad too. with let you work with the buttons on the PCB. You can put a pull up resistor on the (A2 pin) or uses the Arduino internal resistor like I did in the Code.

  • 5V goes to the 5V power pin on the Arduino
  • GND goes to and GND ground pin
  • SCL goes to the I2C clock pin, on an Uno this is also known as A5
  • SDA goes to the I2C data pin, on an Uno this is also known as A4
  • We connect the INT interrupt pin to A2

The Keypad Layout

        | 3 | 7 | 11 | 15 |
        | 2 | 6 | 10 | 14 |    
        | 1 | 5 |  9 | 13 |
        | 0 | 4 |  8 | 12 |

As you see the Keys on the Thrilles goes for 0-15 like a array would be. You can loop though them one by one with a for loop. The only resign I did not do that in my code was I need control of each button.

I also give respect out for the videos of Tony D @

for the video that he made on this.

The 3D Parts from shapway.com ...

The Project working....

coming soon.....

The Arduino Code...

Code is still in the Works.

/*
* 
* Date: 3-20-2018
* Made by: theuser42
* Hardware: Trellis, Arduino Leonarto, and LED[16]
* Wiring: Connect Trellis Vin to 5V and Ground to ground.
*         Connect the INT wire to pin #A2 (can change later!)
*         Connect I2C SDA pin to your Arduino SDA line
*         Connect I2C SCL pin to your Arduino SCL line
*         
*         KEY PAD LAYOUT [16]
***************************************       
*         | 3 | 7 | 11 | 15 |
*         | 2 | 6 | 10 | 14 |
*         | 1 | 5 |  9 | 13 |
*         | 0 | 4 |  8 | 12 |
***************************************         
*         Hex Chart
***************************************         
* # 0x hex
* 0  -  00
* 1  -  01     
* 2  -  02    
* 3  -  03    
* 4  -  04    
* 5  -  05    
* 6  -  06    
* 7  -  07    
* 8  -  08    
* 9  -  09    
* shift - 81        
* ctrl - 80
* 
*         
*/
#include <Wire.h>
#include "Adafruit_Trellis.h"
#include "Keyboard.h"
Adafruit_Trellis matrix0 = Adafruit_Trellis();
Adafruit_TrellisSet trellis =  Adafruit_TrellisSet(&matrix0);
#define NUMTRELLIS 1
#define numKeys (NUMTRELLIS * 16)
// Connect Trellis Vin to 5V and Ground to ground.
// Connect the INT wire to pin #A2 (can change later!)
#define INTPIN A2
// Connect I2C SDA pin to your Arduino SDA line
// Connect I2C SCL pin to your Arduino SCL line
// All Trellises share the SDA, SCL and INT pin! 
// Even 8 tiles use only 3 wires max
void setup() {
  // INT pin requires a pullup
 pinMode(INTPIN, INPUT_PULLUP);
 digitalWrite(INTPIN, HIGH);
 trellis.begin(0x70);
 //     *   *
 //        
 //   *       *
 //     * * *
 trellis.setLED(7);
 trellis.setLED(11);
 trellis.setLED(1);
 trellis.setLED(4);
 trellis.setLED(8);
 trellis.setLED(13);
 trellis.writeDisplay();
 delay(2000);
 trellis.clrLED(7);
 trellis.clrLED(11);
 trellis.clrLED(1);
 trellis.clrLED(4);
 trellis.clrLED(8);
 trellis.clrLED(13);
 trellis.writeDisplay();
 delay(60);
 Keyboard.begin();
}
void loop() {
 delay(30); // 30ms delay is required, dont remove me!
 if (trellis.readSwitches()){
      if (trellis.justPressed(0)) {
           // all presses will be in hex value of the keys. 
          Keyboard.press(0x00);
          delay(20);
          Keyboard.release();
          trellis.setLED(0);
          delay(20980); //1sec delay 
          trellis.clrLED(0):
     }
      if (trellis.justPressed(1)) {
          // all presses will be in hex value of the keys. 
          Keyboard.press(0x43);
          Keyboard.press(0x04);
          Keyboard.press(0x03);
          delay(20);
          Keyboard.releaseAll();
          trellis.setLED(1);
          delay(1000); //1sec delay 
          trellis.clrLED(1):
     }
      if (trellis.justPressed(2)) {
         // all presses will be in hex value of the keys. 
          Keyboard.press(0x07);
          Keyboard.press(0x4E);
          Keyboard.press(0x3D);
          delay(20);
          Keyboard.releaseAll();
          trellis.setLED(2);
          delay(1000); //1sec delay 
          trellis.clrLED(2):
     }
      if (trellis.justPressed(3)) {
         // all presses will be in hex value of the keys. 
          Keyboard.press(0x01);
          Keyboard.press(0x02);
          delay(20);
          Keyboard.releaseAll();
          trellis.setLED(3);
          delay(1000); //1sec delay 
          trellis.clrLED(3):
     }
      if (trellis.justPressed(4)) {
          // all presses will be in hex value of the keys. 
          Keyboard.press(0x06);
          Keyboard.press(0x04);
          delay(20);
          Keyboard.releaseAll(); 
          trellis.setLED(4);
          delay(1000); //1sec delay 
          trellis.clrLED(4):
     }
      if (trellis.justPressed(5)) {
          // all presses will be in hex value of the keys. 
          Keyboard.press(0x01);
          Keyboard.press(0x05);
          Keyboard.press(0x3D);
          delay(20);
          Keyboard.releaseAll(); 
          trellis.setLED(5);
          delay(1000); //1sec delay 
          trellis.clrLED(5):
     }
      if (trellis.justPressed(6)) {
          // all presses will be in hex value of the keys. 
          Keyboard.press(0x42);
          Keyboard.press(0x4E);
          delay(20);
          Keyboard.releaseAll(); 
          trellis.setLED(6);
          delay(1000); //1sec delay 
          trellis.clrLED(6):
     }
      if (trellis.justPressed(7)) {
          // all presses will be in hex value of the keys. 
          Keyboard.press(0x08);
          Keyboard.press(0x04);
          Keyboard.press(0x02);
          delay(20);
          Keyboard.releaseAll(); 
          trellis.setLED(7);
          delay(1000); //1sec delay 
          trellis.clrLED(7):
     }
      if (trellis.justPressed(8)) {
         // all presses will be in hex value of the keys. 
          Keyboard.press(0x02);
          Keyboard.press(0x05);
          Keyboard.press(0x3D);
          delay(20);
          Keyboard.releaseAll(); 
          trellis.setLED(8);
          delay(1000); //1sec delay 
          trellis.clrLED(8):
     }
      if (trellis.justPressed(9)) {
         // all presses will be in hex value of the keys. 
          Keyboard.press(0x09);
          Keyboard.press(0x54);
          delay(20);
          Keyboard.releaseAll(); 
          trellis.setLED(9);
          delay(1000); //1sec delay 
          trellis.clrLED(9):
     }
      if (trellis.justPressed(10)) {
          // all presses will be in hex value of the keys. 
          Keyboard.press(0x56);
          delay(20)
          Keyboard.release();
          trellis.setLED(10);
          delay(1000); //1sec delay 
          trellis.clrLED(10):
     }
      if (trellis.justPressed(11)) {
          // all presses will be in hex value of the keys. 
          Keyboard.press(0x6D);
          delay(20);
          Keyboard.release(); 
          trellis.setLED(11);
          delay(1000); //1sec delay 
          trellis.clrLED(11):
     }
      if (trellis.justPressed(12)) {
          // all presses will be in hex value of the keys. 
          Keyboard.press(0x81);
          Keyboard.press(0x00);
          delay(20);
          Keyboard.releaseAll(); 
          trellis.setLED(12);
          delay(1000); //1sec delay 
          trellis.clrLED(12):
     }
      if (trellis.justPressed(13)) {
          // all presses will be in hex value of the keys. 
          Keyboard.press(0x01);
          delay(20);
          Keyboard.release(); 
          Keyboard.press(0x01);
          delay(20);
          Keyboard.release(); 
          Keyboard.press(0x01);
          delay(20); 
          Keyboard.release(); 
          Keyboard.press(0x01);
          delay(20);
          Keyboard.release(); 
          trellis.setLED(13);
          delay(1000); //1sec delay 
          trellis.clrLED(13):
     }
      if (trellis.justPressed(14)) {
          // all presses will be in hex value of the keys. 
         Keyboard.press(0x00);
          delay(20);
          Keyboard.release(); 
          Keyboard.press(0x00);
          delay(20);
          Keyboard.release(); 
          Keyboard.press(0x00);
          delay(20); 
          Keyboard.release(); 
          Keyboard.press(0x00);
          delay(20);
          Keyboard.release(); 
          trellis.setLED(14);
          delay(1000); //1sec delay 
          trellis.clrLED(14):
     }
      if (trellis.justPressed(15)) {
          // all presses will be in hex value of the keys. 
         Keyboard.press(0x6D);
          delay(20);
          Keyboard.release(); 
          Keyboard.press(0x6D);
          delay(20);
          Keyboard.release(); 
          Keyboard.press(0x6D);
          delay(20); 
          Keyboard.release(); 
          Keyboard.press(0x6D);
          delay(20);
          Keyboard.release();  
          trellis.setLED(15);
          delay(1000); //1sec delay 
          trellis.clrLED(15):
     }
       trellis.writeDisplay();
   }
 }

Code

The Code... UPDATED (5/5/2018)Arduino
Code is still in the works....
/*
 * 	
 * Prankster517Code for Gaming Keyboard
 * Date: 3-20-2018
 * Made by: theuser42
 * Hardware: Trellis, Arduino Leonarto, and LED[16]
 * Wiring: Connect Trellis Vin to 5V and Ground to ground.
 *         Connect the INT wire to pin #A2 (can change later!)
 *         Connect I2C SDA pin to your Arduino SDA line
 *         Connect I2C SCL pin to your Arduino SCL line
 *         
 *         KEY PAD LAYOUT [16]
 ***************************************       
 *         | 3 | 7 | 11 | 15 |
 *         | 2 | 6 | 10 | 14 |
 *         | 1 | 5 |  9 | 13 |
 *         | 0 | 4 |  8 | 12 |
 ***************************************         
 *         Hex Chart
 ***************************************         
 * # 0x hex
 * 0  -  00
 * 1  -  01     
 * 2  -  02    
 * 3  -  03    
 * 4  -  04    
 * 5  -  05    
 * 6  -  06    
 * 7  -  07    
 * 8  -  08    
 * 9  -  09    
 * shift - 81        
 * ctrl - 80
 * 
 *         
 */



#include <Wire.h>
#include "Adafruit_Trellis.h"
#include "Keyboard.h"

Adafruit_Trellis matrix0 = Adafruit_Trellis();
Adafruit_TrellisSet trellis =  Adafruit_TrellisSet(&matrix0);
#define NUMTRELLIS 1
#define numKeys (NUMTRELLIS * 16)

// Connect Trellis Vin to 5V and Ground to ground.
// Connect the INT wire to pin #A2 (can change later!)
#define INTPIN A2
// Connect I2C SDA pin to your Arduino SDA line
// Connect I2C SCL pin to your Arduino SCL line
// All Trellises share the SDA, SCL and INT pin! 
// Even 8 tiles use only 3 wires max


void setup() {
   // INT pin requires a pullup
  pinMode(INTPIN, INPUT_PULLUP);
  digitalWrite(INTPIN, HIGH);
  trellis.begin(0x70);
  //     *   *
  //        
  //   *       *
  //     * * *
  trellis.setLED(7);
  trellis.setLED(11);
  trellis.setLED(1);
  trellis.setLED(4);
  trellis.setLED(8);
  trellis.setLED(13);
  trellis.writeDisplay();
  delay(2000);
  trellis.clrLED(7);
  trellis.clrLED(11);
  trellis.clrLED(1);
  trellis.clrLED(4);
  trellis.clrLED(8);
  trellis.clrLED(13);
  trellis.writeDisplay();
  delay(60);

  
  
}

void loop() {
  delay(30); // 30ms delay is required, dont remove me!

  if (trellis.readSwitches()){
       if (trellis.justPressed(0)) {
            // all presses will be in hex value of the keys. 
           Keyboard.begin();
           Keyboard.press(0x00);
           delay(20);
           Keyboard.release();
           Keyboard.end();  
           trellis.setLED(0);
           delay(20980); //1sec delay 
           trellis.clrLED(0):
           
      }
       if (trellis.justPressed(1)) {
           // all presses will be in hex value of the keys. 
           Keyboard.begin();
           Keyboard.press(0x43);
           Keyboard.press(0x04);
           Keyboard.press(0x03);
           delay(20);
           Keyboard.releaseAll();
           Keyboard.end();  
           trellis.setLED(1);
           delay(1000); //1sec delay 
           trellis.clrLED(1):
      }
       if (trellis.justPressed(2)) {
          // all presses will be in hex value of the keys. 
           Keyboard.begin();
           Keyboard.press(0x07);
           Keyboard.press(0x4E);
           Keyboard.press(0x3D);
           delay(20);
           Keyboard.releaseAll();
           Keyboard.end();  
           trellis.setLED(2);
           delay(1000); //1sec delay 
           trellis.clrLED(2):
      }
       if (trellis.justPressed(3)) {
          // all presses will be in hex value of the keys. 
           Keyboard.begin();
           Keyboard.press(0x01);
           Keyboard.press(0x02);
           delay(20);
           Keyboard.releaseAll();
           Keyboard.end();  
           trellis.setLED(3);
           delay(1000); //1sec delay 
           trellis.clrLED(3):
      }
       if (trellis.justPressed(4)) {
           // all presses will be in hex value of the keys. 
           Keyboard.begin();
           Keyboard.press(0x06);
           Keyboard.press(0x04);
           delay(20);
           Keyboard.releaseAll();
           Keyboard.end();   
           trellis.setLED(4);
           delay(1000); //1sec delay 
           trellis.clrLED(4):
      }
       if (trellis.justPressed(5)) {
           // all presses will be in hex value of the keys. 
           Keyboard.begin();
           Keyboard.press(0x01);
           Keyboard.press(0x05);
           Keyboard.press(0x3D);
           delay(20);
           Keyboard.releaseAll();
           Keyboard.end();   
           trellis.setLED(5);
           delay(1000); //1sec delay 
           trellis.clrLED(5):
      }
       if (trellis.justPressed(6)) {
           // all presses will be in hex value of the keys. 
           Keyboard.begin();
           Keyboard.press(0x42);
           Keyboard.press(0x4E);
           delay(20);
           Keyboard.releaseAll();
           Keyboard.end();   
           trellis.setLED(6);
           delay(1000); //1sec delay 
           trellis.clrLED(6):
      }
       if (trellis.justPressed(7)) {
           // all presses will be in hex value of the keys. 
           Keyboard.begin();
           Keyboard.press(0x08);
           Keyboard.press(0x04);
           Keyboard.press(0x02);
           delay(20);
           Keyboard.releaseAll();
           Keyboard.end();   
           trellis.setLED(7);
           delay(1000); //1sec delay 
           trellis.clrLED(7):
      }
       if (trellis.justPressed(8)) {
          // all presses will be in hex value of the keys. 
           Keyboard.begin();
           Keyboard.press(0x02);
           Keyboard.press(0x05);
           Keyboard.press(0x3D);
           delay(20);
           Keyboard.releaseAll();
           Keyboard.end();   
           trellis.setLED(8);
           delay(1000); //1sec delay 
           trellis.clrLED(8):
      }
       if (trellis.justPressed(9)) {
          // all presses will be in hex value of the keys. 
           Keyboard.begin();
           Keyboard.press(0x09);
           Keyboard.press(0x54);
           delay(20);
           Keyboard.releaseAll();
           Keyboard.end();   
           trellis.setLED(9);
           delay(1000); //1sec delay 
           trellis.clrLED(9):
      }
       if (trellis.justPressed(10)) {
           // all presses will be in hex value of the keys. 
           Keyboard.begin();
           Keyboard.press(0x56);
           delay(20)
           Keyboard.release();
           Keyboard.end();  
           trellis.setLED(10);
           delay(1000); //1sec delay 
           trellis.clrLED(10):
      }
       if (trellis.justPressed(11)) {
           // all presses will be in hex value of the keys. 
           Keyboard.begin();
           Keyboard.press(0x6D);
           delay(20);
           Keyboard.release(); 
           Keyboard.end();  
           trellis.setLED(11);
           delay(1000); //1sec delay 
           trellis.clrLED(11):
      }
       if (trellis.justPressed(12)) {
           // all presses will be in hex value of the keys. 
           Keyboard.begin();
           Keyboard.press(0x81);
           Keyboard.press(0x00);
           delay(20);
           Keyboard.releaseAll();
           Keyboard.end();   
           trellis.setLED(12);
           delay(1000); //1sec delay 
           trellis.clrLED(12):
      }
       if (trellis.justPressed(13)) {
           // all presses will be in hex value of the keys. 
           Keyboard.begin();
           Keyboard.press(0x01);
           delay(20);
           Keyboard.release(); 
           Keyboard.press(0x01);
           delay(20);
           Keyboard.release(); 
           Keyboard.press(0x01);
           delay(20); 
           Keyboard.release(); 
           Keyboard.press(0x01);
           delay(20);
           Keyboard.release(); 
           Keyboard.end();  
           trellis.setLED(13);
           delay(1000); //1sec delay 
           trellis.clrLED(13):
      }
       if (trellis.justPressed(14)) {
           // all presses will be in hex value of the keys. 
          Keyboard.begin();
          Keyboard.press(0x00);
           delay(20);
           Keyboard.release(); 
           Keyboard.press(0x00);
           delay(20);
           Keyboard.release(); 
           Keyboard.press(0x00);
           delay(20); 
           Keyboard.release(); 
           Keyboard.press(0x00);
           delay(20);
           Keyboard.release(); 
           Keyboard.end();  
           trellis.setLED(14);
           delay(1000); //1sec delay 
           trellis.clrLED(14):
      }
       if (trellis.justPressed(15)) {
           // all presses will be in hex value of the keys. 
          Keyboard.begin();
          Keyboard.press(0x6D);
           delay(20);
           Keyboard.release(); 
           Keyboard.press(0x6D);
           delay(20);
           Keyboard.release(); 
           Keyboard.press(0x6D);
           delay(20); 
           Keyboard.release(); 
           Keyboard.press(0x6D);
           delay(20);
           Keyboard.release();
           Keyboard.end();  
           trellis.setLED(15);
           delay(1000); //1sec delay 
           trellis.clrLED(15):
           
      }
        trellis.writeDisplay();
    }
  }

Custom parts and enclosures

Schematics

Threllis build
3d printing panavise pcb kuuhp8fg9h
Wire the Threllis
3d printing connections d5wl22nnm6

Comments

Similar projects you might like

Only Three Pins for a 4x3 Keypad

Project tutorial by Giovanni Carrera

  • 3,236 views
  • 3 comments
  • 13 respects

Using 4×4 Keypad With Arduino

by Techmirtz

  • 22,063 views
  • 6 comments
  • 27 respects

Arduino Keyless Door Lock System with Keypad and LCD

Project tutorial by DIY Hacking

  • 15,297 views
  • 9 comments
  • 43 respects

I2C Matrix Keypad With PCF8574/PCF8574A GPIO and Visuino

Project tutorial by Boian Mitov

  • 5,956 views
  • 4 comments
  • 20 respects

Gesture Based Wireless Gaming Console

Project tutorial by Team Xolcano Technologies

  • 1,495 views
  • 0 comments
  • 1 respect

Guess the Number with Arduino KeyPad

Project tutorial by Giovanni Gentile

  • 2,609 views
  • 3 comments
  • 3 respects
Add projectSign up / Login