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. Python versions 3.x and 2.x come installed on the Raspberry Pi

learn more… | top users | synonyms

0
votes
0answers
17 views

How to run a Python script on a raspberry pi via webserver?

Hi everyone I am trying to run a python script on my raspberry pi 2 via web server running apache2, php, and raspbian jessie. What my plan is to do is have a timelapse camera using python (code below) ...
0
votes
1answer
30 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
0answers
10 views

How can transfer files between RPI and Windows PC via Bluetooth_OBEX?

I try to build computer program that trasfer files use Bluetooth and OBEX technology between Windows and RPI. I use BLuetooth RFCOMM Server @ Windows Side. RPI is @ client side. I use pybluez and ...
1
vote
1answer
61 views

Vibration sensor - What I am doing wrong?

I am trying to use a vibration sensor with my Raspberry Pi. The wiring looks like this: 3.3V -> VIBRATION SENSOR -> LED (Grounded) -> GPIO6 Whenever I touch the vibration sensor, the ...
1
vote
1answer
157 views

How to send data using raspberry pi's 3.5mm audio jack?

Does any one know of any projects that are doing this? Whether or not it's even possible? EDIT: I want to send the data from RPi to the device connected on other end. My primary goal is to control ...
0
votes
2answers
56 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 ...
6
votes
4answers
16k views

How can I connect to a USB serial device?

I have a device with a USB serial port cable that I'd like to connect to my Raspberry Pi. The chipset for this USB to serial cable it the PL-2303 from Prolific Technology, Inc. How can I read data ...
0
votes
1answer
57 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
1answer
208 views

Pub/Sub between computer and Raspberry Pi

So I am using the python bindings for ZeroMQ in an attempt to send messages to several raspberry pis on a network for an art project. The issue is that I am not receiving any messages on the raspberry ...
1
vote
2answers
123 views

OSError: libportmidi.so: cannot open shared object file: No such file or directory

i'm a newbie with Raspberry PI (my model is B+). I'm tryng to write a script in python that read a midi file and switch on/off leds... My code for reading midi file is this one: import mido output = ...
5
votes
3answers
7k views

Ping a website and have an output turn on if online/offline?

I am new to python and programming the Pi, my aim is to make it ping a server such as a gaming server or website and tell me if it is online or offline. So far I have looked everywhere but nobody ...
0
votes
0answers
16 views

Reading content from an email [on hold]

I am new to this website. I have a question I can't seem to find the answer to anywhere (although may be I haven't looked hard enough). I am attempting to get a url out of an email that is sent to ...
0
votes
1answer
16 views

Can't install Flask-Bcrypt: `libffi` is missing

I try to install Flask-Bcrypt on Raspbian to hash passwords in my Flask application, but I get this error: Searching for flask-bcrypt Best match: Flask-Bcrypt 0.7.1 Flask-Bcrypt 0.7.1 is already the ...
1
vote
1answer
27 views

How to connect to MySQL from Python (3)? [closed]

I believe the preferred way to connect to MySQL database from Python is with MySQLdb. I'm relatively new to Python programming and it also seemed to be advised to write for Python 3, so I've been ...
2
votes
1answer
42 views

Using WiringPi with Jasper (voice recognition)

I am using Jasper. The voice control part works, however the function I call when a certain word is said, does not. I'm trying to control a robot, sending high signals to certain pins on an L293D ...
0
votes
1answer
20 views

Can i run Python 3.3+ on Raspbian Jessie

It seems like Raspbian Wheezy does not support Python 3.3, only 3.2. Can I run Python 3.3+ on Raspbian Jessie?
0
votes
1answer
18 views

Is there any way to read/get pin mode using python (and wiringPi) [closed]

I have a database with table pins with atributes pinNo, pinMode and pinState. I'm trying to read these raspberry pi's atributes using wiringPi in python script, and to write that data into the table ...
1
vote
2answers
59 views

Adafruit 16x2 LCD not displaying properly

I'm trying to build a clock with an Adafruit 16x2 LCD and my RasPi B+ using Adafruit's tutorial. It works fine at first, but it will start displaying gibberish after a couple seconds. Any ideas as to ...
1
vote
1answer
38 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 ...
3
votes
2answers
195 views

Why are some GPIO pins HIGH when the Raspberry Pi boots up?

I have an easy circuit wired up, with an LED connected to pin 18 on the BOARD reference. I run a simple program to put pin 18 to HIGH, which turns the LED on, and then a couple of seconds later, I set ...
4
votes
3answers
4k views

Upgrade from Python 2.7 to 3.3,x

How do I uninstall Python 2.7 and install the latest Python 3.3.x? Tried using "upgrade" but it didn't solve my problem.
0
votes
0answers
24 views

Controlling a stepper motor with javascript

I'm trying to control atleast 2 stepper motors with the raspberry, which works fine with the following setup: Raspberrypi Model 2 MotorHAT from Adafruit https://www.adafruit.com/products/2348 Python ...
0
votes
1answer
39 views

Coin Counter in Raspberry Pi

I'm having a problem to count coins in raspberry usin RPi-GPIO. This is the code: import RPi.GPIO as GPIO GPIO.setmode(GPIO.BCM) GPIO.setup(23, GPIO.IN) while True: print(GPIO.input(23)) ...
0
votes
2answers
34 views

Python GPIO buttons blocking Lirc

I wanted to create a remote for a small tvscreen using Lirc and python. After booting I'm able to send commands from CLI (irsend) and it works. However when I start a Python scripts to read button ...
0
votes
1answer
46 views

Problem controlling dc motors through gpio in Raspberry pi?

i'm tryging to control dc motors with my raspberry pi card. i created two codes in python: main.py : i execute this code to control dc motors util.py : this code is like utility class where i put ...
0
votes
0answers
12 views

GDBus.error when switching from hdmi output to PFIT touchscreen mounted to raspberrypi2

I am running the Pi on my TV right now, and switching over to the PFIT touchscreen to check my programs. I sometimes get this error: error GDBus.error.org.freedesktop.policyKit1.error.Failed ...
0
votes
0answers
34 views

Importing function from another python file [closed]

i'm trying to call a function from another file in python. i have this: File1.py import RPi.GPIO as GPIO ... def Go(): GPIO.output(11,GPIO.HIGH) def Stop(): GPIO.output(13,GPIO.LOW) ... ...
1
vote
2answers
2k views

Setting camera module to /dev/video0 to scan QR Codes using zbar

I'm trying to use the library zbar to scan qr codes using Raspberry pi's camera module. I've connected and tested the camera, but I don't know how to access that from the library because it isn't on ...
0
votes
1answer
1k views

Python: Script to start Omxplayer from crontab

I am trying to have cron run a python script that plays an MP3 file. It sounded easy but I have been searching and struggling to find the correct solution and was hoping someone could steer me in the ...
1
vote
1answer
107 views

Python script stops running after 15-20h

I'm monitoring my sensor data and sending it online with my .py srcipt. It should run every 5min so I programed it like this: import threading import time def send_wu(): # ...
1
vote
1answer
16 views

Arm ESC RPi.GPIO

I am trying to run a brushless motor with an esc. I know that it is supposed be pulled from 1-2ms to run. I have read online that it needs to be armed first but I don't know how to arm it. I looked ...
4
votes
2answers
2k views

GPIO pins are always HIGH

I recently have started delving into using the GPIO on my raspberry pi and when I got to the input section of adafruit's tutorials I noticed something wrong. For some reason when I execute the python ...
2
votes
1answer
3k views

GPIO pin output stays high after setting to low

I'm working on a project in which I have to set a GPIO pin of the Raspberry Pi to high/low in order to signal a transponder which in turn communicates with a lock and opens it when it receives a high ...
6
votes
3answers
10k views

Installing Python 3.4 on Raspberry Pi

Is it possible to run python 3.4 on a Raspberry Pi? Currently I have python 3.2, but the odd thing is that running sudo apt-get update sudo apt-get install python3 results in my Raspberry Pi ...
1
vote
1answer
64 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
1answer
32 views

Python GPIO not reading inputs

Using a very simple input script to read a button press, Python GPIO isn't reading high when the button is pressed. The wiring is correct - I have checked it using wiringpi readall. Rpi. GPIO has ...
1
vote
3answers
47 views

PWM Fan causes clicking sound

I am using PWM to control the speed of the fan on my RPi 2. The problem is, when I am PWMing it, a clicking sound can be heard from the fan. I am using a 6v power supply for a 5v fan to compensate ...
0
votes
1answer
26 views

how to change read channels on PCF8591

I have a PCF8591 analog to digital converter. I have it reading from AIN0 (thanks to @joan), but I cant find a reference for getting it to read from multiple channels. How would I get it to read input ...
2
votes
1answer
223 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 ...
1
vote
1answer
195 views

Is there a way to see if a GPIO pin is on or off using the python RPi.GPIO module?

I have a relay connected to the RPi. Pin 12 for output on/off and grounded with pin 6. Currently I have two python scripts one for turning pin 12 on and another to turn it off. My goal is to run a ...
0
votes
1answer
125 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 ...
0
votes
1answer
37 views

Help with a python script using pull up resistors and long presses of momentary switches

What I'm trying to achieve is to use GPIO pin 5 (BCM) on my raspberry pi b+ to receive input from a momentary switch and in response take specified actions. The actions will differ based on how long ...
0
votes
1answer
31 views

Activate virtualenv & start script on boot - RPi

I am trying to start a python script that exists in a virtualenv from bootup on my RPi. From reading this post and the RPi rc.local post I know that I will have to add something like this to ...
0
votes
1answer
14 views

Python Serial library returning unexpected characters from USB RFID reader

I'm trying to write a simple Python script to print RFID tag numbers to the terminal. Code example below. Using a Pi 2 Model B, with the reader here attached via USB. I'm having difficulties ...
2
votes
4answers
463 views

How to connect 7-segment 4-digits display with Pi?

I would like to connect such a 7-segment 4-digits display (with common anode) to the Raspberry Pi: What's the simplest way to do it with Python for example? Do I need the RPi.GPIO package? Is there ...
1
vote
0answers
8 views

Pygame headless setup [migrated]

I am using pygame's joystick api to use a joystick with my project on a headless system, but pygame requires a "screen" so I have setup a dummy video system to over come this. It worked fine but now ...
1
vote
1answer
44 views

Toggle on/off with a push button (WiiMote)

I want to make a on/off signal with only a push button, exually its for my WiiMote but I dont think that that makes a difference. I want a led to turn it on ans off. I was thinking about a counter ...
1
vote
1answer
331 views

Raspberry PI 2 Model B Not Detecting ds18b20 Sensor (Tested with Multiple Sensors)

I just wanted to ask some advices. I have tried everything I could find, including : /boot/config.txt add Line dtoverlay=w1-gpio,gpiopin=4 Update and Upgrade Updating firmware Buying new Sensors. ...
2
votes
1answer
388 views

SPI (file based) from Rasp Pi to Arduino

I am trying to use file-based SPI communication from my Raspberry Pi to an Arduino (328p based). The weird thing is that when I write it out one byte at a time and flush the buffer between each write ...
0
votes
0answers
53 views

How to start the XB1 and open Netflix through my Raspberry Pi?

Maybe some of you heard about the Netflix Switch. (http://makeit.netflix.com/the-switch) I want to build my own Switch using my Raspberry Pi and my xBox One. My Question is: Is there a workaround to ...