Does anyone know how do I get Arduino and Python talking to each other? I would essentially like to write my code and export it somehow to the arduino-uno.

  • Other than with pyserial? Commented May 9, 2018 at 17:02
  • No, can I use Pyserial?
    – Datalink
    Commented May 9, 2018 at 17:13
  • 1
    For a python interpreter running on a microcontroller you need quite a lot of ressources (flash, SRAM, speed,..). Consider to either change the board to something like an ESP8266, ESP32 or Feather M0, or live with C/C++ and the smaller boards. The Arduino Uno simply can't run it on 2KB RAM and 32kB Flash. Commented May 9, 2018 at 18:15
  • So how would I get Python to interact with Arduino?
    – Datalink
    Commented May 9, 2018 at 19:10
  • 1
    'Arduino' is a framework, a set of library functions which you can use to make your microcontroller do something, so to say. When you use the language Python with MicroPython or CircuitPython, you're using that new framework. Then it's not running an Arduino Core anymore. Commented May 9, 2018 at 19:22

2 Answers 2


You can not run python on an UNO. If you want to use python on a microcontoller you should look into boards supported by MicroPython or Circuit Python


The Arduino communicates with the PC (and vice-versa) normally using Serial. You can use the PySerial module in your python code to open the Arduino's serial port and read and write data, and the Serial object in your Arduino code likewise.

What that data is, and what it means, though is up to you to decide upon and program.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.