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
1answer
64 views
Arduino-Pyserial communication on python3, windows machine: Pyserial.write() doesn't seem to do anything
I've recently gotten my hands on an Arduino (Or rather a Genuino, but the overall architecture should be the same) UNO. I'm now using that Arduino to test how data is transmitted from an USB to Serial ...
0
votes
3answers
36 views
Installing Pyserial
I will be running my CNC Via Arduino UNO R3, so i have found out that it runs on GRBL and that i need to load Python and Pyserial and a graphic interface.
Loaded Python 3.5.2, no problems, opened dos ...
1
vote
1answer
52 views
Bidirectional communication between Arduino and Raspberry Pi over USB possible?
Is it possible to have bidirectional communication betweeen an Arduino Uno Rev 3 and a Raspberry Pi Modell B+ running Rasbian? They're connected ofer USB, and it would be good if I could use Python on ...
-1
votes
1answer
53 views
Programming Arduino With Python [duplicate]
Im a beginner working with arduino.
Im little familliar with java syn and its not hard for me to do the work with ide ;but i know python better....is there any Lib that let you program Arduino with ...
1
vote
0answers
35 views
Arduino receiving values over serial, but not responding
Now this is gonna make me cry.
Yesterday night, my python script was working perfectly fine, while sending values over serial comm to my Arduino UNO. I have added the 10 microFarad capacitor between ...
0
votes
0answers
24 views
Arduino UNO suddenly stops responding
I wrote this simple script to control a servo over serial comm -
#include <Servo.h>
Servo steeringServo;
char data = ' ';
void setup() {
steeringServo.attach(9);
Serial.begin(115200);
}
...
0
votes
1answer
46 views
Unusual behaviour over serial communication
I am sending data over serial connection from a python script to my Arduino UNO. Now initially whenever I tried to send data to the arduino, it would reset. The fix was to put a 10 microFarad ...
0
votes
0answers
25 views
Python to Arduino Interface Strange Error
I am using the Arduino Uno for my science fair project. The Uno is my Dataq device, and Python analyzes it. I built a simple interface using pyserial and it works. The only issue is that with nothing ...
0
votes
3answers
30 views
Sketch behaves differently when motor driver is added
I have written a simple sketch that takes values via serial communication through a Python script.
Here's the code-
#define LEDPin 13
void setup() {
Serial.begin(9600);
pinMode(LEDPin, OUTPUT);
...
0
votes
1answer
38 views
How to communicate from Python to Arduino Softserial
That is driving me nuts so I need your help.
Master : PC with Ubuntu, a USB to serial converter (chipset CP2102), connected to Arduino Uno Pin 10, 11 and GND. The Arduino Uno is plugged in the same ...
0
votes
0answers
25 views
Serial available doesn't work right after upload
I have 2 programs to test serial communication, an simple arduino program that echoes whatever is on the serial port and a python program that writes to the serial port and prints the reply.
I'm ...
0
votes
1answer
53 views
Does serial communication between PC and Arduino has to be in a loop?
I am trying to send a few variables from my python script to my Arduino. I am using pySerial. I am able to send the variables to the Arduino, but my Arduino sketch runs only for a second and then ...
0
votes
2answers
96 views
Getting Firmata to control WS2801 LEDs
I am trying to control a strip of WS2801 LEDs through an arduino uno running firmata from Python on my laptop.
I've written some basic code based on adafruit's library here (from line 187):
from ...
0
votes
0answers
80 views
Serial Communication between Arduino and Python
I am trying to establish a communication between Arduino and Python. I want to write int values as bytes from arduino and read them in Python but i need some help to do that.
Here is my Arduino code:
...
0
votes
0answers
56 views
Arduino Serial Monitor works but not on PySerial and PuTTY
I made simple custom arduino board using an atmega328p and the PL2303 serial to USB chip.
In my arduino program, I am in a loop that sends out a string continuously. I can read this in the Arduino ...
0
votes
0answers
30 views
Sync arduino-python transmision
I'm communicating two Arduinos with RF modules.
One of them is:
controlling a process
measuring an analog input
sending the measurement to the second Arduino
The second Arduino is connected to a ...
0
votes
1answer
122 views
Send a file from PC to Arduino using HC-06 module
I want to send a file from my Laptop using its own Bluetooth transmitter to Arduino. Arduino has HC-06 module as receiver.Arduino has SD Card fore store the file.
I was able to send bytes using Python ...
1
vote
2answers
118 views
SDS011 Dust Sensor Checksum Error
I'm working with an SDS011 particular sensor through its serial interface. The spec sheet (http://inovafitness.com/upload/file/20150311/14261262164716.pdf) indicates that the second to last byte of a ...
0
votes
1answer
93 views
Arduino Yun Python ImportError: No Module named mime.multipart
So, I have an Arduino Yun, and I'm trying to send an email with python. I have this code that I got from https://github.com/amicojeko/YouCantTouchThis
But when I try to call the file with $python ...
0
votes
1answer
79 views
How can I control neopixels attached to a Digispark?
I want to use a string of Neopixels attached to a Digispark hanging off of a RasPi3 as indicators for various situations. For example: a motor (connected to a driver hat on the I2C bus of the RasPi) ...
0
votes
1answer
81 views
serial communication dead slow after a while
I'm workin on a node for blender to control an arduino. I notice it goes really slow after a while so I isolated the problem.
It is good in maintaining 60 frames a second, then after around 40 seconds ...
1
vote
0answers
97 views
Send Newline / Carriage return with python
With the Serial Monitor I have the Newline option:
How can I send the same using python?
I tried:
30\r\n
30\r
30\n
import serial
ser = serial.Serial('COM3', 115200)
while True:
...
1
vote
0answers
234 views
How to read data from arduino with raspberry pi via I2C
I have connected Raspberry pi 2 model B with arduino uno via Bi-Directional Level shifter, from this BLOG
Raspberry pi GND ---------- GND Arduino
3.3v ---------- 5v
...
0
votes
2answers
55 views
Script on pc only gets 640 characters via serial
I experience that if the Arduino (Teensy 3.2) writes a rather long stream of characters to serial, the python script on the other end only receives the first 640 characters. I have found this result ...
1
vote
1answer
179 views
Unpacking arduino binary data on a python sketch
as a follow up to my earlier post Simultaneously reading data from multiple serial ports, I am stuck trying to develop a python sketch that can read the incoming serial data from the com port on my ...
1
vote
0answers
67 views
BLE Python with GUI on OSX
Has anyone connected BLE devices with Python + GUI on OSX? I've looked into a few libraries (most are old), but one that has the most success if Adafruit's BlueFruit library. However, this library ...
0
votes
3answers
61 views
Led issue with arduino controled by raspberry pi/python
I'm having an issue with my project. My project is 8 leds and a potentiometer on an arduino being read and controlled by a raspberry pi running python.
when I'm using a potentiometer the signal is ...
1
vote
1answer
74 views
How do I go about building a backend for my Arduino device? [closed]
I am new to Arduino, but I am putting together a project in which the Arduino Uno has multiple sensors (temperature, humidity, etc) collecting data. Right now all it is currently going to do is get ...
0
votes
1answer
189 views
Python PySerial with Arduino fails byte check
I'm struggling with my first steps with Python and PySerial. I have one Arduino which reads impulses from an electricity power meter, passes the counts over to another Arduino over an RF link and then ...
1
vote
1answer
71 views
Does WiFiClient work on a Yún to send data over a certain IP and port to be received by a Python socket?
I haven't been able to get the example code from the page WiFi:Client:connect() to work on my Arduino Yún. Is this not how I'm supposed to send data over WiFi to be read by something like a socket?
...
2
votes
3answers
204 views
Share data between the two processors of the Arduino Yun
The linux processor runs a Python script from which I would like to send an array of integers to the Yun microprocessor. How can I do that?
And then, how can I retrieve and then use this array in my ...
5
votes
0answers
378 views
Update Dynamically Tkinter Widget Scale from Arduino Ports using python and firmata
I'm having trouble trying to get Arduino digital ports values and set these values into a Python Tkinter Widget Scale.
I'm using Python and Arduino with Firmata. I'm able to access my arduino board ...
2
votes
1answer
177 views
How to make data sent by Python (via serial connection) wait for Arduino to finish current task?
I am trying to make my Arduino micro-controller and my Mac talk together, and I have created a functional serial connection. My computer is sending data to my Arduino, and my Arduino is sending a 1 ...
1
vote
2answers
175 views
Python script to toggle LED's
I have 8 LED's connected to a shift register on my arduino uno r3. I am trying to write a Python3 script that will prompt a user to select one of the LED's and then prompt to toggle on or off.
Should ...
1
vote
1answer
1k views
Graph plotting on Python using Tkinter Canvas
I'm trying to plot a graph with python using the canvas widget, I'm currently sending data in from an arduino sensor sketch ..does anyone have an idea on how I can plot this graph in real time on ...
-1
votes
3answers
2k views
Plotting a real time graph of sensor data from Arduino on Processing, MatLab or Python
I have an accelerometer connected to my Arduino Due to spit out data on my serial monitor as described in my earlier post. I'm trying to find a sketch I could use to plot a continuous real-time graph ...
-1
votes
1answer
251 views
Advanced Line Follower robot
I know about line follower mainly the grid solving robots i know the basics actually. Actually they have to trace the path of the grid in an arena and then reach back to starting point in a shortest ...
-1
votes
1answer
595 views
pySerial and serial.serialutil.SerialException: device reports readiness to read but returned no data (device disconnected?)
I'm having some trouble getting my arduino uno to communicate with a simple python script through pyserial.
Lets start with my arduino sketch:
void setup() {
Serial.begin(9600);
}
byte i = 0;
...
0
votes
0answers
49 views
unable to send text from Python to Arduino correctly
The easiest options after some digging seemed to be using Python and PySerial.
I want my Python program running on the PC send string "1" to Arduino and Arduino to properly read it and do something.
...
-1
votes
1answer
2k views
Serial.readString() - how does it work exactly?
Someone posted a solution for a problem I had which used Serial.read() .Why doesn't readString() seem to work though? From the docs it seems it reads the data as a String object which would make ...
0
votes
1answer
884 views
Pyserial serial.write() doesn't work
I need to communicate with an Arduino. Doing serial.readline() to read what Arduino has to say works fine. Doing serial.write('something') doesn't seem to do anything.
What is interesting is that if ...
0
votes
1answer
124 views
make Arduino tell when the Python program stops reading from the Serial (crash, etc)
Here's the Arduino code:
void setup() {
Serial.begin(9600);
pinMode(7, INPUT_PULLUP);
}
void loop() {
int val = digitalRead(7);
if (val == HIGH) {
Serial.print("1");
} else {...
0
votes
1answer
518 views
arduino due-Python interfacing for high speed data rate
Four our project, I want to send data mesured by an Arduino due to a computer via Pyton very vast. So I tried to make a simple benchmark by sending 10240 int datas to determine the time it take. In ...
0
votes
2answers
308 views
Send numbers to arduino via serial port using python
I have a file with numbers called fginputs.txt. For example it could be something like this:
4958
4154
4154
4154
4154
4154
4154
4154
4154
4154
4154
4154
4154
4154
4154
4154
4154
4958
I want python ...
-1
votes
1answer
164 views
Pyserial and Arduino
I am trying to send an integer value from Python to Arduino. The integer value is a position given by a webcam, which will determine how many turns a stepper motor moves.
Arduino:
#include <...
1
vote
1answer
1k views
Handle reading timing in Python using pySerial
I'm not sure about how to properly handle timing readings from serial inside a Python script. I need to read a value every 5 seconds.
From Arduino I could do,
Serial.println(value);
delay(5000); // ...
0
votes
1answer
44 views
Transmitting sketches to Yun with Autobahn - a byte at a time?
I am using this tutorial to connect an Arduino Yun with a browser using Autobahn.
In the python file in the above repo, there is this code:
def controlLed(self, turnOn):
if turnOn:
...
0
votes
2answers
2k views
Can't communicate with arduino using python (Windows)
I am new to programming and am trying to communicate with my arduino using python through serial communication. I am using the following code:
Arduino code:
int ledPin = 11;
void setup() {
Serial....
1
vote
2answers
2k views
Send multiple int values from Python to Arduino using pySerial
I'm trying to send 3 ints in the range of 0-180 from Python to the Arduino Uno device using pySerial (py3K). I have managed to send 1 int by using python's struct lib (not sure if it's the best or ...
1
vote
0answers
118 views
Servo position initiaition using PySerial unexpected results
Hi I'm using Brian Wendt's code for setting up my Arduino Nano with 4 servos using PySerial which works perfectly.
So my next step was to get a nice GUI with sliders to position the servos, again no ...