Im retired now, and browsing the web i found arduino which caught my eye. i think it is a really cool product with huge potential on a lot of applicaions.
As for now, I have successfuly wrote c# winsocket client/server program in which i tell the server to tell computer A, B or/and C to wake on lan, shutdown, launch or close a particular game, etc. so far so good.
My next project would be to use arduino.
from what ive been reading, (correct me if im wrong) ill need a native usb arduino on each client, probably leonardo, and use a virtual serial com to get the input from the client program, which in turn will data leonardo's hid api to move,click or type.
besides leonardo, what modules/parts i need to buy?
as future project, id like to use "leo" as a tv remote, prob with learning capabilities from original controls, controlled by a PC,
I would not recommend Leonardo. It has a form-factor which is intended to be used with "shields" (PCBs with the same form-factor as Leonardo, Uno, Mega). So unless you are planning to use such a shield, that form-factor will be inconvenient for prototyping and building your completed projects.
Arduino Micro or Pro Micro are equivalent to Leonardo but have a much more convenient form-factor.
This is confusing to understand. Can you give a more detailed and specific example?
From your brief explanation, it sounds like controlling one PC from another. But this could be achieved over WiFi/ethernet using remote desktop, secure shell or similar software application.
ty for your response. yes, i wanna control other computers through main pc. remote desktop too slow, ssh on windows? think not possible. was thinking on kvm, but i rather have fun programming since im now retired.
google's IA :
To inject mouse and keyboard HID commands from an external software program (like Python, C#, or Node.js) via an Arduino, use a native USB-capable board (such as an Arduino Leonardo or Pro Micro). Program the Arduino to listen for serial commands over USB and translate them into Keyboard and Mouse library functions.
To control mouse and keyboard actions from an external PC program via a COM serial port, use an Arduino with native USB capability (such as an Arduino Leonardo or Pro Micro using the ATmega32U4 chip). The Arduino reads serial data sent over USB from your script and uses the built-in Keyboard.h and Mouse.h libraries to inject real hardware input.
google AI:
Hardware Requirements
Compatible Board: Use an ATmega32U4-based board like the Arduino Pro Micro or Leonardo, or an Arduino Uno R4. Classic boards like the Uno R3 or Nano do not support native USB HID emulation.
You have not mentioned any specific OS up to now. I don't know if ssh is available on windows, but would not be surprised if you can install something compatible.
Then I would expect any solution you can come up with involving Arduinos will also be too slow.
if you are interested in communications and networking have a look at the ESP32 which has builtin WiFi, Bluetooth Classic and BLE - it is supported by the Arduino IDE
if you are interested in USB OTG have a look at the ESP32-S3-DevKitC-1 which can act as a USB device (Keyboard, serial port, etc) and host (connecting an external keyboard, mouse, etc)
class Program
{
static void Main(string[] args)
{
// Replace with your exact Arduino COM port
string portName = "COM6";
using (SerialPort serialPort = new SerialPort(portName, 9600))
{
try
{
serialPort.Open();
Console.WriteLine($"Connected to {portName}. Type text to send to Arduino HID:");
while (true)
{
string input = Console.ReadLine();
if (input?.ToLower() == "exit") break;
Thread.Sleep(3000);// delay to focus target window before emulation
serialPort.Write(input);
}
}
catch (Exception ex)
{
Console.WriteLine($"Error: {ex.Message}");
}
}
}
}
currently monitoring a river level and temperature sensing station using a ESP32-S3 running a Telnet server - can connect a remote Telnet client terminal to view results