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
2answers
21 views

how to access local GPIO from remote Django/apache server

how can i get a local event (example: a physical button pressed) to trigger events on a remote django website. without using a keyboard or mouse click. thanks
0
votes
2answers
32 views

ImportError No module named thread

I want to make a simple thread that listens if a Button is pressed or not. I receive the error ImportError No module named thread. import RPi.GPIO as GPIO import time import thread ...
1
vote
0answers
24 views

Reliable timed system with low power consumption over rasbpian [on hold]

I'm building a simple irrigation system which uses a Raspberry Pi to open and close a solenoid water valve. In general, the system should open the valve for set intervals of time every so often (E.g. ...
0
votes
1answer
36 views

Delay running of python script on boot until desktop is finished

I tried simply editing the autostart file to run a Python script on boot, but it runs with errors, I assume becasue the desktop hasn't completed. Can someone tell me how I would launch a script with a ...
0
votes
0answers
3 views

installing pygame.mixer

so i've been looking for a few hours now on how to install pygame mixer. I have pygames installed already. Im not sure if I have to download it apart of pygames or if it comes pre-installed.
0
votes
0answers
49 views

Pi Camera Module frames directly to OpenCV lib for processing

My intension is to use raspberry Pi for tracking coloured object. I am using Python, OpenCV and Raspberry pi Camera Module. Since OpenCV doesn’t work out of the Box with raspberryPi cam Module, I ...
0
votes
1answer
24 views

Raspberry Pi and Arduino bluetooth communication

I'm currently workin on a project which consists of controlling a arduino robot ( with this https://www.adafruit.com/products/1588 bluetooth module on it ) from my raspberry pi. I found this ...
0
votes
0answers
91 views

Pi and Python- Cannot connect to SSL

I am using Tikona Broadband ISP in Bangalore,India. The ISP need the user to login using a web proxy. This is how my Pi is connected: The ethernet from ISP lands on the router and the Pi is ...
0
votes
0answers
22 views

GPIO goes high on first initial run of script - please help get my ECTO 1 on the road!

I am having a few problems with my script, on a fresh boot of my pi, the GPIO Port goes High and switches my relay when I run this script, however, it doesn't do it after I initially run the script, ...
0
votes
2answers
64 views

Will a script keep running even if I SSH in separately?

It's hard to summarise my question in the title, so here is the actual situation. I am running picam to use my camera module as a security camera. I don't need it when I'm in the house, so before I ...
0
votes
1answer
28 views

One Wire Temperature auto setup while booting

I have temperature sensor (DS18B20), also known as a 'one-wire sensor'. I've connected it to pin 4. I am using this code that someone wrote (source). #!/usr/bin/env python import time ...
1
vote
1answer
58 views

RaspberryPi to Arduino(leonardo) avoiding latency

I'm using a Python script via (TKinter)on the raspberryPi to capture mouse movement and events. My goal is to send this data, in real time, to another connected Arduino device(Leonardo). My first ...
0
votes
2answers
39 views

playing wav files with pygame bad quality with noise

I am trying to play a wav file in my raspberry-pi using pygame. I am able to play the music in the speaker.But the sound is very low and many noises are coming along with the sound. Is there some ...
0
votes
1answer
40 views

raspberry pi python-tesseract install

A few months ago I created a project that uses the python-tesseract library on the raspberry pi. Since then I reinstalled rasbpian, and now I would like to reinstall the python-tesseract libary. The ...
0
votes
1answer
30 views

Can't PWM LED on pin 18

Using this code, I can't use PWM on the pi. It's modified off of a Linux user article. import time import RPi.GPIO as GPIO led = 18 GPIO.setmode(GPIO.BCM) GPIO.setup(led, GPIO.OUT) ...
0
votes
1answer
52 views

How to prevent python script from running more than once?

I want to prevent starting the program if it is already running. Right now the same user can start the program multiple times and cause unexpected behavior. Is this something I should solve at the ...
-1
votes
1answer
27 views

Soundboard switch mp3 list

I'm trying to setup a switch on a breakout board which will allow me to on switch play a short mp3, then loop a second mp3 until i switch it off, when i do so i want it to play a third mp3 (this is ...
0
votes
2answers
44 views

WiringPi vs default Raspbian RPi.GPIO module

Can anyone explain the difference between WiringPi and the default RPi.GPIO module that comes with raspbian? What extra features does WiringPi have?
0
votes
1answer
42 views

Raspberry Pi Recipes

I am graduate student in Applied Mathematics and recently learned about Raspberry Pi. I would like to use Raspberry Pi as part of a mathematical project where I deploy something useful . For example, ...
0
votes
1answer
27 views

Python sorting JPGS via time problem [on hold]

I'm struggling to sort a large number of photos into folders based on the day they were taken. I'm nearly there, but have noticed that the file below gets moved into the wrong folder. It should be ...
0
votes
0answers
36 views

picamera stream and web.py

How do I integrate picamera to return a stream in a GET method defined in web.py ? urls = ( '/webcam', 'CamHandler' ) I'm trying something like: class CamHandler(): def GET(self): ...
-1
votes
1answer
17 views

Raspberry-pi mqttc.publish() to node red overflowing after 20 entries

I am using my python code to publish messages to node-red via mqttc. The problem is after 20 mqttc publish,the data is not getting published to nodered. Here is the python code i used for posting to ...
1
vote
1answer
68 views

IndexError DS18B20 Temperature sensor

I have this temperature sensor (DS18B20). I've followed the tutorial on Adafruit (here). First I had to setup some modules by doing: sudo modprobe w1-gpio sudo modprobe w1-therm Then I check the ...
1
vote
2answers
54 views

How to run python script on pi without logging in everytime

I want my pi to run a python script on it everytime I plug it into any power source. My pi collects data from MSP430x and upload it on a cloud server. I want to keep it running all the time and I ...
-1
votes
1answer
24 views

Could not find driver when I trying to display my PHP

After going through a few tutorials of displaying data to php from python and my sqlite database, I keep getting this error and don't know how to fix it. I'm in need of urgent help. Error Message ...
0
votes
0answers
62 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 ...
-2
votes
1answer
51 views

How to display database in plain html or php from python [closed]

I would like to seek urgent help on just display what's in my database on plain html or php without any GUI interface or layout, just plain database display. Is it possible cause I'm new to it and ...
0
votes
1answer
56 views

Trying to understand this WIFI script

I'm trying to understand how this Python script works, but am struggling with 1 to 3 below, so if someone could explain these I'd appreciate it. 1) 'ping -c 2 -w 1 -q 192.168.1.1 |grep "1 received" > ...
1
vote
1answer
40 views

Operational error when writing to database in Raspberry Pi's Python [closed]

I'm having an operational error when trying to run IDLE program (Python) in Raspberry Pi and it prompt me an error sentences: Traceback (most recent call last): File "/var/www/Sensor-LED.py", line ...
0
votes
0answers
16 views

My SQLite Database in RPi to Windows Azure's SQLdatabase

Sorry to disturb you guys but I needed urgent help for my project. After finishing my database and coding using Python in Raspberry Pi, I would like to know that how do I connect to Windows Azure's ...
-2
votes
1answer
28 views

How to set ID for multiple sensor like LED, Temperature Sensor and etc?

Sorry to disturb you guys, I would like know how to set a custom ID to sensor like LED, Temperature Sensor and etc. Example: Like 1 LED sensor, not smart LED. Only can display real time data and ...
0
votes
0answers
34 views

How to modify my code to be able to write to Azure storage? [duplicate]

Sorry to disturb you guys again, I in need of urgent help. I would like to know how should I modify my code to be able to WRITE to Azure storage? This is my code: import RPi.GPIO as GPIO ## Import ...
0
votes
0answers
37 views

Opencv configuration issue

I have recently installed opencv 2.4.8 on my raspberry pi.When i check the version with pkg-config --modversion opencv 2.4.8 But in my python code when i import cv2 i am getting the error as no ...
0
votes
3answers
44 views

Connecting multiple light sensors to one port

Is it possible to connect multiple light sensors to one port and similiarly control multiple motors through one port only? (I've tried searching for answers on Google, couldn't find a convincing ...
0
votes
0answers
32 views

How to WRITE from Raspberry PI to Windows Azure?

I'm in need of urgent help here for my projects. I have created a simple blinking LED code using IDLE in Raspberry PI and now wanted to record the data from it and store it to Windows Azure's SQL ...
0
votes
0answers
13 views

Raspberry PI - Error accessing 0x40: Check your I2C address

I try run this python servo script on my raspberry PI. I got this code from here https://github.com/adafruit/Adafruit-Raspberry-Pi-Python-Code/blob/master/Adafruit_PWM_Servo_Driver/Servo_Example.py ...
0
votes
2answers
44 views

Can't WRITE out a text when running Python Shell

Sorry to disturb you guys again, I have successfully created a blinking led. But the problem I'm facing right now is I wanted to create a WRITE method to record all the details that shown on Python ...
1
vote
1answer
67 views

How do I write my temperature data to Windows Azure's Sqldatabase?

As title said, I'm new to Raspberry PI and needed help on this part as I need to write my temperature data to Windows Azure's Sqldatabase. import smbus import time import datetime #SMBus(0) - ...
2
votes
1answer
61 views

Interrupting a Program with a Button

Currently tying to stop the middle of a command if the user presses a certain button. I tried this bit of code below and it doesn't seem to work. I know that you can use control-C to have a ...
0
votes
1answer
33 views

Need to initialize serial connection with screen

My Problem: I've got an Arduino connected to my Pi via /dev/ttyUSB0 and I always have to initialize the connection via screen, otherwise I cannot send any values via Bash or Python. What I'm doing: ...
0
votes
1answer
31 views

Simple LED code says that object has no attribute output?

I installed RPi.GPIO .5.1 and my uber basic led code says that the object has no attribute 'output'. I am hooking up the 12 pin to the Breadboard and I have ground hooked up too. Here is my python ...
0
votes
0answers
56 views

Stepper motor troubles

I've been trying to setup my stepper motor with my RPI according to this guide: http://www.raspberrypi-spy.co.uk/2012/07/stepper-motor-control-in-python/ However, nothing seems to be happening, have ...
0
votes
1answer
60 views

Pygame + RPI-Camera Container

Currently I'm using this code, to display my pygame on 2.8" TFT with Touchscreen while keeping the HDMI-Port as main-output: import pygame, sys, os os.environ["SDL_VIDEODRIVER"] = "fbcon" ...
0
votes
2answers
61 views

Multiple Inputs through GPIO

I am currently trying to create a program that does something each time a button is pushed, it seems simple but for me this has been very difficult to acomplish. I am on python 2.7 (but I can go to 3 ...
0
votes
0answers
18 views

pylirc returns none all the time

I'm trying to write simple IR receiver code using pylirc in python but the function Pylirc.nextcode(1) always returns None! I ran a test and everything is good, the terminal and the shell in python ...
1
vote
3answers
75 views

how to turn on and off an led with only a tactile button

I'm a beginner to the raspberry pi and python. I want the pi to act like a flip flop to the led so that when i push the button once, it will turn on and if I push it again, it will turn off and so ...
0
votes
1answer
46 views

PyInstaller fails

Can anyone throw some light on why I cannot get 'pyinstaller' to execute successfully? The installation of pyinstaller seemed to be successful but every time I run it on the simplest of scripts, it ...
1
vote
1answer
65 views

python 3.2 and pirateradio on wheezy

My RPi runs a Raspian wheezy, and I've got python 3.2 installed. I'd like to run this script to make my RPi transmit FM: https://github.com/Make-Magazine/PirateRadio. I've done git clone ...
1
vote
0answers
82 views

Manipulate RSSI value

My issue is pretty simple to explain: I doing some tests with my Raspberry and Bluetooth Low Energy (BLE). I bought a Bluetooth 4.0 dongle and everything is setup fine. Now for a little project, I ...
0
votes
3answers
218 views

How do I display an image file (PNG) in a simple window?

I've got a prototype I need to show for an RFID project. I've got the RFID (Parallax USB) working, and the sample Python script (my first) is displaying the ID of the card just like it's supposed ...