nameless__
Member
Hello,
I recently asked a question on a project, where I would need the following setup:
A teensy, a USB Hub and a USB flash drive. The teensy and the flash drive would go into the hub and the hub is plugged in into the pc.
Then, the teensy should be able to open a file on the flash drive, and with open I mean using keypresses, so something like:
Windows + R
cmd
j:/testfile.bat
This generally works, I'm able to program the Teensy to open the file, but the problem is: The flash drive (ofcourse) not always has the same drive letter.
One approach I already got:
But: How can I actually notice, that the exe (or in my first try the testfile.bat) is running, before I keep trying and trying?
Are there any other ideas, how I could figure out the drive letter of the flash drive? Is there maybe something like a "last plugged in devices-log" where I can ust use the last drive letter?
I recently asked a question on a project, where I would need the following setup:
A teensy, a USB Hub and a USB flash drive. The teensy and the flash drive would go into the hub and the hub is plugged in into the pc.
Then, the teensy should be able to open a file on the flash drive, and with open I mean using keypresses, so something like:
Windows + R
cmd
j:/testfile.bat
This generally works, I'm able to program the Teensy to open the file, but the problem is: The flash drive (ofcourse) not always has the same drive letter.
One approach I already got:
Just keep trying D:\myexefile.exe ; E:\myexefile.exe ; F:\myexefile.exe ; etc. Once your executable is running it can easily determine its location if needed.
But: How can I actually notice, that the exe (or in my first try the testfile.bat) is running, before I keep trying and trying?
Are there any other ideas, how I could figure out the drive letter of the flash drive? Is there maybe something like a "last plugged in devices-log" where I can ust use the last drive letter?