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

1
vote
2answers
45 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
19 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
27 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 ...
-2
votes
3answers
109 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
63 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
225 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
70 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
45 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
146 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
82 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
106 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 ...
5
votes
2answers
936 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
0answers
140 views

Transfer data between Yun and Sketch in Python

I'd like to have my main programming logic in Python and interface with the Sketch for things such as IO (I have an SPI LCD screen that I'd use to output strings and such, also buttons for control ...
0
votes
3answers
1k 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
202 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
69 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 ...
-1
votes
1answer
154 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
2k 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 ...
4
votes
2answers
1k 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
159 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 ...
6
votes
6answers
5k 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 ...