Hey, I have an Arduino pro mini and I want to put a python script on it, and whenever I'll connect it to a computer it will execute the script on the computer it is connected to.
I would appreciate any help, thanks.
Python won't fit on such a tiny processor.
I dont want the arduino to run the script i want the computer to run script the arduino just stores it and execute it on the computer it connects to
With the cooperation and knowledge of the computer it connects to? Or no? i.e. is custom software running on the computer?
Automatically, or with user intervention?
Why not just put the Python script as a file on a memory key, then the PC could load and run it?
Because with a memory let it will not work because the computer wonβt run it automatically Iβll have to execute it manually
Too bad. An Arduino only has a serial connection to a PC. It can't command it in any way, except for emulating keyboard and mouse. But a Pro Mini won't even do that. You need a Leonardo or Pro Micro, or a few others that will.
I'm not sure if you can run that HMI and serial at the same time, either...
Are you trying to create a "hacking" or nefarious plug in device? It sure sounds like it.
Allowing a PC to be commanded by unknown USB devices is obviously dangerous, small wonder it's not supported...
I frown on black hat hacking.
It "may" be possible using V-USB. You would have to force the OS (Win, OSX, Linux) to open a command prompt and execute Python and get into the REPL. So, using HID, the keystrokes coming from the Arduino send the Windows_key, an 'R' + 'python' + CR
then just put out the character stream for the program code.
Win r
+Enter_key
Search the forum for my old posts on V-USB. You "may" need to download an old version of the ArduinoIDE to get the old code to load and perform properly.
Do NOT go cheap on the zener diodes. Order quality parts.
Rayhttps://www.google.com/search?q=mrburnette+%2B+V-USB+site%3Aarduino.cc
Of course, the ProMicro is easier as the USB stuff is built in to silicon.
c79ad72af91df42c28a4297592532a1ac37d05cf.jpeg (2048Γ1536) (discourse-cdn.com)
thanks a lot
btw i,m not a black hat hacker
It's just that you didn't ever explain what your purpose for this is. Also it seems like a security vulnerability if it works, since Python may have access to some fairly private things on the PC and certainly has the capability to automate processes.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.