Tagged Questions

Python is a programming language that lets you work more quickly and integrate your systems more effectively. You can learn to use Python and see almost immediate gains in productivity and lower maintenance costs.

learn more… | top users | synonyms

0
votes
0answers
5 views

Bluetooth Obex Protocol Header

i work on bluetooth application that send file to near phone on obex protocol . i use pybluez and lightblue module in python my problem is that i don`t know header element ... in lightblue site ...
1
vote
0answers
20 views

Can i setting sampling rate 2k in MCP3008 or python

Can i setting sampling rate 2k in MCP3008 or python. I think to do this a long time but i don't have no idea. please help, thanks.
0
votes
0answers
14 views

PySerial not responding after 10 seconds of inactivity

I've got the JY-MCU Bluetooth module connected to the hardware serial port on my Raspberry Pi. It seems to be working except for one thing: when there is no communication for about 10 seconds or more, ...
0
votes
1answer
44 views

GPIO problems, when run infinitely goes to the right

I'm trying to get a controller to move right, preferably one space, using GPIO. I'm not quite sure what I'm doing wrong but whenever I run the script it moves to the right but it never stops. I don't ...
0
votes
0answers
39 views

Serial data display [on hold]

I am trying to get a project up and running, I'm fairly new to the raspberry pi, but I would like to display serial data that I have retrieved from two communicating xbees. I have been able to ...
0
votes
1answer
38 views

How to measure DC current RPi?

I have recently bought a Raspberry Pi, and I would like to be able to measure the current flowing through the circuit in our Greenpower electric racing car. It would also be useful to record this for ...
0
votes
1answer
56 views

Run a python script from terminal

i'm new to raspi. I try to run a python script from terminal (with typing not autostart when boot) Firstly, i directed the directory to my desired folder with cd /desireddirectory Then i try to run my ...
0
votes
2answers
38 views

I2C receive handler, as seen on I2C for Arduino

When managing smbus/I2C devices using python with the RPi, is there a way to register a handler function so it is called when a byte is available for read, like in Arduino Wire.onReceive()? Otherwise, ...
0
votes
1answer
24 views

Check whether an I2C slave device is ready or not

I'm using an I2C device connected to an RPi. The device only handles receiving one byte (which is then transferred via radio to a similar device on the other end, that acknowledges the reception of ...
0
votes
1answer
48 views

Speech Recognition

I'm making a project that requires the user to control the computer through speech. I've seen a couple of libraries, for python, that can do this but most of the ones that I have seen are windows ...
0
votes
0answers
25 views

Lighttpd + Python FastCGI not cooperating

I have a Flask App on my Raspberry Pi, the structure is /home/pi/microblog/ app db_upgrade.py runp.py app.db flask runp-sqlite.fcgi babel.cfg killpython ...
1
vote
0answers
76 views

Send SMS using Pi

I have a project, and I would like to send SMS message from Pi to my number phone, when I run it the command says: cannot send message: Process exited with a non-zero status I used SMS gateways to ...
0
votes
1answer
23 views

Raspberry Pi and lirc communication

So I've been working with lirc and pylirc and am looking at trying to communicate between 2 PIs using this technology. My question is how fast can I expect communication being if sending a single ...
0
votes
1answer
30 views

pyramid framework on raspberry pi

Before I buy a raspberry pi ( being honest ), I'd like to know if it is possible to run a pyramid python framework from raspberry Pi. If so, then how ? I know LAMP runs on it but at present I am ...
1
vote
1answer
102 views

GUI for Pi - Python or Java

I would like to know whether a Java based (using Pi4j library and Swing) or Python based GUI (using Tkinter) is more suitable for Pi in terms of execution speed. Following things need to be ...
0
votes
1answer
42 views

Fail to print using python-cups: “client-error-document-access-error”

I am trying to Print to USB HP printer through python. I was successfull in printing a text file using Ctrl-P command through gui after setting up CUPS using the WEB method. Now I am trying to print ...
0
votes
1answer
22 views

'var gpio' INVALID SYNTAX in IDLE3, Raspberry Pi

I'm new to Python and Raspberry Pi. I'm trying to drive a stepper motor with the Rpi from this website: http://www.sundh.com/blog/2014/02/control-stepper-motors-with-raspberry-pi-and-node-js/ I find ...
0
votes
0answers
25 views

Get connected(paired) device on bluetooth

Is there anyway in command lines or even python to get the Paired device at the exact moment? I've googled some of them but got nothing... I know there are commands to list all active devices nearby, ...
2
votes
4answers
122 views

GPIO Pin 17 does not trigger RPi.GPIO callback

I'm trying to read from all my Raspberry Pi B+ GPIOs. Using the Python3 RPi.GPIO library, it is quite easy to do, but I've come across a problem that I can't seem to resolve : GPIO 17 does not ...
1
vote
0answers
38 views

Determining position with motion detection - Camera Module

I currently am working on an art project that requires to know the position of a person within 3 columns. I have figured that I can achieve this result by motion detection by comparing one frame ...
0
votes
0answers
23 views

Error while running a Python GUI application using tkinter from command line

While running an python code for GUI from command line (command : sudo python SampleGUI.py), I get this error Traceback (most recent calls last): from tkinter import * ImportError: No module name ...
0
votes
0answers
70 views

Using python with bluetooth to communicate

I'm trying to write a simple program to communicate between the RPi and a bluetooth cellphone. I went with this tutorial: Bluetooth Python tutorial for RPi and was able to connect to the phone and ...
1
vote
1answer
84 views

How to get RPi to generate a triangle wave, then outputting a PWM signal

I want my Raspberry Pi B+ Model to generate a triangle wave and output a PWM signal from one of the GPIO pins, but I'm not sure how to go about doing this. All I want it to do is add some small length ...
0
votes
1answer
20 views

pyspi and file descriptors

Has anyone else noticed that py-spidev seems to leave a file descriptor open? When I run lsof -p 5833 I see that my program has 5 file descriptors open, which seems fine. When I run sudo lsof -p 5833 ...
0
votes
2answers
48 views

sleep() affecting only one certain output

the topic name might seem a bit chaotic, but I'm struggling to describe in one line what I mean. I want to create a python script that plays different sounds when certain button is pressed. So far I ...
1
vote
0answers
34 views

How to display black screen on raspberry pi

I am currently displaying an image on boot and when I press a button I want to show a black screen. My idea is to just load up a second black image in the background with qiv and then switch to it. My ...
0
votes
2answers
83 views

Interfacing with a Winbond W25Q64BV flash chip via SPI

I'm trying to interface with a Winbond W25Q64BV flash chip via SPI. I started off by testing it on Arduino (target is a Raspberry) as I found a few implementations before I got started. Most notably ...
0
votes
0answers
61 views

Not all arguments converted during string formatting Jasper

When I'm starting Jasper, I have a problem: Error Occured! Traceback: File "/home/pi/jasper/jasper.py", line 145, in app = Jasper() File "/home/pi/jasper/jasper.py", line ...
0
votes
0answers
28 views

Piface input pins as output with pifacecommon

I know it is possible to use the input pins on the piface as output pins. (src: https://projects.drogon.net/piface-abuse-using-inputs-as-outputs/) But how is this achieved using the pifacecommon ...
0
votes
0answers
28 views

Difference pifacedigitalio and wiringpi2 piface ouput pins

I would like to use a stepper motor connected to the piface with the wiringpi2 python module. I found some code online for testing stepper motors. import pifacedigitalio as pfio pfio.init() def ...
0
votes
1answer
52 views

Sending i2c commands from arduino to pi

The RPi and arduino are connected by I2C and the arduino sends coordinates to the RPi through the wire library. However, the RPi only receives and prints out 0 when it should print out the coordinate. ...
0
votes
0answers
24 views

Audio playback with Python: xcb_connection_has_error()

I'm a newbie to RasPi and Python, so please forgive me for asking a dump question :) I want to playback a wav file with Python 2.7.3 on my RaspberryPi B+ (model name: ARMv6-compatible processor rev 7 ...
0
votes
1answer
27 views

Installing python packages in the correct version [closed]

I've built python 3.4 from source and installed it. I also installed pip. When I try to install packages with 'pip3 install', it installs to python 3.2. How can I make pip install packages for python ...
-1
votes
2answers
95 views

Good way to start python script at startup with automatic restart if it crashes?

I've edited my rc.local to start my python script when the Pi boots up (like here). How can it be done to restart the script automatically if it crashes? It would be best if a re-start would be ...
0
votes
1answer
44 views

sudo for part of a python script [closed]

I have a program that automatically calls the following script. The script works up to point x but needs root privileges to perform the code from this point on. Can I give the script sudo privileges ...
1
vote
2answers
74 views

USB Modem rebooting problem

I have a python program that sends text message using a USB modem, it works fine.. But sometimes when I reboot my device the program cant find the device, so I need unplug than plug back again to ...
2
votes
1answer
122 views

How do I stop a python script from running via a webpage?

So I have a a webpage that has buttons to run a script that controls a PIR sensor and an LED. How do I stop the script from running using a second button? Button 1 : Run sensor.py Button 2 : Stop ...
0
votes
1answer
177 views

Control dc motor using GPIO.PWM problem

I'm trying to make a small remote controlled car with the raspberry pi and attached two small dc motors to it, using the L239D chip. When testing without the remote control (which is a simple android ...
1
vote
1answer
44 views

Taking a video stream with io.bytesio() and accessing frames during recording time

I've been looking into using picamera and so far ive managed to capture a sequence of images and process them, but found the time it takes between frame captures is horrible(ish), so i turned to using ...
0
votes
1answer
331 views

reading pin state whether it's input or output [RPi.GPIO]

Is it possible to read pin state (1 or 0) whether it's set as output or input without setting this with RPi.GPIO.setup(pin, GPIO.IN/GPIO.OUT)? I mean i can do this via command: gpio read 2 But ...
0
votes
0answers
70 views

Camera doesn't work with GPIO PIR Sensor

I am using a 3 pin PIR Sensor to detect motion (https://www.modmypi.com/pir-motion-sensor). This is connected to the GPIO pins. I also have the RPI Camera module attached to the Camera CSI. I would ...
1
vote
1answer
219 views

How to import Xbee to Python?

I would like to handle my xbee with raspberry pi via Python. I install xbee with this command: pip install xbee And I try to use this example code: #! /usr/bin/python # Import and init an XBee ...
0
votes
0answers
33 views

AUX Input through USB

I purchased this bit of hardware that will let me plug in an AUX cable to a USB. I am thinking that this will work (without drivers?) because I had a USB microphone that worked good. Anyway, I'm ...
1
vote
1answer
201 views

Python serial permission issue

I'm trying to connect my Arduino to my RPi through python and PySerial, and I'm using the following code: import serial ser = serial.Serial('/dev/serial/ttyACM0', 9600) and I was getting an issue ...
0
votes
1answer
57 views

Best way to report all GPIO Interrupts?

So I am trying to figure out the best way of reporting all GPIO pin interrupts. My plan is to capture the high and low interrupts and post that to a URL. I haven't found many resources except for ...
0
votes
0answers
62 views

Python Syntax Error Hello World

I hope this question is not too open for SE. I wanted to make my first steps with this guide I already found out how to run Idle3 via SSH and that print is now a function. So I wrote print("Hello ...
0
votes
1answer
136 views

Running Python script From php that create a thread and then kill it [closed]

I am a python newbie, very interested in raspberry pi and while I was crusading the code I had one idea, tried a lot of ways to make it but with no success. I'm using this python script to get data ...
0
votes
0answers
32 views

Errors out with no explanation when trying to run a blinking light function in python

I have created a python script to press a button and have my light blink but it isn't working when I transported the function to my main script and it errors out with no information so I don't know ...
0
votes
1answer
96 views

site-packages dir empty but OpenCV works…what the?

I used the following to install opencv sudo apt-get install libopencv-dev python-opencv I can "import cv2" fine, read images, manipulate them to my hearts content...everything works great! ...
0
votes
1answer
41 views

How do you make the raspberry pi ask you a question?

I want to make my raspberry pi ask me a question, but not with sound, with text. I learned how to do it a while ago, but I forgot.