The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [python]

Python is a general-purpose, dynamically typed, object-oriented high-level programming language. Interpreters for versions 3.x and 2.x come installed on the Raspberry Pi's most popular operating system distributions.

643 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
0
votes
0answers
83 views

Singular access to the NOIR board from a server and a motion script

I am using the raspberry pi NOIR board to supply a Python motion detection script. This "motion detection script" uses opencv2 to grab, modify and detect motion. I wanted to extend the motion ...
0
votes
0answers
611 views

WiringPi and CGI in Python

I want to be able to toggle a GPIO pin from from a web browser. I've found this forum topic (http://tiny.cc/d1eixx) and even the though code seems fine, it doesn't toggle the pin: #!/usr/bin/python ...
0
votes
0answers
957 views

Sending text on android phone commanded by Raspberry pi USB, WITHOUT internet

I simply want the Raspberry Pi to instruct a mobile Android phone to send a text SMS. The preferred connection to the Pi is via USB. I do not have an internet connection in this configuration. I have ...
0
votes
0answers
3k 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
664 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
0answers
2k views

Does this show PyAudio is unusable with RaspberryPi's built-in audio?

When using PyAudio with the RaspberryPi's built-in audio snd_bcm2835, we get this strange behaviour: python test.py # ... after 10 or 15 seconds the sound is stuttering! This problem doesn'...
0
votes
0answers
460 views

ImportError: No module named HT16K33

When I am importing a library (specifically Adafruit_LED_Backpack using Python3) I get the error ImportError: No module named HT16K33 How do I install that library? EDIT: when using Python 2.7, the ...
0
votes
0answers
492 views

Web based IR/RF device control over long range

I am trying to implement a Building Automation System where I would like to implement web-based or mobile based control of all ir/rf based devices like tv,a/c,sound system, etc. The PI will be placed ...
0
votes
0answers
725 views

Simple Buttons with GPIO, not working

I' following this tutorial to have two buttons working with my Pi. The code I have is the same: import RPi.GPIO as GPIO GPIO.setmode(GPIO.BCM) GPIO.setup(23, GPIO.IN, pull_up_down = GPIO.PUD_DOWN) ...
0
votes
0answers
556 views

Python Syntax Error Hello World

I hope this question is not too open for SE. I wanted to make my first steps with this guide I already found out how to run Idle3 via SSH and that print is now a function. So I wrote print("Hello ...
0
votes
0answers
511 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
187 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
0answers
368 views

Raspbian crashing after servo.stop_servo()

I have a servo connected to my RPi and I try PWM.Servo's capabilities. The program below does what it should - but after execution it crashes system (it doesn't respond to any input, no animations, ...
0
votes
0answers
687 views

pygame.mixer on thread fails with “(pygame parachute) Segmentation Fault”

On the Raspberry Pi, I'm trying to play some sounds using pygame.mixer and am having a problem when playing them on any thread other than the main thread. For example, I have a keypad hooked up and ...
0
votes
1answer
536 views

ShiftBrite - running on Python

I was wondering if anyone can help me out with converting the example Shiftbrite Arduino code into Python so I can run it on my RPi. Here is the example code in question: int datapin = 10; // DI int ...
0
votes
1answer
108 views

How to make a simple GUI?

I recently had follow this tutorial which basically is about making your raspberry pi send email notification every three seconds on the location of your device. The thing that is missing now is, I ...
0
votes
1answer
246 views

USB RS232 turn on/off beamer

I'm streaming a video to a beamer. But I want it too turn it off after office hours. I found /opt/vc/bin/tvservice -o and /opt/vc/bin/tvservice -p to turn off the screen. But that does not turn off ...
0
votes
1answer
475 views

Controlling High voltage devices with Raspberry Pi

Can I control high voltage (here 5V) to power a led lamp and a fan(both operating at 5v) from Raspberry Pi GPIO only using a transistor . Or should I isolate both the circuits using a relay or octo-...
0
votes
2answers
359 views

Control Raspberry Pi to control an Arduino over Apache

I want to control a Raspberry pi to control an arduino which is controlled by a webpage hosted by apache. I do not know how I would attempt this and if it is even possible. Can anyone please guide me ...
0
votes
1answer
2k views

I can't install anything with pip

Every package I try to install using pip, I get this error. I already updated the pip but even so doesn't work my pip version is 9.0.1 Exception: Traceback (most recent call last): File "/usr/...
0
votes
1answer
767 views

MPU6050: Two sensors receiving same data

I am using the Raspberry Pi 3 Model B to read in two MPU6050 sensors at the same time. I faced some initial problems in setting up everything but now I am able to read in data relatively fast. My ...
0
votes
1answer
80 views

I am trying to turn on a led using a switch in Raspberry pi. Now when I am trying to run it in python command shell it says: command not found

import RPi.GPIO as GPIO GPIO.setmode(GPIO.BCM) GPIO.setup(17,GPIO.IN) input = GPIO.input(17) while True: if (GPIO.input(17)): print("Button Pressed") import time prev_input = 0 ...
0
votes
1answer
232 views

Is this normal for a pin diagnostic?

I'm trying to do the simple hello world of the pi world. I have been having problems actually turning pin 7 off. I tried moving my rib position in the socket (flipping the white side facing the sd ...
-1
votes
0answers
21 views

speedtest-cli: download speed 0 Mbit/s

I used a small python script to monitor download speeds at different times. I deactivated it for some weeks and wanted to start again today. Before I run my script I wanted to test if everything is ...
-1
votes
1answer
52 views

Creating a Day Counter

Does any one know the best way for me to make my PI count the days since an action was performed and display the value every day, I basically want my pi display to tell me how many days have passed ...
-1
votes
1answer
219 views

Unable to run python script on boot

I wrote a script for object detection and if I establish ssh connection to Raspberry Pi and run it from console, everything works fine. As I would like to start the script automatically on boot, I ...
-1
votes
2answers
645 views

How to run a python program from a bash script on startup?

I have a python script that is located at /etc/testscripts/WebServer. I call this usually from the command line by calling sudo python3.6 /etc/testscripts/WebServer. I have a bash script that looks ...
-1
votes
1answer
1k views

How to remove the kill prompt of a python script?

I have a python script that uses Tkinter, the quit button I have implemented pops up a prompt on the python shell after pressing it, which it didn't do on Windows when I wrote the code and tested it. ...
-1
votes
1answer
261 views

raspberrypi - on boot not running my infinite python script?

I have a Python script, which needs to run 24/7 to use GPIO high/low. So on boot i wanted it to run as below. But it never works to run python script on other hand it does create /tmp/test file? How ...
-1
votes
1answer
430 views

How could I use Wit.ai to get speech to text on my webpage running python script

I want the speech to be recorded by raspberry, send it to wit.ai and then get the response on my page(wich is actually the .py script and according to which I could run my conditions). Actually its ...
-1
votes
1answer
3k views

Reading all channels MCP3008

I have a problem with reading data from adc convertor MCP3008 10bit. I found a python script from adafruit that give data value from all channels (CHO TO CH7). I added a picture with my results and ...
-1
votes
1answer
167 views

Adafruit's LCD doesn't show text

I've just written small python script to operate adafruit's lcd with additional module. Almost every lcd's operation is handled by module. But when I try to print a message on screen or in console, ...
-1
votes
1answer
368 views

Use Pi 3 With Waveshare 3.5" and MFRC522

This message showed up when I was using MFRC522 along with Waveshare LCD 3.5"(A) on Raspberry Pi 3: python Read.py can't open device: No such file or directory Aborted I think it's because SPI is ...
-1
votes
1answer
2k views

Connecting to bluetooth speakers headlessly

Background: I have a Pi Zero that I want to send music to my bluetooth speakers. This works nicely when I have a monitor and can use bluetoothctl to pair and trust my speakers and the volume-adjuster'...
-1
votes
1answer
42 views

Newbie python issue

I'm trying to write some code to drive a Sense Hat ' I want to use an LED line to indicate the temperature, then scroll it up over time. The sense.set_pixels function expects a list of 64 RGB lists, ...
-1
votes
1answer
932 views

Will an automated scp script share files between Pis without Passwords?

I am planning on sending some files within an Ad-Hoc network of Pis. Build Raspberry Pi - 2 Model B Debian Wheezy 7.10/7.11 I am planning to run a cron job between the Pis in vicinity. Through ...
-1
votes
1answer
639 views

Error message every time I try to install applications

Error processing line 1 of /usr/lib/python2.7/dist-packages/gtk2-2.0-pysupport-compat.pth: Traceback (most recent call last): File "/usr/lib/python2.7/site.py", line 162, in addpackage if ...
-1
votes
1answer
143 views

can't work xx.py using crontab

I can send the value to domoticz but the problem is that it just changed when I use the command sudo python distance.py I have added * * * * * /usr/bin/python /home/pi/domoticz/scripts/...
-1
votes
1answer
193 views

Python Face Recognizer Error

I got this error during compilation.
-1
votes
1answer
112 views

Piezo sensor to pick up acoustic instrument signal using Rpi and ADC

I want to read analog inputs from piezo sensors like these on Raspberry using python, which ADC do you advise me with 8 or more channels and how to wire and program it to get digital values?
-2
votes
0answers
29 views

Refresh Tkinter GUI

I'm using tkinter and trying to make a gui that will display data and refresh, however the master.after function is not working as intended. Wondering if anyone can tell me why. My goal is to have the ...
-2
votes
1answer
45 views

Start program when a device connects to local wifi

I'm looking for a python program that could detect when device has connected to a local wifi and start a specific program. And would communicate via SMS with raspberry pi.
-2
votes
1answer
40 views

Run a fan 5scs long GPIO

def fan_on(): GPIO.setwarnings(False) GPIO.setmode(GPIO.BCM) FAN_PIN = 23 GPIO.setup(FAN_PIN,GPIO.OUT) GPIO.output(FAN_PIN,True) This is my code to run a fan on my rpi via GPIO ...