Tagged Questions
0
votes
0answers
12 views
Python communication between Arduino and RaspberryPi
I developed a tiny webserver on Python. Its aim is to translate an URL's parameters (such as http://192.168.0.17:6066/?rly=7&status=1&port=ttyUSB0) in an command (here RLY71) and write it on a ...
0
votes
1answer
14 views
Serial communication in python causing higher CPU usage over time
I have a script that utilizes OpenCV to track an object and communicate the location to an arduino. Essentially all it's doing is passing an integer to the arduino and the arduino interprets the ...
0
votes
1answer
19 views
Issues with Bluetooth and Arduino
I'm trying to send information from a computer to an Arduino with Bluetooth. I'm using Python for Bluetooth, with the pybluez library, working on Windows.
import bluetooth
target_name = "HC-05"
...
0
votes
1answer
49 views
Arduino Serial.write() Missing Data
I'm reading data from Serial2 and writing data to Serial3 on Arduino like this:
Serial3.write(Serial2.read());
I am writing a concatenated string from Python that looks like this:
myNum = ...
0
votes
1answer
42 views
Send String Over Bluetooth to Android Device on Arduino
I'm sending strings over Bluetooth to an Android device.
I have an Arduino board with a Synapse SNAP RF100 module and a RN42 Bluetooth module connected to serial ports.
The data is read from the ...
0
votes
1answer
31 views
How can i use the values of serial.readline() function in python
import serial
ser=serial.Serial('/dev/ttyACMO',9600)
while 1:
ser.readline()
I am getting output of my sensors on python like
X=316 O=418
can you help me to use these values 316 and 418?
1
vote
0answers
17 views
Sending data from Arduino to Blender in python: the data is never received
I am currently playing with Arduino and I am trying to get simple data to be continuously sent from Arduino to Blender. The problem is in my Blender program, the data is never received.
This is my ...
0
votes
1answer
26 views
Error with sending Ints/Strings from Python via PySerial
this is my first post on this forum so hello all :)
I'm trying to build a CPU Monitor with Python and Arduino,
While Arduino works fine im having problems with Python.
My Problem is that I cant get ...
2
votes
1answer
31 views
How to stop interference between xbee packets
I have 4 arduino modules that have temperature,humidity and co2. They send this data as a single line through xbee. The raspberry pi reads these lines through xbee. Here is the output I get at the ...
0
votes
0answers
17 views
Manipulating Image Over Serial in SimpleCV
I'm trying to manipulate an image in SimpleCV based on analog pressure sensor reading from Arduino via serial.
Can't get the values to come through, even though Arduino IDE serial monitor confirms ...
0
votes
2answers
109 views
Sending Arduno Yun pin information via serial1 to linino python script, over UDP to Max
Now trying to get my arduino sketch to be sent through the python script. I can't get it to send over.
Arduino code.
/* Sketch for reading 4 analogue inputs for glove
*/
// Setup pin locations
...
0
votes
1answer
60 views
Reading serial data from arduino — invalid syntax error
I'm trying to write a python script to read values from the arduino's serial port and write it to a file so I can log the data.
The arduino code is long and complicated, but I'm using ...
0
votes
1answer
48 views
Plotting Serial data in Python how to pause matplotlib figure?
Basically I want to pause the live plot that I have setup here:
import serial
import numpy as np
from matplotlib import pyplot as plt
ser = serial.Serial('/dev/tty.usbmodemfa131', 9600)
#Setting up ...
1
vote
1answer
44 views
Tkinter/Python and Arduino
I have a simple project that takes the serial reading from my potentiometer and Arduino. After I get the reading that is converted and is supposed to change the color of a blank window.
For some ...
0
votes
0answers
78 views
Write Timeout Error on second serial.write using pyserial and Arduino
I'm using Windows 7, python 2.7.6, and pyserial 2.7, and talking to multiple Teensy 3.0 boards on different COM Ports.
First I send a query to the Teensy asking for its model and serial number, but ...
0
votes
0answers
41 views
Pyserial readline() shows mix up of bits
I am very new to Arduino and Python. I'm working on the communication between an Arduino Uno and my laptop using Pyserial. The Python script in my laptop is called by an H3D Viewer, which is linked to ...
0
votes
1answer
51 views
Python pyserial slow and crashes after given period of time
When I use Python’s pyserial to obtain voltage and time information from an Arduino, the Python with Pyserial appears to be slow. When I look in the Arduino serial monitor, everything is fine, the ...
2
votes
1answer
79 views
Method to automate Arduino Yun WiFi Login to Captive Portal with python or other?
What is the simplest path toward automating a WiFi login from an Arduino Yun (Yún) to a "Captive Portal" authenticated login method. I would like to stay in python, if that is the most appropriate.
...
0
votes
0answers
18 views
wrong characters recieved - python + arduino + android
I'm running tornado web server on my raspberry pi. this server gets command from android phone and send it to arduino over serial. the Handler class code is :
import tornado.web
import serial
...
1
vote
1answer
30 views
Redetect Arduino board in Python program
For my program, I need to detect an Arduino board once it has been disconnected then reconnected, during the run of my program. I have perfectly detected the disconnection, but when reconnect the ...
0
votes
1answer
141 views
Using I2C to read value from analog pin on arduino and sending it to raspberry pi. It returns weird numbers like 122 or 255
SETUP:
MASTER DEVICE: Raspberry Pi Model B REV_2
SLAVE DEVICE: Arduino Uno REV_3
PROBLEM:
Whenever I enter "r" into the command line it returns a number that is completely off what it should be. ...
1
vote
0answers
362 views
Writing and saving python script to arduino yun RAM
I'm trying to save a python script to the onboard linino RAM, but I can't quite get it to work. Am I writing the python script file correctly? Can anyone view my code and tell me where I'm erring?
I ...
0
votes
1answer
40 views
Python: Testing Serial Ports for Answer
I'm trying to build a short code that will test all Serial COM ports (I'm on windows) for reply. For example, I have a Arduino connected on COM3, and when it connects, it sends a serial message.
I ...
0
votes
0answers
41 views
Using RFID to Launch a webpage
What I'm trying to do..... is to use an RFID tag to launch/open a webpage.
I'm utilizing:
Parallax RFID Read/Write Module
- Arduino Yun
- Python
- Mac (:()
Found something similar here:
...
2
votes
1answer
109 views
Identifying the Data transferred from XBee when using Python and python-xbee
A Xbee Series 2 in Router AT configuration with a potentiometer wiper output connected to XBee's pin 20 AD0 is supposed to send the analog data every 100 ms. It was set with ATD02 and ATIR64.
A Xbee ...
1
vote
0answers
211 views
Sending serial communication from Raspberry pi
I am sending serial data from a Raspberry Pi to an Arduino using a Python program. I am running Python 2.7.3. The program is:
import serial
ser = serial.Serial('/dev/ttyACM0', 115200)
...
0
votes
1answer
66 views
Ignoring certain data from the serial port using PySerial and Arduino for ECG
I am using the PySerial module with the Arduino Uno. I have with the help of fellow stackoverflow users been able to generate a plot of time against ECG value (in volts). However, there is a problem.
...
0
votes
0answers
51 views
Sending serial data to Arduino using Python
I am using a Python program on a Raspberry Pi to send serial data to an Arduino. The code below should send an "L", a 255, and an "F", but I think I have the wrong formatting to do that.
import ...
0
votes
1answer
54 views
How does PySerial work?
Say I have the following python script to read in serial data from my Arduino:
import serial
ser = serial.Serial("dev/ttyACM1", 9600)
ser.timeout = 2
ser.readlines()
On the other end I've flashed ...
1
vote
1answer
138 views
arduino yun uhttpd flask setup
I'm trying to set up python and flask on the arduino yun. I've managed to run python files via the /etc/config/uhttpd configuration file:
...
list interpreter ".py=/usr/bin/python"
...
The ...
0
votes
1answer
64 views
arduino serial and pySerial
I am playing with arduino. Inside the projects book it has a project for getting the temperature from a temperature sensor. I hooked as it says and wrote the following simple code
const int sensorPin ...
1
vote
1answer
147 views
Using Pyserial to plot time against voltage from an Arduino Serial Port
As titled I am using an Arduino that outputs data along the serial port. It outputs as such:
120 1.23
170 2.54
210 2.32
The left column is time in milliseconds and the right column is a voltage ...
2
votes
0answers
135 views
Python equivalent for byte array transfer from Java (Processing) to C (ardunio) over USBserial
As my first foray into programming with python (previous exp only with vba and very basic java), I am trying to replicate some functionality of a GUI application, osPID Frontend, written in ...
1
vote
1answer
53 views
Serial communication emulation in Windows
I want to emulate an Arduino serial communication in Windows. I wrote this pySerial script to represent the connection:
from serial import Serial
from time import sleep
serial_conn = Serial(<some ...
0
votes
0answers
100 views
Logging data from Arduino using PySerial
I've written a script to log data from my Arduino to a csv file. The script works well enough but it's very, very slow. I'm quite new to Python and I just wanted to put this out there to see if any ...
0
votes
1answer
85 views
Arduino enc28j60 tcp stack
I want a connection between my arduino and my pc. I've a enc28j60 connected to the arduino. I would like to use tcp packages but I can't find any example code or something. Can someone help me with ...
0
votes
1answer
64 views
pySerial not working when stand alone
Well, I'm trying to get a Python script to communicate with an Arduino Uno. Basically the issue is the same as this, where the solution was to add a time.sleep(xx) (didn't work to me).
I've tried ...
0
votes
1answer
40 views
opencv2 capture using retrieve() does not work but read() works
I am using opencv2. I am able to capture frames from my web cam using cap.read() but not with cap.retrieve(). I like retrieve() because it does not block so my frame speed is faster. My retrieve() ...
0
votes
2answers
120 views
Have an Arduino read a string (sent via Python), move a Motor accordingly to input, then receive the next string
I am working on a Rubiks Cube Solver, which uses an Arduino and motors to move each face around. The Python script I use writes a move per line, then is meant to the first line, then the second line, ...
1
vote
2answers
315 views
Wait on Arduino auto-reset using pySerial
I'm trying to read lines from an Arduino board with a very simple code (for the sake of showcasing the problem) on Linux.
Python code:
# arduino.py
import serial
arduino = ...
0
votes
3answers
174 views
How to check if device is connected Pyserial
I am connecting with my Arduino through a USB port and sending data to it by using PySerial module. At first I can check if the device is connected by using this code:
try:
ser = ...
0
votes
1answer
467 views
Storing data from arduino in mysql using python on raspberrypi
I have referred the code from this link:http://www.daviom.com/tutorial/tutorial-store-arduino-data-with-raspberry-pi-to-mysql/
The arduino code is working correctly however the python code executes by ...
0
votes
0answers
134 views
Realtime serial read in Python from Arduino
I am reading in serial information from an Arduino using Python every 5 ms. The serial data being sent by the Arduino includes integers that form parabolas. For example, a sample data set could be as ...
0
votes
1answer
690 views
Storing string from arduino to text file using python
I am using this code to send a string from arduino to PC
int i=0;
void setup(){
Serial.begin(9600); // Open serial connection at a baud rate of 9600
pinMode(13, OUTPUT); //set pin13 in o/p ...
0
votes
2answers
202 views
Python serial error
I'm trying to get Python to read connect to an Arduino Uno on Serial port 3 so that would be COM3 in the python code. I am using Python33, The latest version on Arduino and pySerial 2.7. This is the ...
2
votes
2answers
83 views
overwriting text file in python
I am using this code to read values from a serial port and writing it to a text file
import serial
ser = serial.Serial("/dev/ttyUSB0", 9600)
text_file = open("output.txt", 'w')
while ...
0
votes
0answers
175 views
Show serial data from arduino in plot and in display
I am a Newbie to this, so please excuse my ignorance.
I am trying to make a simple gui which continously updates a plot of serial data from my arduino Uno, and the same time it should display the most ...
0
votes
1answer
157 views
How to update values from serial port in matplotlib animations?
I've been trying to plot serial data from an arduino in real-time using matplotlib's animation function. The data comes from a ntc temperature sensor. The plot I was able to get displays a sigle line ...
0
votes
1answer
74 views
python code inconsistent indentation
I have been working on a project which is getting the data from a temperature sensor that is connected to the arduino. I need to get that data to my raspberry pi and display it online. so I wrote ...
1
vote
1answer
120 views
reading data from arduino with python
im trying to do something which arduino sends bunch of data frequently, and my objective is:
every 100 data, make a new file. (lets call it a1, a2, ...)
in one generic file, take the average of each ...