Project showcase
Macro keypad

Macro keypad © GPL3+

Save your time with a click of a button.

  • 756 views
  • 2 comments
  • 1 respect

Components and supplies

Necessary tools and machines

3drag
3D Printer (generic)

Apps and online services

About this project

Its a simple and cheap macro keyboard.

[UPDATE]

So I'm planning to make Version 2.0 on the Macro Keyboard project using Arduino Pro mini* (after some googling looks like you can't emulate HID devices with Arduino Nano) and make a 3D case and the biggest thing is to make profiles. So e.g. instead of having 16 macro keys have over 30 (One button will be set to change the profiles). So yeah wait for a couple of months for Version 2.0 (maybe without a case at first). And if some of you want to have profiles early I already have the code all you need to do is write a comment or email me: orgytis@protonmail.com.

Code

Macro KeypadArduino
Its a macro keypad. you can use it to open a program, help with video editing, streaming or simply just copy and paste.
//Gytis_Orz sketch from Hackster.io more info https://www.hackster.io/Gytis_Orz/macro-keypad-02cb43
// Wiring:
// VCC -> 5V
// GND -> GND
// OUT -> A1 (Analog 1)
#include<Keyboard.h>
#define KEY_MENU 0xED
void setup() {
 Serial.begin(9600);
}

void loop() {
 // is any button pressed?
 int valueA1=get_button();
 if(valueA1>0) { 
   Serial.print("Click button ");
   Serial.println(valueA1);
   delay(500);
 } 
}

// button detection
int get_button() {
 // get A1 analog input value
 int val=analogRead(A1);
 if(val>1000)
 return 1; //you can change the "return x;" to whatever you want like using a keyboard library you can make it to copy or paste something
 else if(val>900)
 return 2;
 else if(val>820)
 return 3;
 else if(val>750)
 return 4;
 else if(val>660)
 return 5;
 else if(val>620)
 return 6;
 else if(val>585)
 return 7;
 else if(val>540)
 return 8;
 else if(val>500)
 return 9;
 else if(val>475)
 return 10;
 else if(val>455)
 return 11;
 else if(val>425)
 return 12;
 else if(val>370)
 return 13;
 else if(val>300)
 return 14;
 else if(val>260)
 return 15;
 else if(val>200)
 return 16;
 else
   return 0; 
}

Comments

Similar projects you might like

Gaming Keypad Using Thrilles

Project in progress by Team The Gamers

  • 3,810 views
  • 2 comments
  • 17 respects

Keyboard Macro Mat

Project showcase by Team Fidgety Fred

  • 2,832 views
  • 0 comments
  • 7 respects

I2C Matrix Keypad With PCF8574/PCF8574A GPIO and Visuino

Project tutorial by Boian Mitov

  • 9,854 views
  • 4 comments
  • 23 respects

Only Three Pins for a 4x3 Keypad

Project tutorial by Giovanni Carrera

  • 4,831 views
  • 4 comments
  • 15 respects

Midi Keypad

Project tutorial by labsud

  • 5,745 views
  • 0 comments
  • 7 respects
Add projectSign up / Login