0

Do you know if it is possible to have a device in between the keyboard and the computer , you press a recording key on the arduino, then press the letter P, the arduino keeps that P in memory and and the letter can be assigned to a rythm pattern and sent to the computer like this: P...P...P...PPPP..PP etc..

the information is received exactly the same way it comes in the computer with a physical keyboard.

the is a music based product as it is now the arduino can send midi to the computer and I would need a app to receive the midi data and convert it to keycode date so I am looking at my other options to make the easiest system possible

user768954
  • 11
  • 4

1 Answers1

0

Normaly keys are ASCII encoded so no need to get them from somewhere. So you could send over serial (usb) a char array either as ASCII characters

const char keyPresses[] = "P..P....P....P...P";

or ASCII encoded (depends on the Midi software used)

const uint8_t keyPresses[] = {80,,,80,,,80,,80};

To let the Arduino act like a keyboard (so the PC-SW is not aware that it is an Arduino) use the HID library, which has examples included for all kind of scenarios.
To record a sequence of key presses a keylogger on the PCis the eseast way. Save to a txt file and copy and paste to the Arduino code or convert characters toASCII codes e.g. here online

Codebreaker007
  • 2,911
  • 1
  • 10
  • 22