I need help(python for arduino

ummm guys im a python and chatgpt expert but im not good at arduino and c++ so any way to code an arduino with python?

What does your good friend ChatGPT have to say about it ?

Adafruit Circuitpython

Some of the more powerful arduino-like boards can run CircuitPython (already mentioned) or microPython
Whether those will make an experienced Python programmer happy is a separate question, but they are each touted as "easier" than C++.

Boards based on ARM, ESP32, and RP2040 processors are likely supported. For most ARM boards, it seems to be useful to have additional flash storage to hold imported libaries. The SAMD21 processors that are popular have 256k to 512k of flash built in, but the Adafruit SAMD21 boards aimed at CircuitPython typically add an additional 2MB of (much slower) external flash.

I have used MicroPython (mentioned by @westfw ) on an ESP32
e.g. a UDP server

import socket

UDP_IP = "192.168.1.68"
UDP_PORT = 10000

sock = socket.socket(socket.AF_INET, # Internet
                     socket.SOCK_DGRAM) # UDP
sock.bind((UDP_IP, UDP_PORT))

while True:
     data, addr = sock.recvfrom(1024) # buffer size is 1024 bytes
     print("received message: %s" % data)

it is also possible to transmit Serial data from a Python program on a pC to an Arduino running C++ or MicroPython code, e.g. have a look at transfering-float-data-between-pc-and-teensy

what do you wish to do? e.g. send data from PC to Arduino r Arduino to PC?

Ummmm it says its not possible but its most of the times its dumb

I just want to write code for the arduino in python

What is the Arduino? Take your pick from the ones mentioned earlier that support a python flavour.

have a look at projects-esp32-esp8266-micropython

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