Code in Python?

I have always coded in Python. Is there a way to be able to code the Arduino in Python too? Thanks for the help!

The answer is yes, but only for some boards

Which board do you have ?

I have 2: an Arduino Uno and an Elegoo Mega 2560

Neither of which allow programming in Python I am afraid

Could you tell me which ones are programmable? Thanks!

Arduino offers MicroPython, and Adafruit offers CircuitPython.

Adafruit is constantly improving and supporting CircuitPython, especially with sensor libraries, so it is probably the better choice. They also sell boards that run CP out of the box.

CP code execution is perhaps an order of magnitude slower than C/C++.

Thanks!

A great many boards that run CP, in fact, with special additions to make it work better.

Fundamentally, it's a memory and performance issue.
Boards based on the Microchip AVR processors can NOT run Python
Boards based on the SAMD21 can theoretically run (circuit) Python, barely. (they do better if augmented with additional flash memory, which is Adafruit's usual add-on.)
Boards based on the SAMD51 do a lot better.
ESP32 boards will run (at least) one of the micro-oriented pythons.
Boards based on the RPi RP2040 (aka "Pico") will run at least microPython.

1 Like

You can also try one of Telemetrix's flavors. Here are the AVR, ESP-8266, and STM32 versions.

There are also versions for:

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.