Now i am using Pyfirmata and code Python on my computer
and just run it with type A to type B cable connected
but
is there anyway to just simply upload a Python code to Arduino
and let it run without connected to my computer?
i mean like power it with a portable charger and it will start running the python code i uploaded
conclusion:
Can i upload python code to Arduino and run it without connecting to PC?
Can Arduino run uploaded python code once it's powered?
There are Python implementations for some Arduino boards. You can check out MicroPython and CircuitPython. I think CircuitPython supports more of the Arduino boards:
I do not know if you can upload code to an Arduino, you'll have to try and then lets us know of your success or you need help.
You can run the Arduino from a power plug. A 1 or 2 amp 9V plug-it- into-the-wall-thingy and the other end into the Uno's power input jack is one simple way of powering your project disconnected from the USB plug.