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

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

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
23 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
23 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
37 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.
0
votes
0answers
16 views

Piface input values

With Piface in the Python 3 shell, this runs fine, turning the output leds on and off: >>> import pifacedigitalio >>> pifacedigital = pifacedigitalio.PiFaceDigital() >>> ...
1
vote
0answers
24 views

Error running a simple python script at boot

I am attempting to create a button on my Retro Pie emulator case (A gutted NES), using the old reset switch, to exit out the of current game and go back to the menu. Then I realized it just required ...
0
votes
1answer
23 views

Defining PWM ports to be used on the GPIO

Now as i have noted in previous questions i understand the PWM area of the raspberry pi is the most saturated area, but my question lies in which ports can actually be allocated as a PWM output due to ...
0
votes
0answers
40 views

SIM900 to Raspberry

I've recently bought SIM900 with this module. Connected it to Raspberry Pi - GND, 5V, RX-TX, TX-RX. I'm using following code to test it (found on web): #! /usr/bin/env python import argparse from ...
4
votes
1answer
68 views

PWM Control on Raspberry PI

Alright so I understand this question is fairly saturated, but my use in pwm is for two differing pieces of hardware. (Sourced from: https://www.modmypi.com/blog/raspberry-pi-gpio-en-franais) From ...
0
votes
1answer
37 views

Raspberry Pi to shuffle music [closed]

I am inquiring whats the best way to go about using python to shuffle music on the raspberry pi what I would like to do is do this via user input to determine what song to play. Any help would be ...
3
votes
2answers
92 views

Python: Is there any way to get a list of IPs connected to a network

Is there any way to get a list of IPs connected to a network? I'm trying to build lots of networking tools so.
0
votes
1answer
28 views

So is there any C++ alternative for PiUi?

So actually i have a little project that require the Pi to communicate to a Smartphone (in this case android device) to transact data (sending and receiving command,etc) via any available connection ...
0
votes
2answers
63 views

How can I exit a while loop at any time during the loop?

I have a python program that loops through some GPIO commands. How can I break the loop at any time during the loop by pressing the Enter key. So far I have this... import sys import select import os ...
1
vote
0answers
26 views

Custom White Balancing with picamera

I need a method to set the White Balance of the raspberry pi camera by "teaching it". Such as it is in DSLR cameras, I'd like to show a white picture to the camera and say "OK, this is white, now ...
2
votes
2answers
61 views

From raspi to laptop python3 vb.net/c#

Hello im enquiring about using data from a raspb-pi via python to then access it in c# in visual studio for an impending app I will make, what is the best way to go about this. To extend atm I am ...
0
votes
1answer
37 views

Remote control application [closed]

I connected raspberry with my pc over wireless network. I can use ssh communication, and server installed on my raspberry with my pc's web browser. I need another solution to control my rpi (not ...
1
vote
2answers
109 views

can someone explain lambda functions? [closed]

I am reading the Python documentation, and learning python. I am on chapter 4.7.5. Lambda Expressions. I am having a tough time understanding how lambda functions are any different than any other ...
0
votes
0answers
42 views

crontab not starting command on reboot

I need a command to run at reboot. This command is called script.sh #!/bin/bash ibeacon scan | /home/pi/test.py This command pipes input to a python program I wrote called test.py. ...
0
votes
1answer
38 views

20x4 LCD with Python - Threading because of different update intervals

I've built a complete home automation system including a LCD display (2004), an internet radio and with 433 Mhz controlling. Unfortunatly I have a small problem with the lcd display. Everything ...
0
votes
1answer
45 views

Python script to conttrol GPIO

I have a very small python script to control GPIOs: pi@raspberrypi ~ $ sudo python gpio-test.py #!/usr/bin/env python try: from time import sleep import os import RPi.GPIO as GPIO ...
0
votes
0answers
77 views

pymodbus rtu rs-485 communication

I have this little device for communication and I can see the dongle after lsusb and it is attached to ttyUSB0 (output from dmesg). Since the module has its driver that is installed to Rpi I don't ...
2
votes
0answers
22 views

Slice of Radio and Ithobox

I've got a Raspberry Pi with Ciseco Slice of Radio and I'd like to control my Ithobox LINK It has an 868 Mhz RF transmitter/receiver and I also have the optional RF remote control unit which I'll be ...
1
vote
1answer
73 views

autorunning a python script at startup not working

I have a script called BOAT.py and it lives in /home/pi/. I want to autostart it at boot and I did a lot of research about doing so. I found many ways but none of them work. I tried writing sudo ...
0
votes
0answers
39 views

Using Arduino .h files when programming in python

I have a working Arduino script that I'd like to clone in Python in Raspberry Pi. The script uses the: #include "U8glib.h" library. I'd like to write a python script that uses this c++ library. ...
0
votes
0answers
19 views

Bluetooth Dongle and Mac iKeyboard

I am trying to connect my Raspberry with the iKeyboard app. thought Bluetooth dongle; so I just.. 1) install bluetooth in Raspbian: sudo apt-get install bluez python-bluez 2) Disable bluetooth ...
0
votes
0answers
27 views

opencv and cv2.so/libcv2.so setup for python

I installed opencv 2.4.8 on my raspberry-pi. But i am not able to locate cv2.so /libcv2.so so that whenever i import i get error as cv2 not found. Is there a way to download theese packages to use in ...
0
votes
2answers
53 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
127 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
33 views

Reliable timed system with low power consumption over rasbpian [closed]

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
58 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
9 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
240 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
83 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
154 views

Pi and Python - Cannot connect to SSL from Pi - works on Win7

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
30 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
76 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
44 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
110 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
81 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 ...
1
vote
1answer
196 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 ...
1
vote
1answer
66 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
68 views

How to prevent python script from running more than once? [closed]

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
45 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
71 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
60 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
30 views

Python sorting JPGS via time problem [closed]

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
71 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
29 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
2answers
123 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
69 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 ...