My First Python Sketch on Arduino UNO:

Revision N1T

Currently, there are four Python like interpreters (at least) available.

  1. Full Python (python.org) is the biggest. Also works on Full linux boards like Raspberry Pi 1,2,3,4

  2. MicroPython (https://micropython.org/) is slightly smaller. Supported boards include ESP32, ESP8266, Raspberry Pi Pico, Arduino Nano 33 BLE, Arduino Nano 33 BLE Sense, Arduino Nano RP2040 Connect, Arduino Portenta H7, Micro:Bit and others..

  3. Circuit Python (another subset of the Big Brother)

  4. Sneklang (not exactly a Python, but fits on Arduino Uno and similar boards.

 ~

Installing Sneklang on Arduino Uno

  1. Download and install Sneklang windows

    https://sneklang.org/dist/snek-windows-1-9.exe

    Remember installation path: "C:\Users\<user>\AppData\Local\Programs\Snek Development Environment"

  2. Download and extract AVRDUDE for Windows to the folder below (..Environment) here:

    https://github.com/mariusgreuel/avrdude/releases

    (take avrdude-v7.1-windows-windows-x64.zip)

  3. Burn Sneklang firmware into the Arduino Board (make sure on what port your board is connected, autodetection works in Arduino IDE):

    cd "Snek Development Environment"
    .\avrdude -pm328p -carduino -PCOM8 -b115200 `
      -D -U flash:w:snek-uno-1.9.hex:i
    
  4. Connect with SnekDE (see section "18. Snek Development Environment" in https://sneklang.org/doc/snek.html manual:

    PS> python snekde.py
    (connect) F1 -> Arduino Uno (COM8)
    (cancel)  F7 -> ^c
    (Load)    F5 -> examples -> blink
    (Put)     F3 -> put
    (Quit)    F4
    

 ~

Blink example

led = D13


def blink():
    talkto(led)
    while True:
        on()
        time.sleep(0.5)
        off()
        time.sleep(0.5)

blink()

--

Links:

  1. Arduino Lab for MicroPython, Compatible boards

    https://docs.arduino.cc/learn/programming/arduino-and-python