1

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.

askedMay 9, 2018 at 16:58
Datalink's user avatar
9
  • Other than with pyserial?CommentedMay 9, 2018 at 17:02
  • No, can I use Pyserial?CommentedMay 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.CommentedMay 9, 2018 at 18:15
  • So how would I get Python to interact with Arduino?CommentedMay 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.CommentedMay 9, 2018 at 19:22

2 Answers2

2

You can not run python on an UNO. If you want to use python on a microcontoller you should look into boards supported byMicroPython orCircuit Python

answeredMay 9, 2018 at 17:05
Craig's user avatar
-1

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 theSerial object in your Arduino code likewise.

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

answeredMay 10, 2018 at 10:01
Majenko's user avatar

Your Answer

Sign up orlog in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

By clicking “Post Your Answer”, you agree to ourterms of service and acknowledge you have read ourprivacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.