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.

learn more… | top users | synonyms

0
votes
1answer
8 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
39 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 ...
0
votes
0answers
21 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 ...
0
votes
1answer
85 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
29 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
0answers
30 views

Arduino UNO PWM max to 127

I've been using Python bindings for Arduino for a year, using values for PWM from 0 to 255 with no problem. I had to reflash the Arduino, and know, after hours of research, I discovered that my ...
0
votes
2answers
230 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() { ...
1
vote
2answers
350 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 ...
0
votes
0answers
52 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 ...
0
votes
1answer
51 views

Serial, Numbers sent as Floating Point and Characters are different at 1e-8 level

I have some code that generates random numbers on the Arduino, it then sends these random numbers firstly, using Serial.print(float data,int lenght) and as a floating point number using the following ...
-3
votes
3answers
1k views

Arduino Raspberry Pi USB Communication [closed]

I am trying to connect an Arduino and Raspberry Pi over USB. I would like to send serial commands, just like the serial monitor in the Arduino IDE. I know how to do this on the Arduino end but I'm ...
0
votes
0answers
211 views

Robust communication between Xbee and Python

I am using Xbee API library for Python to process the data received by the Xbee module. I am wondering how to construct the robust protocol for sending and receiving data. What I would like to build ...
0
votes
3answers
360 views

Can I program Arduino with Python? [closed]

I know that I can program Arduino with python but is it possible to make every project, which can be completed by normal IDE?
0
votes
1answer
78 views

Which IDE should I use to write Pythonic-programs for Arduino

I'm doing my first baby-steps to build tools using Arduino. I'd like to know if there is a way to write python scripts to build programs for Arduino. Most of IDEs I found are non-supported IDEs. Is ...
0
votes
0answers
91 views

Reading serial with python — where does the garbage come from?

I'm reading the temperature with my Arduino Due: double Conversion(int RawADC) { double Temp; Temp = RawADC * 3.3 / 1024.0; Temp = (Temp - 0.5)/0.01; return Temp; } int n = 1000; int j = 0; ...
0
votes
1answer
283 views

Sending a floating point number from python to arduino

I am trying to send a floating point number from a python script to an Arduino. I am not sure how to do this, especially in a pythonic way. A little bit of research brought me to this very similar ...
0
votes
1answer
158 views

How would I establish a serial connection with python without using the serial monitor? [duplicate]

How would I establish a serial connection with python without using the serial monitor? What I want to do is give my python script some input and have the arduino do something (blink for example) I ...
0
votes
2answers
153 views

How to send two different sets of int numbers over serial?

So I have a project that require for the main computer to do most of the processing then for it to send the X and Y cords of this processing to the arduino. This at the time didn't seem very hard but ...
6
votes
2answers
2k views

How to send numbers to Arduino UNO via Python 3 and the module serial

I am new to Arduino (and computer programming in general), so I apologize if this question looks silly. Once I set up a basic arduino-LED connection, I have problems sending INTEGERS to arduino ...
0
votes
3answers
2k views

Receiving 2byte int values over serial

I am using Python smbus write_word_data method to send int values from a Raspberry Pi to an arduino. This seems to be the correct method. When I send values from 0-255, I see the following in my ...
1
vote
1answer
291 views

Debugging i2C from Mac OSX desktop

I have a raspberryPi and Arduino connected via i2C. On the RPi I have a python script that takes int values and simply sends them to the RPi, which in turn echoes them back. I am trying to debug this, ...
1
vote
0answers
92 views

i2C and lost connections with IO errors

Having issues troubleshooting IO errors using i2C . Running a Python script on a raspberry Pi as master talking to an Arduino slave. The problem is that when making any change in my code that results ...
0
votes
1answer
215 views

Best way to interact arduino and python

So, i've worked with the pySerial module for python, where I communicated with my arduino via serial. However, this module only works for 32bits and I would like to make my project work on both ...
0
votes
3answers
3k views

Why does serial port stop sending data?

I'm using an Arduino Leonardo to interface with two pressure sensors and Python on my laptop, a MackBook Pro. I'm using arduino IDE V. 1.5.4, Python V. 2.7.6, and OSX 10.8.5. One pressure sensor is ...
5
votes
2answers
2k views

Arduino serial port reset in Serial monitor & Python

So am I using an Arduino with a shield to gain some voltage values for an ECG. I am then plotting that data in Python. However whenever I "observe" the serial port, be that through the Arduino serial ...
1
vote
1answer
214 views

How can I use Python from a sketch?

I'd like to be able to use Python from a sketch. According to the Arduino playground, one can use PySerial from a computer to talk with an Arduino via Python. It looks like from that page you can ...
8
votes
7answers
11k views

Programming an Arduino using Python, rather than C/C++

I am not very skilled with the C Language and I was wondering if there is a way in which python could be used to program an Arduino. This would most likely require a different IDE in order to be able ...