I'm using a pro micro as a USB keyboard of sorts. Basically I've set it up to autofill a form with the push of a button.
My issue:
one of the fields is "today's date". Is there away with out any additional connections to the computer(serial, Ethernet, etc) to get the date from the connected PC?
I played with Time.h but it just returns January 1, 1970 (unix time)
Plug and play infers that there is a PC app listening for the 'plug' in order to 'play'. The only connection to the PC is via a communication port. Communication infers somebody/thing being at each end. Without a companion app running on the PC, the only play you get with plug is power. This is the same for every peripheral out there. That's why there are such things as device drivers and the background utilities in an OS that have interrupt-driven (or idle polling) routines to react to plugs.
robbieaggas:
I'm using a pro micro as a USB keyboard of sorts. Basically I've set it up to autofill a form with the push of a button.
My issue:
one of the fields is "today's date". Is there away with out any additional connections to the computer(serial, Ethernet, etc) to get the date from the connected PC?
This seems very strange.
What kind of form would want you to specify today's date? Why wouldn't the machine receiving the completed form simply look at its own clock and datestamp/timestamp the form accordingly?