2 Answers
0
//It's going to be extremely difficult to get any kind of Python script running directly on the Arduino. The reason is that it's an interpreted language, so you would need the interpreter on-board in addition to the plain text script. There's probably not going to be enough memory for all of that.
Your best bet would probably be finding a way to compile a Python script to native machine code (which is how C/C++ works). I believe there are projects around to do something like that for other platforms, but (as far as I know) none which does it successfully for Arduino yet.
https://stackoverflow.com/questions/8114916/is-there-a-way-to-compile-python-code-onto-an-arduino-uno
0
look into MicroPython it can run on Arduino i think. not really my thing but it came to mind seeing it discussed in the recent past