Questions tagged [python]
Python is a programming language. Use this tag for questions regarding how to use Python with your Arduino, or on using of pySerial or such software. Also consider using [programming] and other specific tags.
192 questions
0
votes
2
answers
116
views
problem with scripts in Arduino Lab for MicroPython
I am trying to set up an Arduino Nano ESP32 so that I can code in MicroPython. I successfully installed Arduino Lab for MicroPython and flashed the firmware onto the device, but when I try to run the ...
-1
votes
1
answer
204
views
Error in Compiling for Seeed Xiao nRF52840 [closed]
I am using Arduino IDE 2.3.4 to program a XIAO nRF52840 Sense. I added the board using the instructions on the official getting started page.
After installing the board in Arduino IDE, I open up the ...
0
votes
1
answer
349
views
Xiao ESP32-C6 in CircuitPython
So I recently bought two Xiao ESP32-C6 from SeeedStudio; they work with Arduino code out of the box. Now I want to flash the CircuitPython bootloader from here https://circuitpython.org/board/...
-1
votes
1
answer
229
views
Reading serial data from Arduino in Python continually
Using a stepper motor and a range finder (TFLuna), I am trying to build a "Lidar" (like a Radar, but with light). Here is the algorithm:
Turn motor one step, calculate angle, measure ...
2
votes
1
answer
132
views
Micropython installation on Arduino nano
I am currently trying to use micropython on an arduino Nano 33 BLE using MacOS. Following the instructions from arduino website I was able to complete steps 1-3. At step 4, I can find the bossac file ...
3
votes
1
answer
529
views
How to ignore garbage values in serial communication between arduino and python
I have arduino uno. I am trying to send and receive serial data from arduino to python. I have usb to uart converter. I have connected its tx to rx of Arduino and rx to tx of Arduino and gnd is ...
2
votes
1
answer
243
views
Connecting Arduino Mega 2560 to Python with PyFirmata
I am currently controlling two servos using the Arduino IDE, but now need to integrate my Arduino code into a Python script. I read about how to use PyFirmata and went through the process of uploading ...
2
votes
0
answers
598
views
Sending an image captured using ov7670 using arduino and serially transmit it to python
I am working on using an ov7670 camera module with arduino uno,capturing the image frame wise and transmitting the image serially line by line of each frame to python for image processing, however i ...
1
vote
0
answers
129
views
Converting more strings from serial monitor to int arrays
I want to transfer 8 lists from a python script, via Serial Monitor to the Arduino. I can get the strings to Arduino and Arduino saves them as String array, but I can't change it to integer (it shows ...
-2
votes
1
answer
283
views
Serial communication between python and Arduino nano BLE sense 33 for running six DC motor
I am controlling six DC motors by varying their voltage. I have figured out the voltage required for each motor in python; now it's time to send this voltage through Arduino Nano BLE Sense 33 to run ...
1
vote
0
answers
2k
views
ESP32 wifi server with multiple clients
I have a program where I configure my ESP32 as a server and it sent randomly generated data, the problem is that I can only connect 1 client at a time, what I want is that multiple clients can connect ...
1
vote
1
answer
2k
views
Sending float values from Python to Arduino using Serial communication
I need to send an array of floating-point numbers from python to Arduino Mega. For that, I read many sources [this this this this this] this] and many more links for the same I referred. But unable to ...
0
votes
1
answer
85
views
Controlling Arduino through python
How to set the registers of Arduino through python code to vary the sampling rate of Arduino?
Can we control Arduino through python?
3
votes
2
answers
1k
views
get data from arduino using python
I am trying to read potential meter data from Arduino using python, with the program on Arduino as follows :
#include <cvzone.h>
SerialData serialData;
int sendVals[2];
void setup() {
...
1
vote
0
answers
29
views
Serial communication between Python & Arduino: [duplicate]
I need to transfer information between pyton script and arduino.
Data is always built like this "wheelbase:1000"
wheelbase can be another word and 1000 can be another value, : is always the ...
1
vote
1
answer
209
views
opencv reading the display and doesnot provide serial communication with arduino
I was creating a project where the following part of the code reads certain area of the display(which i screen shared from mobile)
import cv2 as cv
import numpy as np
from PIL import ImageGrab
import ...
1
vote
1
answer
424
views
How do I control a servo with python through an Arduino
I'm trying to make it so I can control 2 servos with data that I get from a python script that tracks my face.
I have found 2 libraries that do this:pySerial and pyfirmata.
Is one superior to the ...
1
vote
1
answer
457
views
Arduino , python , pyfirmata , standard firmata
Is there a way to change arduino analog reference to EXTERNAL IN PYTHON using pyfirmata or any other library ?
Necessary Links : https://www.arduino.cc/reference/en/language/functions/analog-io/...
0
votes
1
answer
81
views
How to receive commands to a running arduino program from a raspberry pi?
I have looked all over for a solution to this. I'm a noob in the arduino space and am really just getting my feet wet. It's possible that I am interpreting what I am reading wrongly. If so I apologize....
1
vote
1
answer
1k
views
How to use pyserial to write two separate message?
I'm using pyserial to communicate with my arduino. I set up the connection and everything works fine. Now I have these two writing commands:
pyserial.write("conn".encode())
pyserial.write(&...
0
votes
1
answer
415
views
5V pin out, 8 pins and micropython/circuitpython support: does such a board exist?
For a project, I am looking for a board to connect eight different neopixel-strips to, on eight different data pins. Because of the great length between the board and the first pixels of these strips, ...
-2
votes
1
answer
1k
views
How to fix "expected primary-expression before '%' token" error code? [closed]
I'm trying to use this code to get temperature and humidity values from DHT11 sensor and send it to Python and I need to write the temperature and humidity values in the same line. But I keep getting ...
1
vote
1
answer
1k
views
ESP8266 SocketIOclient constant disconnect with Python WebServerSocket
I am writing a program that echos back the message sent to the web socket server on a host machine. When running the ESP module, the connection is established but immediately disconnects as seen in ...
2
votes
1
answer
128
views
share enum between python and arduino
I have created a gui in python that allows an arduino controlled mecanum wheel cart to move around.
The cart allows for 8 different move directions and can rotate left and right. Commands are sent ...
2
votes
0
answers
3k
views
Reading JSON from Arduino over serial in python and writing to a JSON file on computer
I'm fairly new to Arduino so I used a sample code before integrating this into my main code. I'm printing my value in a JSON format over serial. My Arduino outputs this and the python receives this ...