-->
Page 1 of 1

HOW TO BUILD A CUSTOM USB DEVICE WITH ARDUINO THAT IS MORE T

PostPosted: Thu Apr 16, 2020 3:29 am
by serjio
In the most general terms I want to build my own USB device that can take input from buttons and sensors and pass them onto a companion app written in C# running on windows. For example I could press a button on the arduino and have a window pop up on my computer.
A lot of the tutorials I see seem to only be related to emulating a mouse or keyboard, but I want more direct control over the data. I know how to use serial to achieve this, but it seems like a too simple and fragile way to do itSo my questions are.

What type of arduino (Or other microprocessor) should I use that would make this as easy as possible?

How do I interface C# with the device

Is there a good tutorial or example project out there already that I can work off of?

Re: HOW TO BUILD A CUSTOM USB DEVICE WITH ARDUINO THAT IS MO

PostPosted: Thu Apr 16, 2020 11:24 am
by JurajA
why do you ask this on an esp8266 forum if you don't need WiFi?
why would using Serial be fragile?

Re: HOW TO BUILD A CUSTOM USB DEVICE WITH ARDUINO THAT IS MO

PostPosted: Thu Apr 16, 2020 11:57 am
by AcmeUK
I want to build my own USB device

The esp8266 and esp32 do not have a usb interface.
Some of the boards have a usb connector, but this is for the serial programming interface!
As JurajA says
why do you ask this on an esp8266 forum if you don't need WiFi?

If you still want to put a usb interface on an Arduino look here:-
https://arduino.stackexchange.com/questions/24177/can-the-arduino-interface-with-usb-devices-without-the-usb-host-shield
A lot of headache awaits!
I could press a button on the arduino and have a window pop up on my computer

You could use an esp8266 board like the Wemos D1 mini or the NodeMCU to detect the button press and send a UDP message via wifi to your networked PC.
The PC could listen for the UDP message and take the required action.
All of the information you need to do this is available via Google.