Your shopping cart is empty!
Is it possible to program Maker UNO with Python?
- Hussien Jawhar Sathik
- 27 Nov 2021
- Tutorial
- 1016
Introduction
In this tutorial, it is demonstrated how we can program the Maker UNO using Python. Before this we have always use the Arduino IDE to program our Maker UNO but this time we have decided to use Python to program our Maker Uno.
Video
Hardware Preparation
This is the list of items used in the video.
Circuit
No circuit needed since we have used the onboard led's
Software
In this tutorial we have decided to use the Thonny software to run our python code. The software can be downloaded here.
Code
The code for this tutorial is as shown below
import pyfirmata import time board = pyfirmata.Arduino('COM14') while True: board.digital[13].write(1) time.sleep(1) board.digital[13].write(0) time.sleep(1)
Steps
- The first step is to download the "StandardFirmata" from the example.
2. Once the code has been downloaded to the Maker UNO, we can move on to the step which is to setup the python environment. For this i have decided to use the Thonny software. Open the Thonny software and click "Open System Shell"
3. A new cmd window will open up and inside there type the code below
pip install pyfirmata
Once this is done, we are ready to go. Copy the sample blink code shown above and paste it inside the Thonny and click the play icon button. Observe the output on the Maker UNO.
Thank You
References:
Thanks for reading this tutorial. If you have any technical inquiries, please post at Cytron Technical Forum.
"Please be reminded, this tutorial is prepared for you to try and learn.
You are encouraged to improve the code for a better application."