This serie tutorial will show you how to communicate between Arduino and Python via serial port. Why Arduino? Because Arduino is the most popular till now. Why Python? Python is lightweight and I want to use Python with Raspberry Pi so this is how I met Python.
This serie is based on the work of Mr.Paul McWhorter with my modification. I honor his name because he makes it clear and effective for the newbies. You can visit these URL for reference:
The serie Using Python with Arduino will be numbered with the syntax [PA] hyphen [2 digits of tutorial’s order]. This is [PA-01] tutorial and I will show you how to install Python on Window 10 64-bit
Step 1: go to http://vpython.org/contents/download_windows.html and follow 2 steps
Step 2: setup Environment Variables
Control Panel\System and Security\System –> Advanced system settings –> Environment Variables –> (below) System Variables –> Path –> (button) Edit –> New (add 2 directory C:\Python27 and C:\Python27\Scripts –> OK –> OK –> OK
Step 3: create folder python_code in Documents, this will save the code. Open VIDLE for VPython and type this code:
print "Hail Hydra"
Then save it in the folder python_code with the name hello_world.py (remember the format .py). Run –> Run Module (or press F5) to execute the code in Python Shell and it will print out the phrase. To terminal the code excution press Ctrl+C (corrupt) the code (you do not need to press Ctrl+C right now, it is one step ahead)
Now it is finished. Next tutorial will show you how to install serial library on python with pyserial and how to use it.