Is it possible to program Maker UNO with Python?

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

  1. The first step is to download the “StandardFirmata” from the example.

2021 11 28 5 56 33

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”

2021 11 28 6 11 50

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.

Leave a Comment

Your email address will not be published.

Share this Tutorial

Share on facebook
Share on whatsapp
Share on email
Share on print
Share on twitter
Share on pinterest
Share on facebook
Share on whatsapp
Share on email
Share on print
Share on twitter
Share on pinterest

Latest Tutorial

Interface RFid RC522 Reader using Maker Pi Pico and CircuitPython
Maker UNO DHT11 Alphanumeric Display
Internet Clock using Maker Pi Pico and CircuitPython
Snap & Fit ABS Case Stressberry Test
Maze Pro Passive Aluminum Case Stressberry Test
Tutorials of Cytron Technologies Scroll to Top