Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
0answers
25 views

I am trying to write and read between arduino and python

I have a project where first data is stored into a db then I am using python to retrieve that data and check if the timestamp between 2 arduino readers(stored in db) have the time diff of 2mins when ...
0
votes
0answers
17 views

Sending to Arduino UNO multiple values from Python code

I'm starting to learn how to work with Arduino, particularly communication between a Python code running on a PC and an Arduino Uno. So I decided to start with what I thought to be a easy task. ...
0
votes
0answers
28 views

Programming the serial description

Is it possible to program a custom description so that my python program can know exactly what USB port to connect to for that specific Arduino board? I want to make sure my setup can handle multiple ...
0
votes
1answer
75 views

Help decrypting AES string from arduino rf module in python

Please excuse any glaring errors in my code, I'm new to both C and python. I'm trying to send an encrypted message from my arduino uno via a DHT22 sensor and an rf module using the radiohead ask and ...
1
vote
0answers
33 views

MPU6050 Acc and Gyro readings swapped

I have been trying to figure out this MPU6050 for a bit but the RAW readings are confusing me. It seems to me that the accelerometer readings and the gyro readings are getting swapped... and I don't ...
0
votes
0answers
32 views

Serial communication problem NodeMCU

this is my first post here. Before I ask you my problem, I'm sorry if I'm wrong to write but my English is bad. So, my problem is this: I'm developing a "client-server" system with serial ...
0
votes
1answer
48 views

Arduino Python to Serial command [duplicate]

I am trying to send commands via serial from Python to Arduino with the code below. If I save this code in a dedicated python file "Stepper.py" (Python2.7 on Mac OSX) , the code runs successfully ...
0
votes
0answers
139 views

nRF24L01 communication with Arduino as transmitter and Raspberry Pi as receiver

here are the codes and i don't know why it does not communicate. The arduino should send some example data and the raspberry pi should simply receive the data. Transmitter code (Arduino) #include "...
0
votes
0answers
331 views

Arduino Modbus - Rtu slave with Raspberry pi using MAX-485

I am trying to use Arduino as Modbus- RTU slave and Raspberry Pi as a Modbus master I have interfaced Max485 (RS485 to TTL converter) with Arduino and Rs485 to USB converter in Raspberry Pi, Initially,...
2
votes
1answer
570 views

Problem sending string with Python to Arduino through serial port

I want to send string 50 to Arduino through serial port, the Arduino UNO seems it communicates with port COM25 but it doesnt receive the string properly: import serial # if you have not already done ...
0
votes
1answer
312 views

How to send an integer through pyserial with Python to an Arduino and get back the same result?

There has been similar questions all over the internet but none of them seem to answer my question, so can anybody tell me what is wrong with this code and how I can fix it? Python code: import ...
0
votes
1answer
54 views

Output set to 'low' when new variable in buffer

I would like to turn on and off the output of two pins on my arduino independently from each other. However, so far all my attempts have failed. My current idea is to save the status (which I chose ...
2
votes
1answer
252 views

How to connect an Elegoo Nano to a Raspberry Pi and program it?

I own an several Elegoo Nanos and a Raspberry Pi. I would like to connect an Elegoo Nano to the Pi and upload nanpy onto the board and control it's GPIO pins. I have plugged the nano into the Pi and ...
0
votes
1answer
978 views

Serial communication between python and arduino

I am working on object tracking robot. I am using python and OpenCV to detect the object and send the proper data to the arduino that controls two servo motors. The data which should be sent to the ...
-1
votes
1answer
55 views

Arduino Yun can no longer send to Dropbox

A long time ago I had set up an Arduino Yun to send files to Dropbox... I tried now and it ends in "killed" when trying to install the latest Dropbox Python module. pip install (six, urllib3, etc etc)...
0
votes
1answer
143 views

RGB LED strip controlled through PySerial only somewhat functional

I am trying to set up an LED-strip of 30 RGB LEDs (model WS2801). The strip is connected to an Arduino Uno and an external power supply and the goal is to send colors to the arduino using PySerial ...
0
votes
1answer
70 views

Can't display the two float values correctly from pyserial on Arduino's LCD

I transported two float values with pyserial to COM3 and Arduino accepted the values. But it displayed the first value correctly on LCD, the second value can't be read and showed "nan" on LCD. ...
-1
votes
1answer
35 views

Arduino and Pyton Serial Communication, Pyton get stuck and keeps sending [closed]

I have recebntly started a project where I need to connect an arduino and another device through serial. And I have setup a simple serial connection betwee python and arduino. I can setup the ...
-1
votes
1answer
55 views

How do I get LEDs to turn on according to a continuous Python input?

I'm trying to make a tuner. 3 LEDs are connected to the Arduino board, each one corresponding to one situation (too high, low or correct). Python handles the detecting of a note according to the mic ...
1
vote
2answers
562 views

Arduino and Python

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.
0
votes
0answers
314 views

Receive data on esp 01

I have um esp 01 on port 2 and 3 from my Arduino, I can send several characters, but I cannot to receive many characters, my code is this: #include <SoftwareSerial.h> //TX RX SoftwareSerial ...
-1
votes
1answer
70 views

Run python in Windows OS installed in micro SD card which is read by Arduino microcontroller board

I have a python code which runs in my computer with Windows operating system. The code reads some images as input, extends some cognitive services apis from Microsoft azure and finally give an audio ...
0
votes
1answer
807 views

Is there a way to send data from Tensorflow to Arduino via Bluetooth?

I am not sure if such a question is accepted here. If not please direct me to a more suitable Exchange. I am planning a small project involving Machine Learning using TensorFlow and Python, which ...
1
vote
1answer
100 views

How to work with analog readings using RPi and Firmata?

For context: I'm working on a whose goal is to sense the environment. This process is done using an Arduino Uno and an RPi. The easiest way that I found to perform communication between both boards is ...
0
votes
1answer
104 views

Lag in fetching serial data from Arduino

I am working on a project based on Arduino and python3.6,two HC-SR04 sense the distance of palms and process the data using Arduino and send it through serial port to python3.6 ,python3.6 with the ...
0
votes
2answers
588 views

Reading serial.print data with unknown characters python [closed]

I've got some simple python code working to read the serial.print data that is being sent from my Arduino Uno. It seems to be receiving the values correctly and printing them fine, however it is not ...
1
vote
2answers
1k views

Sending Float values from Python to Arduino via serial communication

I want to Control the current flowing through a circuit using an Arduino. I have trained a PID controller for this purpose. I am using a current sensor to determine the error. It runs successful on my ...
0
votes
2answers
2k views

easy_install pip on Arduino Yun fails

I want to install pip on the Yún which is running Linino OS but every time I execute the standard steps for opkg i.e. # opkg update # opkg install distribute # okpg install python-openssl # ...
0
votes
2answers
625 views

Communication with socketserver fails after specific number of packets

I'm trying to implement a full-duplex communication between my ESP8266 and a socketserver running on my laptop. In concrete I need each of the devices to initiate communication whenever it needs to. ...
0
votes
3answers
2k views

ESP8266 and Python Communication

I'm new to networking and working with ESP8266. I have successfully setup my ESP8266 and can program it from Arduino IDE (tested a blinky code). I want to send some data from a Python script running ...
2
votes
1answer
6k views

Arduino Serial Communication with Python: sending an array

I am a bit new to both Arduino and Python. My aim is to send commands to Arduino to run a stepper motor. I need to send an array containing the parameters. After consulting many earlier posts like: ...
-3
votes
1answer
61 views

Can arduino nano board support bluetooth earphone and python for sound function? [closed]

sorry for disturb, i new and no basic on arduino language and board. Now i have a project on my hand, and with this arduino nano board, i have a ultrasonic sensor that will detect object, is it ...
1
vote
1answer
459 views

How to send data from an Arduino GPRS module to a Django application hosted on Heroku?

I have a Django web application hosted on a Heroku server. Currently I am using the free package for hosting. I want to send data from an Arduino using a SIM900L GPRS module to the web application. I ...
-1
votes
2answers
172 views

Cannot mount NodeMCU with MicroPython on Mac OS X

I've recently bought a NodeMCU board and flashed MicroPython in it. I've read about the boot.py and main.py scripts, but I can't understand how to access them... I have succesfully connected to the ...
0
votes
2answers
1k views

How to send a number to Arduino via Python over serial?

I call an API in Python and it gives as output as a single digit and an Arduino program receives this number over serial and displays it on a 7-segment display. I wrote a different program in which ...
2
votes
1answer
2k views

Python - Arduino communication not reliable

I'm trying to establish basic communication between python and my arduino due. I have managed to get a message sent to the arduino and sent back, but the code that achieves this task does not give ...
1
vote
2answers
242 views

serial data gets spoiled

I use this small program on my Raspberry Pi to recieve a string sent by my arduino. import time import serial ser = serial.Serial('/dev/ttyACM0', 9600) def check_for_command(): bytestoread = ...
0
votes
1answer
579 views

Fastest way to read an array of numbers from python

I'm trying to send an array of numbers from python to Arduino over the serial connection. I can reliably read a small incoming set of numbers (for example 123435678) from python, which I can then ...
1
vote
1answer
4k views

What is the difference between python and arduino programming? [closed]

I am a Python programmer and want to learn Arduino programming so want to know what are the main differences between Python and Arduino C++ programming? Is Arduino C++ more complex than Python ...
1
vote
1answer
178 views

ESP8266 problem with recieved data trasmission via TCP

I am having small project where I want to read couple of analog inputs from Arduino UNO, send it via software serial to ESP8266-01 and from that to python server using TCP. Data is sent to ESP using ...
1
vote
1answer
436 views

Is it possible to connect NRF24L01 to localhost in laptop without wifi router?

I want to send data from arduino to my localhost port:8080(with ipython notebook) via modul NRF24L01 without WiFi router. Is it possible? If it possible, how to do that? Thank you...
0
votes
1answer
80 views

Communication between Arduino and raspberry Pi

So I am working on a ground surveillance robot using Arduino for coding the Gps, motors and ultrasonic sensors and coding in raspberry Pi for facial recognition but now what I want to do is when my ...
2
votes
3answers
2k views

Serial Comm. timing issue between Arduino and Pyserial

This is my first post to Stack Exchange so please forgive any formatting errors. I am conducting an experiment that has 7 total sensors: 5 thermocouples, 2 humidity sensors and 1 pressure sensor. I ...
3
votes
1answer
447 views

Controlling I2C slave on Arduino with Python

Typically, when I connect my Arduino to a slave device through I2C or SPI, I'll control the slave using instructions coded in the firmware. The output data will be then printed to the Serial port and ...
0
votes
1answer
645 views

serial.write if condition

I am trying to do a simple serial communication control via sending a char and using it as an if condition, the arduino part is below char incomingchar; void setup() { Serial.begin(9600); // ...
1
vote
0answers
3k views

Run Servo when detect object on OpenCV Python

I want to connect OpenCV (Python) with arduino Uno when it detects a tennis ball. OpenCV code: import numpy as np import cv2 import serial face_cascade = cv2.CascadeClassifier('tennisballdetect.xml')...
1
vote
0answers
81 views

How do I free up space on arduino Yun shield?

I recently bought arduino Yun shield, and I didnt had any external USB storage connected, I downloaded get-pip.py on Yun using wget and ran python get-pip.py which resulted in 5mb storage on yun now ...
2
votes
1answer
112 views

Initially my Arduino executes a series of PWM signals simultaneously, but after some iterations it adds around a second between PWM executions

I am using 2 adafruit PWM servo shield in order to generate 25 PWM signals. In particular I am using this shield: https://www.adafruit.com/products/1411 A python script sends the commands to the ...
1
vote
1answer
77 views

Running Multiple Languages on Arduino

This is mostly a conceptual question. Is it possible to have two scripts running on an Arduino, where one is a Julia script, and one is a Python script or something like that?
0
votes
1answer
304 views

Stop time in Tkinter Stopwatch with a PushButton

So, my main goal is to make a stopwatch with Tkinter, in which time is stoppped with an external pushbutton My void loop function in Arduino Uno is void loop() { if(digitalRead(BUTTON) == HIGH){ ...