Project to take data from terminal and type it via a atmega32u4 emulating keyboard on another system

Hi everyone

I got an idea in my head to take data from a serial board eg cp2102 connected to a Pro micro board emulating a usb keyboard. So if I type data in the terminal program and press enter it gets typed on another system if that makes sense. Or do I need different hardware ?

Edit found this so im busy experementing as im not so experienced in programming

Keyboard Serial | Arduino Documentation

Can you make a rough drawing of how this goes together. It sounds like it can be easily accomplished.

This is the idea in my head. In theory I would type or paste data into putty connected to the cp2102 on pc1 and the pro micro would duplicate it by emulating a keyboard on pc2 or game console to enable easy chatting.

Think I got it figured out

#include <Keyboard.h>

void setup() {
  Serial1.begin(9600);
  Keyboard.begin();
}

void loop() {
  if (Serial1.available()) {
    char c = Serial1.read();
    Keyboard.write(c);
  }
}

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.