Stack Exchange Network

Stack Exchange network consists of 174 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
6 views

ultrasonic sensor on Arduino through the firmata protocol with python [on hold]

In the past few days, I have been working on Python to operate the ultrasonic sensor on Arduino through the firmata protocol. After compiling successfully, the python value is incorrect. This is the ...
1
vote
1answer
59 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
47 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
48 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
129 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
346 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 ...
0
votes
0answers
38 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
81 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
53 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
27 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
52 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 ...
0
votes
0answers
34 views

Pyserial doesn't receive serial data from arduino

I have the following python script: #!/usr/bin/python import serial # import syslog import time #The following line is for serial over GPIO usb_ports = ('COM3') s = serial.Serial(usb_ports) print("...
1
vote
2answers
218 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
173 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
51 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
640 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
73 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
71 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
403 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
755 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
1k 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
355 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
2answers
1k 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
4k 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: ...
0
votes
0answers
120 views

Serial Communication between ATmega328 and Windows PC

Coming from pure software background, I am unable to figure out how to establish serial communication between an ATmega328 and a Windows PC. I have my prototype ready where I have successfully ...
-3
votes
1answer
54 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 ...
0
votes
0answers
225 views

Why is NONE returned from reading Analog input using Firmata?

I am using Arduino Mega for testing out the Firmata protocol (Standard Firmata from examples) using Python. I need to get the values of the analog pin to a variable. But the code is returning NONE. ...
1
vote
1answer
319 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
152 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
137 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
487 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
3k 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 ...
0
votes
0answers
401 views

Arduino Pro Mini and ESP8266 Serial to Wireless and back

Please note that previously, 2x Arduino Uno Wifi Developer Ed units were used ; hence the currrent complicated workaround. 2x Arduino, connected via USB cable to PI, which is running 2x python ...
1
vote
1answer
150 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
379 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
63 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
389 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
521 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
2k 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')...
0
votes
0answers
147 views

Arduino doesn't answer on Python script

I have an Arduino Mega 2560 and I use Python 3.6. When I try to communicate with the Arduino with a Python script, it doesn't answer (the TX LED doesn't blink). But when I communicate over the Python ...
1
vote
0answers
77 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
103 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
75 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
267 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){ ...
0
votes
1answer
713 views

Reading PushButton status with pyserial

I'm trying to read the status of a PushButton with python via pyserial. In the loop function of Arduino Uno I have this: void loop() { if(digitalRead(BUTTON) == HIGH){ Serial.print("E\n"); while(1){...
0
votes
2answers
127 views

Showing chronometer on PC controlling the begining and end of time by Arduino

I'm really new on this Arduino thing, so I don't know whether what I'm gona ask is feasible or not. I'd like to make a chronometer in the computer but the controlling button (beginning and end of ...
2
votes
4answers
190 views

Which Arduino is the most suitable for my project?

I've started to prototype something using an Arduino Mega and Yún Shield. It's simple. It reads an ADC at 50Hz and sends data to a server through a socket. But because of that combination, I need to ...