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
1answer
18 views

The Current in mA at 3.3 V When Using the Internal Pull-up Resistors

I'm using RPi.GPIO in Python 3. If I do GPIO.setup(24, GPIO.OUT, pull_up_down=GPIO.PUD_DOWN) GPIO.output(24, 1) will then a current flow internally from the pin to ground even if it is not ...
0
votes
1answer
11 views

Understanding the library from MCP3002 ADC chip

can somebody explain to me about this mcp3002 library used in analog to digital conversion?? It has some connection to my first question here. # botbook_mcp3002.py - read analog values from mcp3002 # ...
0
votes
0answers
6 views

Using Python how do I use subprocess.call for a command with a pipe redirection? [migrated]

Having read other answers on here, I know that shell=True is frowned upon, but I am having trouble with a command (more accurately a pair of commands?) with a pipe redirect. This works: ...
0
votes
0answers
24 views

Python + Polipo + Tor

I need to send a HTTP POST request using TOR. Since TOR only supports SOCKS, I need POLIPO to redirect HTTP requests trough SOCKS in TOR. So I'm using this piece of code in python, to send things ...
1
vote
1answer
75 views

Problems Regarding Raspberry Pi Project with MQ-2 Gas Sensor

Recently I have been learning Python implementations on Raspberry Pi's GPIO system. I'm interested in wireless sensor network examples and decided to make a fire alarm system using MQ-2 sensor as the ...
0
votes
1answer
30 views

nginx on raspberry pi

I followed http://chimera.labs.oreilly.com/books/1234000000754/ch08.html#_simple_nginx_configuration to install a nginx server on my raspberry pi to work with my django project. I added a file ...
0
votes
1answer
38 views

softPwm of wiringPi for servo … where is the problem?

I have a Python code which controls an ESC & servo fine. Now, I'm trying to develop a similar code in C language using wiringPi. However, the C codes don't work. The Python & C codes are ...
0
votes
1answer
34 views

How to initialize an ESC with python code [duplicate]

Hello everyone I am a newbie to this,but i have a really important issue.I cant make my brushless motor move,it kepps on beeping. I have connected it to an ESC and is trying to signal the ESC from the ...
0
votes
0answers
20 views

What is the Best Management Package for Capturing Live Streams from My Pi Camera Module

I am new to this site and to the Raspberry Pi board, in general. So, please be patient with me as I am in the learning process, in regard to the Pi and all of its capabilities. Nevertheless, I am ...
0
votes
0answers
23 views

Where can I start with Rb Pi 2 [closed]

Just to being, sorry if this is a very nooby question... I have just recently got a Raspberry Pi. I want to switch on and off an LED light with java and the Raspberry Pi combined. Does anyone know ...
0
votes
2answers
50 views

Changing the aperture of the raspberry pi camera in python

Having played around with controlling the raspberry pi camera in python, I discovered that there is an aperture module and that this code takes a picture without throwing up an error which I thought ...
0
votes
1answer
25 views

How to measure the frequency of the audio output

I was wondering how I can measure the frequency of the audio output of my raspberry pi. Currently I am trying to create a script to control an RGB led to the music that is being played through the ...
0
votes
1answer
19 views

GPIO Input fluctuating between high and low when no input is received

I've got a fairly simple circuit that I've made where a motion detector is connected to a Raspberry Pi B+ GPIO by way of a fairly long ~30ft stretch of wire. The detector is being powered by a 9V ...
0
votes
1answer
43 views

How to connect into spotify

I was wondering how can I create a raspberry pi spotify streamer where I can stream my music to and then can control leds with the music frequency.
0
votes
0answers
47 views

Python attribute error with Raspberry Pi Camera

I have been coding a python 3 program which allows a user to easily take pictures with the raspberry pi camera. The program works up to the Camera_Capture method which takes the picture. When it is ...
0
votes
1answer
40 views

How to use pigpio to control a servo motor with a keyboard?

My aim is to be able to control a servo motor with my keyboard in a real time fashion using the python module of pigpio. That is, when I press say the 'w' key it rotates clockwise and when I press the ...
1
vote
2answers
27 views

When i set the GPIO pin as output in my python cgi script, after that line my browser does not execute the cgi script. Why?

import RPi.GPIO as GPIO GPIO.setmode(GPIO.BOARD) GPIO.setwarnings(False) GPIO.setup(18, GPIO.OUT) print "<h1> line 4 </h1>" The above does not print line 4 in client's browser
0
votes
2answers
75 views

Using Python to control the Raspberry Pi Camera

I have started coding a program in Python 3 for the Raspberry Pi Camera, here is what my code looks like: import picamera, time def Picture_Name_Settings(): pic_name = input("To name the image ...
0
votes
0answers
15 views

Midori change URL without new tab

I am trying to change the url of the midori browser after predefined intervals. import os import subprocess import time cmdline = ["midori", "-e", "Fullscreen", "-a","http://www.foo.bar"] p = ...
1
vote
1answer
53 views

Difference between Piclock and Pi Camera Clock?

I have been recording uncompressed videos using Picamera. I am using custom output to capture Presentation timestamps (pts) and Pi-internal clocks time for each frame. Code Below. import io import ...
0
votes
2answers
58 views

Python taking pictures with raspberry pi camera

I have written this code to take a picture when it detects motion however when I run the code it prints 'picture taken' but does not save the picture. I know my camera works as I tested it in LX ...
1
vote
1answer
52 views

Print output not shown when run Python script CRON

I am automatically running a simple python program from start up using cron. The pi boots / automatically logs in, displays the command line and runs the python program but the print output (updating ...
0
votes
0answers
18 views

can I program gpio led light to flash on particular website?

I have used python to create a program that lights up the led through GPIO on the rasberry pi. I was wondering if and how I could write a python code so that the led light would light up only when I ...
1
vote
1answer
62 views

How to shutdown GPIO elegantly when using kill to stop Python script running in the background?

I'm using GPIO in a Python script, and I've wrapped my code in a try... except block so that GPIO is exited elegantly if I need to abort the script: GPIO.setup(17, GPIO.OUT) # Configure GPIO so that ...
0
votes
0answers
43 views

UHF RFID Reader with Raspberry Pi

I have a RFID Reader like the one posted on this link: http://www.ebay.com/itm/EPC-Gen2-UHF-Integrative-5-7-Meters-Long-Range-RFID-Reader-with-free-SDK-/171473207602 It has RS232, RS485 and Weigand ...
0
votes
0answers
7 views

Running a “piping” script from an os.system() command [migrated]

I currently have a script ("monitor") which monitors and outputs various system-type data to the screen. I have a Python program which is post processing that information when I use this command to ...
0
votes
1answer
82 views

Python - cannot import OpenCV module?

I used this guide which installs OpenCV in a virtual environment, however I am getting the following error when I try to import the cv2 module: $ source ~/.profile $ workon cv $ python >>> ...
0
votes
0answers
7 views

Get external IP via Email - Suggestions for Improvements [migrated]

I wrote a script for my Raspberry Pi that keeps checking my external IP. If it changes, the Raspberry Pi will send me the new IP via email. Any suggestions for improvements? #!/usr/bin/python3 ...
0
votes
0answers
4 views

Can I connect to Multiple Bluetooth devices using a Bluetooth dongle? [migrated]

I am using a usb bluetooth adapter on my PI 2 , which communicates to an arduino using HC-06 Bluetooth module. This script runs to connect to that module: #! /usr/bin/python import serial from ...
0
votes
2answers
47 views

Can't run python script from cron

Running latest version of Rasbian and want to execute /home/pi/temp.py from cron every 2 min. Have chmod 755 on the file When I run the command from the prompt it executes fine and the script does ...
0
votes
0answers
72 views

opencv2 python script and UV4L server trying to access PI camera module at the same time

I'm trying to use an opencv2 python script and UV4l-server to stream a live feed, from a NOIR camera board on my PI, but am running into problems. The python script runs and displays the window, but ...
0
votes
2answers
35 views

How should I properly communicate 2 Raspberry Pi via UART?

I'm testing serial communication with Python pyserial module. I try to communicate some strings between two Raspberry Pi's ... I tested transmitter and receiver code at same device connecting it's ...
0
votes
1answer
60 views

How can I use a LCD display with a I2C adapter?

I'd like to try to communicate to a 16x2 LCD display, however whole docs I found assume I should connect the whole pin-out however I got some kind of I2C adapter from mjkdz.com which makes a 4 pin ...
0
votes
4answers
90 views

How to blink LEDs on/off continually, while continuing execution of a script?

I've connected red and green leds via GPIO and I can successfully switch them on/off using RPi.GPIO - now I'd like to: start an led blinking on/off every 1 second have the script continue its ...
0
votes
0answers
50 views

Raspberry Pi stream video over RF

I would like to stream video from a Raspberry Pi over RF to another Raspberry Pi. Here are a few requirements: Range of at least 1KM (pretty much line of sight) I would also like to send some data ...
0
votes
0answers
13 views

pymodbus to read temp from device

I am trying to us pymodbus to read data from a temperature and pressure device, but it seems the output from my readings is always None. Here is my code import pymodbus import serial from ...
2
votes
3answers
156 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
23 views

Nginx passing calls to Python Socket [closed]

Have installed Nginx on Raspberry Pi 2 and its working. Also have added a default HTML page with a text box, and I can access the page over the local Network. So is there a way to pass the text in ...
0
votes
0answers
22 views

Python serial script prevents android connection

The python script below connects via "rfcomm0" to the "Bluefruit EZ-link module" on the "Arduino Uno" but prevents the bluetooth connection from my android app. If I change the script to use ...
1
vote
1answer
66 views

I2C LCD detected, code runs, but no display

I'm trying to drive a 16x2 LCD board with i2c and running into some unexpected results. Basically, I can detect it, talk to it with my code, but nothing shows up on the screen. Same screen when ...
0
votes
1answer
48 views

http streaming functionality with password

I'm trying to add some http streaming functionality to an existing python motion detection script. The script already uses the uv4l driver to access the raspberry pi camera, so I thought I'd try ...
0
votes
0answers
52 views

Raspberry Pi Frequency Calculator

I'm trying to make a simple program that calculates the frequency at a pin on the board. I'm using Python for the programming. I wrote two different programs and they gave the same (wrong!) results. I ...
0
votes
1answer
69 views

Record Video using a for loop

I am using RPi 2 Model B with a RPi camera module. I'm coding on Python and need to record a video while operating a motor. The code I'm working with looks something like this with ...
0
votes
3answers
110 views

Run two python script automatically on Headless raspberry pi project

I'm doing a project where raspberry pi runs headless. I have written two python programs, one for swiching off the raspberry pi via gpio push button and the other is a opencv-python program. I need to ...
0
votes
1answer
43 views

Receiving junk datas from the serial port of raspberry pi

Iam doing a project in which i need to read datas send from a ZIGBee through the serial port of raspberry pi. I have done removing that ttyAMA0 stuffs from /dev/cmdline.txt and commented that line in ...
0
votes
1answer
58 views

What can I use to program a basic game in Python?

I've just started to program games, but I want a 3D game engine for Python like Phaser for Javascript. Any help would be highly appreciated. Thanks.
2
votes
1answer
55 views

Accessing ADXL345

I'm trying to access an ADXL345 Accelerometer mounted on a Sparkfun breakoutboard via Python and I2C from a Raspberry B+. I'm following this tutorial However when trying to check for the sensor with ...
1
vote
1answer
23 views

png file in same folder as pygame file but not working

So i am on raspberry pi 2 and I am trying to make a game and i have the .py file in the same folder as the png but its still not working. it gives me this error: Also im using pycharm ...
0
votes
1answer
32 views

KeyboardInterrupt Handling with picamera

So I have a python program in which I'm using the picamera library to shoot pictures and record video. I'm using my program for scientific purposes and my goal is keep each picture as close to the ...
0
votes
0answers
43 views

controlling 12 V RGB LED strip with raspberry pi

We are trying to control a RGB led strip with a 12 V power supply. The servoblaster does not work. Can you please suggest some other software we can use?