First love with python
A couple of things to do before we could start to write *.py code on a windows machine.
- Download python from http://www.python.org/getit/
- Install the msi file python-2.7.3.msi
- Download pyserial from http://pyserial.sourceforge.net/pyserial.html
- Install the exe file pyserial-2.5.win32.exe
- More about the pyserial (good stuff to use with ARDUINO) later
- Create a notepad file, rename it to *.py.
- Type some simple code, e.g print ‘Hello World’
- Start CMD
- Set path for using python compiler
- enjoy
Sample method to exe py, set path, navigate to the *.py folder, exe.
The “hello world” equivalent .
Install of pySerial. This will be the communication bridge between the arduino and python script.
- On the Arduino, create a code that send “Hello world” to computer over serial
- On the computer, create a code that detects the intended message and exe some conditional code.
code here~~
Some might ask why python?
Still remember my last experiment using arduino with java over serial?
This is why…….![](https://lh6.googleusercontent.com/U4j-VMYPTfPsf9PgO2G84KXB0YjjWQPnrZFvwslhnzszBQ-zdFuCQFcQJtSn4qPW53VfjrVB1BGj5vXdHogdiNbZNJUYpWwkcaMHR2UFlKsU6OIfkzk)
Still remember my last experiment using arduino with java over serial?
This is why…….
1 comment:
This is an awesome post.Really very informative and creative contents. These concept is a good way to enhance the knowledge.I like it and help me to article very well.Thank you for this brief explanation and very nice information.Well, got a good knowledge.
DedicatedHosting4u.com
Post a Comment