I already made several different Arduino Projects with the Digispark ATTiny85 devices. The goal was to implement a HW password safe that can hold multiple different passwords that are entered on keypress.
One time I added 4x4 analog keypad and one time I used a M5Stack i2c keyboard.
However, I still think I am not at the goal.
I am thinking of a device that can be commanded and where a special password can be requested. Afterwards the controller shall enter the looked up password as usual by simulation keyboard presses. But I am having problems in finding a solution get information from a Win10 pc to the controller over the USB.
Currently the Digispark is recognized as a HID in Windows. I don't know if HID is capable to be bidirectional or if it just sends information from the conroller to the pc.
I found something like V-USB and DigiCDC - Digispark USB CDC Serial Library which seems to be a SW implementation of the USB protocol. There it should be possible to get a virtual serial interface over USB. But I already did some tests with that but had no luck.
There are also several examples but often I am confused what exaclty they are wanting to do.
Another thing is, that the solution should work without installing an additional driver.
I also have some Beetle Leonardo based USB ATMEGA32U4 mini development boards that may be better for this.
So again in short. I want to command the controller via a Win10 app over USB without installing additional drivers.
So again in short. I want to command the controller via a Win10 app over USB without installing additional drivers.
Almost impossible, even for the Arduino you need to install an additional driver. So I guess the biggest stopper is the Windows side. I rarely use Windows so maybe you use that part and as soon as you found an USB sservice that doesn't require a Win10 driver we can have a look at the Arduino counterpart.
I don't know if HID is capable to be bidirectional or if it just sends information from the conroller to the pc.
There is a possibility to send some HID commands to the USB device but I seriously doubt that the standard Windows HID driver supports that. As above: solve the Windows part and post the results here.
Serial communication is supported by Win32 API in Windows.
When connecting Arduino via USB, a serial port is created at the PC.
This is used for communication between IDE/Serial monitor and Arduino, but might as well be used to communicate between your own programs at both sides without affecting the HID-functionality of a Pro Micro/Leonardo.
Google "Win32 API" and you will find lots of info.
As said in #1, you will need a USB-driver for Windows, but that is normally installed "automatically". But anyway, you have to install your own program...
I use serial communication (terminal program like PuTTY) for configuring my USB-keyboard, and I have never had issues when connecting it to new PC's.
The trick was to use the
Beetle Leonardo based USB ATMEGA32U4 mini development board.
This device has always a UART in windows. Even on PCs with no additional driver it was recognized correctly. As far as I see, this uart is used to program the device but also can be initialized in the embedded SW. Additionally it is possible to init the controller's USB interface as a HID mouse or keyboard to simulate mouse moves or key presses. The USB UART seems to work in parallel. So it was very easy to change my SW for my needs. You can create a commandable keyboard or mouse device. Awesome.
The originally used Digispark ATTiny85 seems to be much more tricky than a standard Leonardo device. The Digispark is not recognized as a UART from a Windows PC. Even programming works differently since the upload has to be started in the Arduino IDE and AFTERWARDS the device has to be plugged in to get in the programming mode and upload the code to the controller.
The Digisparks are still cool and very cheap devices but I think I am done with them since the Leonardo based cost only a few EUR more and seem to be more of a full blown Ardoino with real communikation interfaces an more I/Os and so on.
I can recommend this device:
I am also thinking of replacing some of my old Arduino UNOs with them. The Beetle Leonardos are so cheap and small and still more powerfull and easy to handle.
Crazy how far we have gone. I remember the times when we had these discrete ATMEGA8 that had to be programmed in assembler and were uploaded over the LPT. And now... C++ and plug and play USB directly in a USB A of the notebook.
pylon:
A standard Win10 installation doesn't include the necessary driver for that as far as I know.
Windows includes drivers for the most common USB to serial adapters.
This is how a Chinese Pro Micro shows up in Device Manager in Windows 10 when first connected.
(Language is Norwegian, but I hope it is self explanatory....)
ATTiny85 devices are good for simulating keyboard presses. So if you just want to make a litte password stick then you are good to go with them.
The Leonardo based devices are much better since the controller is more powerful, there is NATIVE USB serial support in Windows10 and you also have much more interfaces and I/O pins.
And of course you still can simulate a HID Keyboard and also a HID Mouse.
So I recommend the Leonardo based devices and it is possible to use these without installing any driver in Win10. That's a fact.