Arduino to detect file in PC

Hello guys,

Recently I bought an Arduino Leonardo to control the stepper motor.

However, I would like to control the motor steply and after it gets a response from the PC.

I would like to take a screenshot of every motor step on my computer and then detect if the file exists on my PC. Afterward, the motor can do another step as a loop.

But I could not find an approach to use Arduino Leonardo to check if a file exists on my PC or not.

Could you please help me with some ideas? :face_with_monocle:

Thanks!

What on the PC is talking to the Arduino?

Your topic has been moved to a more suitable location on the forum. Installation and Troubleshooting is not for advice on (nor for problems with) your project.

I would expect this not to work. The PC file system is entirely separate from the Arduino. You will need to have your Arduino pole the PC with code you have written that will check the filesystem for the file you want. This is an ambitious project.

IDK exactly. Basically I would like to find out if there is a possibility to get signal from PC and tell Arduino to do the next step. I have checked there is one "SD.exist" code in Arduino, which can detect if the file exist in SD card and then transfer signal to Arduino.

Yes. This is complicated. But somehow there is something like SD card modul that interact with Arduino. Arduino board can use code like "SD.exist" to detect if a file exist. So I wonder if there is also possibility in PC, that we could check if a file exist, if so, then do the next line of code. I would like to try! Thank you! :hugs:

The SD card library is for SD cards directly connected to an Arduino, not for monitoring files on a PC.

You can write a PC application that srnds commands to an Arduino that instruct the Arduino to switch a LED on, move a servo, play a sound or whatever you want the Arduino to do.

That application can send commands in sequence.

That application should also be able to take a screenshot of itself and save it; I've never tried it.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.