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
10 views

Creating a menu upon startup

I am trying to make a quick menu as soon as i log in(before you use startx). There's a guide here: http://file.allitebooks.com/20150625/Raspberry%20Pi%20Cookbook%20for%20Python%20Programmers.pdf On ...
0
votes
1answer
20 views

RPi.GPIO error: Name error: RPi

When testing my code on my RPi 2 B, I come along a name 'RPI' is not defined error. Can someone please help me to figure out why this is happening? from PIL import Image import os, sys import ...
0
votes
0answers
33 views

My First pet project on Pi [on hold]

Ordered my Pi (1GB variant) and was planning to develop my first project on it. By the time i get my Pi, i was reasearching about the thirdparty libs i may require and how should i go about it. ...
2
votes
0answers
34 views

Alternative to java for an embedded system

Right now I am working on a project that requires sending ascii commands via serial to control a machine (i.e, turning a machine on off, change speed, etc.). The whole thing will be controlled with a ...
-1
votes
1answer
37 views

InsecurePlatformWarning with pip & python 2.7.10 [on hold]

I have compiled python 2.7.10 from source: wget http://www.python.org/ftp/python/2.7.10/Python-2.7.10.tgz tar -zxvf Python-2.7.10.tgz cd Python-2.7.10 make clean ./configure make make install such ...
0
votes
0answers
12 views

Controlling brushless motor with ESC and Raspbery Pi b+

I'm trying to build a quadcopter and I have one ESC, one brushless motor and one Raspberry Pi B+. I find many tutorials on internet to see how to connect these components but it doesn't work. I'm ...
0
votes
0answers
16 views

How to make IO Error: Decoder jpeg go away?

I found a solution here but it seems to only work with python 2.7 and I need it for python 3.4. Also how do I uninstall a library?
0
votes
0answers
10 views

Rasperry PI GPIO/Camera Script doens't work as desired-Python

I'm making a timed Photo/Video function for the raspberry with a button and a few LEDs attached to GPIO. When pressed long the button should call the video function. This and the photo scripts ...
0
votes
0answers
18 views

MPU6050 Python Library

I would like to use my MPU6050 gyro/accelerometer in some projects but I can't find a good library. I would prefer it to be in python but can deal with cpp. I want something to where I can do a simple ...
0
votes
2answers
42 views

boot up rasbian into gui program, no interaction

I have a project I want to do, and I got an spi touch screen(tontec 3.5") for it. I want to start up into some sort of GUI application. I only have roughly 950mb left on my micro sd (8gb, install ...
0
votes
0answers
19 views

Create Hotkey - Play Selected Movie Trailer

Using Kodi for rPi. When highlighting a movie on my drive, I'm able to press "C" to bring up a menu. I can select "Movie information" then "Trailer" and it will stream the movie trailer off YouTube ...
0
votes
0answers
23 views

Recording a wav file using a GPIO Microphone sensor

I have connected an analog sound sensor to my raspberry pi via an Analog-To-Digital-Convertor (MCP3002), a breadboard, and a whole bunch of wires (dupont cables). I have successfully tested the ...
0
votes
1answer
18 views

Pip exception while installing matplotlib on raspberry pi

I am working in a opencv project on the raspberry pi, and im using a virtual environment, but i used pip to install numpy, scipy and other libraries, but when trying to install matplotlib on pip by: ...
1
vote
0answers
13 views

Y value of image obtained using Picamera Python documentation fluctuates wildly

I have been working with picamera python analysis class a bit lately. What I am using is here to get a YUV array, and then perform some simple analysis on it. When I try to isolate the Y page of the ...
0
votes
0answers
19 views

Python Subprocess Error

I am trying to call this command: avconv -i '/opt/music/Smooth Criminal.mp3' -ac 1 -ar 22050 -b 352k -f wav - | /opt/pifm/bin/pifm - 98.3 with my own paths. In the terminal it works like a charm but ...
0
votes
5answers
56 views

Python run script in new console on startup [duplicate]

I try to start a python program (for accessing the camera, but that is irrelevant) every time the raspberry pi boots. The tutorials I read said one should add the corresponding command in ...
1
vote
1answer
40 views

How do I create a virtual serial port for me to use?

I am testing a python application on the pi that uses a serial connection via usb to serial adapter. At the moment, I can't use the actual physical device its communicating with. So, does anyone know ...
0
votes
0answers
7 views

Real-time access to simple but large data set with Python [migrated]

I am currently facing the problem of having to frequently access a large but simple data set on the Raspberry PI A in real time. The data set contains around 400,000 mappings from abbreviations to ...
0
votes
1answer
18 views

Using a keyboard/mouse with an xbox 360

So heres my concept. I was playing an FPS on my 360 the other night and I realized how much better I am with a mouse and keyboard on my pc. So my though is to run a mouse and keyboard through my ...
0
votes
1answer
28 views

using try-catch to catch gpio interrupts

Is it possible to interrupt a try-except code in python with gpio interrupt to generate exception? In the "try" part i'm openning a socket and use socket.serve_forever(). I want to make a hard-reboot ...
0
votes
0answers
23 views

Python, Pi Camera and Keyboard input

I'm pretty new to Python and raspberry Pi, having mostly a background in shell scripting. My goal is to have have a Pi set up, with the preview continuously running, waiting for a user to press ...
2
votes
1answer
86 views

How to use the water flow sensor with raspberry?

I'm trying to use this water flow sensor with raspberry: https://www.adafruit.com/products/828 I'm using this python code to read the pulses: #!/usr/bin/env python import RPi.GPIO as GPIO import ...
0
votes
0answers
29 views

Determine which USB port/RFID reader the data is coming in

I'm using Raspberry Pi Model B+. I'm new to the RPi and I don't really know the search terms for my question. I have four RFID readers connected to the four USB ports of my RPi. I wanted to know if ...
3
votes
1answer
228 views

Testing Raspberry Pi scripts on a PC

I'm writing a Raspberry Pi program, to run stuff, take inputs from sensors, save in database and synchronise to a server. Is there a way to test it on the PC before deploying it to the Raspberry Pi? ...
0
votes
1answer
40 views

Sending image to a Bluetooth thermal printer using python

I am currently attempting a project which involves one of my companies existing thermal printers (Star Micronics SM-T300i) and a raspberry pi board. I am attempting to communicate with it via ...
0
votes
0answers
17 views

Python keyboard capture [duplicate]

This is copy-paste from my other question. So, I want to make a program that execute associated part of code while and until the key on keyboard is pressed. I was looking for it long, long time and I ...
1
vote
1answer
24 views

Phonon video player getting stuck on Raspberry Pi

I am trying to play video using Python Phonon player in my raspberry pi2, it is getting stuck after 2 to 3 seconds at a resolution of video 720 X 480. But the video is smoothly playing the other ...
0
votes
2answers
20 views

SPI SDA GPIO Rspi

Can anyone help me to connect more than 2 devices (other CE0 and CE1) and use any GPIO for the SDA pin?
0
votes
0answers
26 views

How do I capture images from a Point Grey Camera?

I want to capture images from a Point Grey Chameleon camera through OpenCV with the python language. I know from the following links that this is definitely possible to do. ...
5
votes
2answers
95 views

Why cleanup the GPIO pins?

When running a program in Python, why would I want the cleanup command when using the GPIO's?
0
votes
1answer
40 views

How to capture keyboard in Python? [duplicate]

So, I want to make a program that execute associated part of code while and until the key on keyboard is pressed. I was looking for it long, long time and I didn't find anything. Can you please help ...
0
votes
1answer
19 views

camera.resolution issue using the picamera module!

I try to run the picamera code as in the documentation here : HOwever, when I run my code and get the dimensions of my array, the array I get has the x and y axes swapped! I have no idea why. This ...
0
votes
0answers
28 views

PIL.Image from picamera.capture()

I want to get an image from the pi camera module and use the pillow imaging library to modify the image. The way I have been doing it up to now is to take a picture with the camera and then open that ...
0
votes
1answer
20 views

Apache server control Python script

I have a temperature sensor on my Raspberry Pi 2, I read the data with a python script. My question is how do I run that script on the Apache server (with a push of a button). Specifically how do I ...
0
votes
1answer
16 views

“Segmentation fault” error when using Gstreamer on Raspbian

I installed Gsreamer on Raspbian with apt-get install gstreamer1.0 . when I want run my Gstreamer application(writen with pyqt4) On Raspbian, I get "Segmentation fault" error. I should say when I run ...
1
vote
2answers
49 views

Reading incoming voltage

I need to be able to see the level of a voltage over a gpio input pin. Is it possible to read the voltage level in python, and if so, how? I've tried to google it and I've looked at the GPIO python ...
0
votes
2answers
51 views

Raspberry Pi's clock and perfect timing

I have a python code that runs when the Raspberry Pi boots up using crontab. It is something like this: import time while True: # beginning of the loop loop_start_time = time.time() # to ...
-1
votes
1answer
16 views

How do In open IDLE?

I want to make the whac-a-block on minecraft pi but it says I need to use IDLE but I don't know how to get to it please help.
1
vote
0answers
32 views

Why is everything a background process?

I am new to RaspberryPi, I am using RaspberryPi 2 with windows 10 core, using visual studio 15 community for development. Under C# code template and python code template why is everything a background ...
0
votes
1answer
37 views

using os.path.expanduser(“~”) I am getting /root instead of /home/pi

While logged in as "standard" pi user, I am expecting the path to the user directory to be /home/pi – which is the case when I open File Manager, for example. However, when I run this script I get ...
0
votes
1answer
42 views

Emulating a keyboard with the Raspberry pi Issue: Bluetooth instance has no attribute 'cinterrupt'

I am trying to turn my Raspberry Pi into a programable bluetooth keyboard by following this tutorial. I think I have been able to programatically send bluetooth keystrokes, however I have an error ...
0
votes
0answers
16 views

Can only access serial device from shell

I am designing a multirotor that is controlled by a Raspberry Pi 2 controlling a NanoWii (Flight controller based on Arduino Leonardo: NanoWii). I have an interesting predicament where I can only ...
0
votes
1answer
19 views

How to hide PWM.add_channel_pulse(dma_channel, gpio, start, width) output?

I use RPIO.PWM to control servos. All the time, the PWM.add_channel_pulse(dma_channel, gpio, start, width) method is called, text about the change is displayed (see image). I know there is a way ...
0
votes
1answer
21 views

gpio library on windows while developing

I am new to Python so maybe this is not an appropriate question. I am working on a project on Python that will use GPIO functionalities of the raspberry Pi. Right now, I am developing the python code ...
0
votes
1answer
47 views

Access numpy array in openCV

Using the documentation here here, the code import time import picamera import picamera.array import cv2 with picamera.PiCamera() as camera: camera.start_preview() time.sleep(2) with ...
-1
votes
1answer
30 views

Accessing YUV data in openCV on the RPi [duplicate]

I came across thisquestion and answer which said how to get a numpy array from raspicam, using the PiYUVAnalysis class. I can output the array itself, But i do not know how to view the array as an ...
0
votes
0answers
22 views

How to auto start a script in Raspbian [duplicate]

Hi I am trying to autostart a python script . I have edited the rc.local file to add the file location before exit 0.. sudo python /home/pi/myscript.py & The myscript.py has executable ...
0
votes
1answer
34 views

How to force RPi to wait for data from UART?

Like above: how to force RPi to wait for data from UART and do not terminate the program ? I solved my problem with connection between RPi and BT Module and Arduino but the program I wrote is closing ...
0
votes
0answers
18 views

Avoid .stdin.write commands stacking in the pipeline?

I am using an oled screen on i2c bus. And I am using subprocess to update the content of that screen. Currently my subprocess can't process those commands as fast as they were sent, so they stack in ...
0
votes
0answers
20 views

Ntrig touchscreen and pygame

I have a 10" touchscreen purchased from Chalk-elec. This touchscreen reports as N-trig duosense (output from dmesg): [ 4.483271] usb 1-1.3.3: Manufacturer: N-trig [ 5.584474] ntrig ...