How to use one ATmega32U4 Arduino on multiple Computers for Keyboard macros

I am wanting to use one Arduino to send keyboard macros to like 20 laptops at a time. That way I only have to write the code once to the Arduino and then it could just run when I plug the USB into each laptop at the same time. If that's not physically possible then, is there any way to achieve running one macro set on multiple laptops simultaneously?

I realize I could just use multiple ATmega32u4 chips and plug each one into a computer but I would much rather have one board with multiple USB cables that I can plug into like 20 laptops at a time and then only have to flash/write the code to the board once.

Any help would be greatly appreciated.

You can’t plug the same USB connector into more that one place.

I can’t see how you can achieve what you want to do.

I've looked it up and I'm aware I cant plug the same USB connector into more than one place. But that is not necessarily what I am trying to do. I am wanting to playback a set of keyboard commands from one hub onto multiple laptops. It doesn't have to be done with one single Arduino as long as the end result is the same. if I have to use multiple Arduino or a combination of devices with an Arduino in order to achieve what I'm wanting. I know other solutions exist with a BeagleBone and Arduino's and it's actually a product called (GoBox) but I'm not wanting to pay $1500 dollars for something that could cost me way less if I don't use a premade solution. So I'm wanting a DIY solution similar to Centipede for Arduino or the GoBox.

Sorry not heard of GoBox or Centipede have you any links.

I suspect that at $1500 it is just a heap of beaglebone boxes.
Sure a heap of Arduino micros or Leonardos will do it.

The end picture is to have a panel of buttons that i can assign macros to (like connecting to wifi, or login) and when I press the button it will send the keystrokes to multiple connected computers. The reason a premade solution like the GoBox is not preferred is because it can only playback a single set of macros to 16 laptops and requires timing to be perfect or it will get off track in the menus. So I'm wanting to remove the guesswork and just have a way for a human being to press buttons for each stage of the setup process, when the button is pressed it plays back a macro. I know i can already connect multiple buttons to the gpio of an Arduino and get this to work on one machine at a time but I'm imagining only having to press one button to have multiple devices receive the macro set. As it is now I can have 20 separate buttons connected separately to 20 Arduino chips and to accomplish this I'm just wanting to remove more button presses.

Link to GoBox

Here is a sneak peek under the hood.

*See attached photo


*

I would have a master Arduino with one set of buttons and playback macros, and feed that into a heap of micro boards, each one connected to one computer.

And how exactly does one "feed that into a heap of micro boards"

Looking at the photo of the GoBox, they probably use a microcontroller with Serial and USB for each USB port. The ATtiny85 can do that. The (Pro) Micro board can do that as well, and it has already a USB connector.

The Master Arduino can be a Micro board as well, because of the extra Serial/UART port. The single TX of the Master to 16 RX inputs of 16 Micro boards.

I agree with the others, there seems to be no shortcut, not a single board, nothing cheaper, you really need all those 16 Arduino boards.

If you want to control 20 computers, then you need 20 (Pro) Micro boards plus the controller.
Suppose you can buy the Pro Micro for 5 dollars each, then it will be 105 dollars.

The Arduino uses a SerialUSB port to communicate with the Arduino (Pro) Micro. Some computers can not see a keyboard if they see a serial port first. The Arduino code can not turn off that SerialUSB port.

Any way you want.
I2C, multi drop serial, SPI

Carrier pigeon? :grin:

Well, you could certainly use N arduino micros (or similar) (one for each usb), and one larger “controller” board, and still come in under the $2000 price tag of a gobox, but you would have to do a lot of coding, and it still wouldn’t be “cheap.” I suspect the gobox is quite carefully priced, and perhaps fairly. (Figure it’s close to $500 worth of arduino boards, plus interconnect, plus cables, plus box… plus development effort. Less if you use cheaper boards for the usb (Adafruit qt py?))
And it would be big and fragile and ugly…

I suspect a big chunk of the cost of the commerical option is also for tech support. My guess is customers need help getting started. Free tech support means the cost of tech support is included to the price.

It is possible to buy a Raspberry Pi Pico board for $4 although some places have quantity limits per order. The board has USB hardware but uses the TinyUSB stack instead of the Arduino USB stack. Lots more CPU, RAM, Flash, UARTs, etc. than 32u4. But one per computer is still required for the OP's application. And the Pico Pi extra capabilities are not needed for the OP's application. Fewer
people are familiar with the TinyUSB stack so I would not expect much help from the community.

No that is done by the salesman but that mostly involves giving samples and evaluation kits. Remember these are professional electronic engineers who can read data sheets and understand them. Any mistakes in the data sheets are pointed out to the salesman.

The commercial option I am referring to is the $1500 go-box which looks like the BOM cost is about 1/10 the price.

"5x BOM" is sort-of the standard estimate for the customer price of non-mass-produced electronics devices, so you might not be far wrong.

The photo looks to have about 16x a circuit similar in complexity to an Arduino Micro (two by each stacked USB connector.) That's the big problem - USB isn't "shareable", so you pretty much NEED 1 USB microcontroller for each computer you want to talk to. I'd guess they have something like a SAMD11) Then there is the BeagleBone controlling it all.

You could experiment, of course. Use something like a SeeedStudio Xiao (About $6 - the cheapest native-usb Arduino-compatible board that I'm aware of. (Oh! There's also the RPi Pico at only $4. Sorta big to put 20 together, though.)) And maybe an RPi Zero 2 W ($15) as the main controller.

Daisy-chain them all using I2C or something, and you'd have yourself an expandable equivalent. You can even "start small" with just one or two USB ports while you get the main software working the way you want.

But it's not going to be an off-the-shelf piece of hardware or software, and it's not going to be a pretty box when you're done, and I'm guessing that the "development cost" would be high enough to buy several of the commercial product.

Thanks for the info guys, I now know more about it all and I think I am going to use Arduino pro micro boards (aka)Leonardo clones. We have like 150+ of them just laying around at the office. I'll use the TX from one pro micro to talk to the RX of the other 20+ pro micros that I will be using. I already started designing a PCB so I can solder stackable female headers on the pro micros that I can then plug into my custom PCB along with keyboard mechanical switches to launch the sets of macros I want. I have already designed and 3D printed a box with a faceplate for this project as well. After adding up all of the parts I will need to make the project my BOM came out to around $150 or $200 if I use an orange pi or beagle bone clone or something similar for the "master". We managed to snag a bunch of pro micro boards while they were ~$5 2 years ago lol. Once again thanks for the help guys.

150 Pro Micros?

What sort of office do you have there? :astonished: