Go Down

Topic: Pulling data from PC (Read 816 times) previous topic - next topic

randomdude583

Hello,

I have looked around at making rubber duckys using arduinos, and the process is pretty straight forward. However, for my application, I need to be able to run a command in the terminal, and then get the result back to the arduino. I havent been able to find a way to do that yet. The best thing that I can think of is having a SD card that is mounted by the computer, and transferring the file to that, and then having the arduino access it directly. Would that work? if so, How would I go about switching which device is interfacing with the card, as I assume that they cannot both have it mounted at the same time.

Any help would be greatly appreciated!

Robin2

I have looked around at making rubber duckys using arduinos,
What is a rubber ducky ?





...R
Two or three hours spent thinking and reading documentation solves most programming problems.

sterretje

An Arduino can't directly access files on a PC (or SD card in the PC).

You will need an application to send the file to the Arduino.

Which Arduino are you using?
If you understand an example, use it.
If you don't understand an example, don't use it.

Electronics engineer by trade, software engineer by profession. Trying to get back into electronics after 15 years absence.

randomdude583

I am planning on using the Pro Micro, and emulating a keyboard. I can create a file, and save it wherever I want, but I need to be able to access that file on the arduino afterwards.

sterretje

One option could be to let the pro micro type a copy command to a terminal on the PC; that copy command can copy a file to the serial port.

Be aware that the pro micro might choke in the amount of data (e.g. when that data needs to be stored in eeprom). How big is the file that you want to send?

In that case, you will have to slow the data transfer down by means of a handshake; most terminal programs provide that functionality.
If you understand an example, use it.
If you don't understand an example, don't use it.

Electronics engineer by trade, software engineer by profession. Trying to get back into electronics after 15 years absence.

randomdude583

File would be no bigger than 5 kb. How would you go about pushing it over the serial port while the arduino is mounted as a HID input?

sterretje

To my knowledge it can be both at the same time.
If you understand an example, use it.
If you don't understand an example, don't use it.

Electronics engineer by trade, software engineer by profession. Trying to get back into electronics after 15 years absence.

Go Up