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.

Filter by
Sorted by
Tagged with
0
votes
1answer
5k views

Auto Start a .py file with LXTerminal [duplicate]

I want to start a .py file after booting with LXTerminal. I'm using raspbian OS I try these steps: I edited sudo nano /etc/xdg/lxsession/LXDE-pi/autostart with @lxterminal and this is open ...
0
votes
1answer
483 views

Python as web server cgi and request response cycle

I am new to python and I am trying to design a mobile app with a web server on a raspberry pi. I decided to write the server code using python because I want to control some pins and write on the ...
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
2answers
105 views

Extend my project to multiple remote Pis

My project is a home security system. Until now everything is embedded on one device. But I would like to use multiple Pi's, for example RFID reader on different spots without the need of cables. The ...
0
votes
0answers
615 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
964 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
1answer
2k 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
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
670 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
471 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
1answer
695 views

Running a python simple script at startup/boot [duplicate]

Can anyone please help me to run a simple python script at start up? (for eg. let the script print hello) please explain me step by step,,,starting from basic steps! I tried many examples using ...
0
votes
4answers
3k views

How To Start Learning Python For Raspberry Pi? [closed]

I have old version of Raspberry Pi (Revision B) and now I am planning to create a robot with it. However, I don't know python at all. I want to learn python but haven't found any tutorial that teaches ...
0
votes
0answers
495 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
1answer
758 views

GPIO Connections

I would like to use raspberry pi for measurement of Temperature,Humidity,Motion, soil moisture & distance. I would like to add three led indicators. I'll be using following sensors 1) DHT-11 ...
0
votes
2answers
421 views

sleep() affecting only one certain output

the topic name might seem a bit chaotic, but I'm struggling to describe in one line what I mean. I want to create a python script that plays different sounds when certain button is pressed. So far I ...
0
votes
2answers
3k views

Good way to start python script at startup with automatic restart if it crashes? [duplicate]

I've edited my rc.local to start my python script when the Pi boots up (like here). How can it be done to restart the script automatically if it crashes? It would be best if a re-start would be ...
0
votes
0answers
759 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
557 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
1answer
2k views

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

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
1answer
214 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 rpi'...
0
votes
1answer
2k 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
513 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
1answer
217 views

How does Raspbian depend on Python2.x?

I've written a Python3.x code on a PC (win 7) in order to read out temperature data from an external measurement unit (using basically pyserial & Matplotlib). I want to port this program on a ...
0
votes
0answers
369 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
693 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
3k views

Problem reading text file using Python ftplib on Raspberry Pi [closed]

I have been trying to read a simple two line text file from a remote server using ftplib. The simple script shown below works fine from my Ubuntu laptop but will not work from my Raspberry Pi's. #! /...
0
votes
0answers
31 views

How do I run my PiGlow [duplicate]

After following the steps on this page. I did everything correctly and when I try to run the test.py file it says this: Traceback (most recent call last) : File "test.py" , line 9, in <...
0
votes
1answer
265 views

Pi Glow programming [duplicate]

After following the steps on this page https://github.com/Boeeerb/PiGlow. I did everything correctly and when i try to run the test.py file it says this. Traceback (most recent call last) : File "...
0
votes
1answer
271 views

Display board using raspberry pi

I have to make a display board using raspberry pi. The display board will be showing some sort of counter and 1920x1080 32 inch LCD screen will be used for display. Thus I have decided to use pygame ...
0
votes
2answers
422 views

Pygame screen resolution

I creating a data logger program in Python for a customer. I use pygame for displaying status and temperature. We plan to using a car display on the composite video output. The display will have ...
0
votes
1answer
2k views

Web Interface to Control Robot Arm attached to Raspberry Pi - HOWTO?

I'm currently working on a project to hook up a robotic arm & webcam to my Raspberry Pi and control said arm through a web inteface. I believe the technical work here involves: Connecting the ...
0
votes
1answer
538 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
2answers
111 views

I2C MPU9250 Gyro/Accelero/Magneto 9-DOF Sensor MicroPython Programming Problem

so I've recently set up my raspberry pi. Am following a tutorial for the MPU9250, from https://github.com/tuupola/micropython-mpu9250. I have did a install of the micropython-mpu9250, and tried the ...
0
votes
2answers
205 views

How to find available space and free space if low [closed]

I need to programmatically be able to see how much space is left on the SD card and if it is low delete some files. I'm not sure how to go about getting the value of the SD card space and then saving ...
0
votes
1answer
119 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
2answers
2k views

Host a website on the raspberry pi to display local sensor data [closed]

I have been enlisted by the local engineering club (as a programmer myself) to help with their hydroponics project. Basically they are needing help accessing the Pi remotely and this is as much as i ...
0
votes
1answer
254 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
520 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
367 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
2answers
788 views

Some Kivy apps not running in Raspberry Pi - Python

Currently I have a Raspberry Pi 1 Rev2 model B and a Raspberry Pi 3, I'm developing an app that could check dynamic values from several screens, I'm using a 7inch LCD Screen to look the graphics ...
0
votes
1answer
703 views

How can I download and install Numpy and Pandapower? [duplicate]

How can I Download and install numpy and pandapower on the RASPBIAN JESSIE LITE Minimal image based on Debian Jessie? the one without the GUI. And how can I download and install Pip and miniconda on ...
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
793 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
3answers
2k views

How to control a python script over a local web server?

I am starting a project on my raspberry pi in which I am trying to control a servo hat (pimoroni pan tilt) from a web server. How can I host a Lan website from the pi, then control parts of a python ...
0
votes
1answer
83 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
241 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 ...
0
votes
1answer
693 views

Gstreamer player dont play

I've made basic gstreamer player: import threading import gst import gobject class BasicPlayer(threading.Thread): def __init__(self, musiclist): threading.Thread.__init__(self) ...
0
votes
3answers
3k views

Launch python file and run continually at start up and reboot

I cannot seem to get any of the options out there to work. I am trying to auto start a py file when the Raspberry Pi boots up. I need it to stay open and running continuously as it detects knock ...