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
0answers
36 views

NDVI calculation using Pi noir camera

I am an engineering student working on a project based on NDVI calculation to monitor the crop health. I used the PiNoIR camera with blue filter for my experiment in order to obtain the values of NIR ...
1
vote
1answer
264 views

Asterisk and Python communicate in Raspberry Pi?

I'm currently working on a project which is based on RPi and Asterisk. What I Want In my project, I need to get incoming call details like caller ID into python and perform some functions connected ...
0
votes
1answer
379 views

/dev/ttyusb0 cannot be find while starting script on boot for raspberrry pi

(Currently using Raspbian Jessie latest) So currently I am trying to start a script that reads from the rf receiver and gathers the data and sends it over to the cloud... I am trying to start this ...
0
votes
2answers
2k views

play audio stream when bluetooth connects

I have a Raspberry Pi Zero W and want it to use as an Internet Radio. So I wrote a Python script that connects to my bluetooth speaker and starts a stream. Everything works fine, but i always need to ...
1
vote
0answers
151 views

How to install Minecraft full version with Python support on a Pi 4?

After getting a new Pi 4 and launching Minecraft Pi Edition, I have to say it's extremely limited, lacking most of the features that make MC fun. Granted it's abandonware that never made it past alpha,...
1
vote
1answer
5k views

Selenium - Firefox - OSError: [Errno 8] Exec format error

I'm trying to run selenium on a Raspberry Pi 3. I've installed geckodriver and added it to my path. $: which geckodriver /bin/geckodriver echo $PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/...
0
votes
1answer
872 views

Minimize active window

Is it possible in python to minimize an active window by name or by focus state and, if so, how? For example: I have an open Chromium browser and run a script in python and for five seconds my ...
0
votes
1answer
431 views

Lighttpd running FastCGI script hangs and give 500 internal error

I'm attempting to use lighttpd and fastcgi to run a small flask application. When I try to start lighttpd, it starts the server just fine, but when I try to connect in the browser, it hangs without ...
0
votes
0answers
27 views

Basic Python interface to use with UHF RFID reader?

I have a Chinese UHF RFID reader that I'm using with a RasPi for a warehouse tracking project and it came with only a Windows SDK. The dense protocol document they provided in very rough English is ...
0
votes
1answer
320 views

webiopi write to log when button is pushed

Trying to learn the webiopi and python. I have a simple button to turn off and on a relay. Here is the HTML <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/...
0
votes
0answers
15 views

Printing out to 7" monitor for installation using textwrapper + console login

I am working on a project/installation that will be run on a 7" screen. At the moment the project selects a sentence from a txt file and then prints it out using a 'typewriter effect'. I am doing this ...
0
votes
4answers
1k views

boot up rasbian into gui program, no interaction

I have a project I want to do, and I got an SPI touch screen (tontec 3.5") for it. I want to start up into some sort of GUI application. I only have roughly 950mb left on my micro SD (8gb, install ...
0
votes
1answer
284 views

gamepad/joystick-> raspberryPi->nrf24l01->arduino; variable confusion between cpp and python

I'm trying to operate an r/c robot with joystick and a raspberry pi running Debian and an nrf24l01 to communicate the joystick commands to the arduino on the robot. I only really need forward/back ...
1
vote
1answer
49 views

Picam stream video to multiple devices with proxy

I am trying to stream live video from a Pi to multiple devices. Since the Pi is connected to a WiFi with very bad signal, I would like it to only stream to one device (proxy-server). This device ...
1
vote
0answers
17 views

How to lock the gain in picamera.campture_sequence command?

I am using picamera library in python to capture a sequence of pictures. The picamera is connected to a microscope and the microscope moves to different vertical positions and picamera capture images ...
2
votes
1answer
42 views

How to control python code though web page

Currently I am working on a dual axis sun calibration device. Everything was going well so far but I made a huge mistake. Here is what I made so far. I wrote my code in Python 3.8. Libraries I used:...
1
vote
1answer
179 views

Two stepper motors with python

I want to make a motorized rc paddle boat type machine for fun. I plan to use two stepper motors to spin two wheels on either side of the boat. I am controlling it with python. I have a master script ...
0
votes
2answers
284 views

Pigpio belt speed encoder

I'm trying to read pulses from an encoder to measure belt speed. My encoder is 500 ppr. I have approx 2400 pulses per meter and I need to measure speeds upto 450 meters per minute. Can anyone help ...
0
votes
1answer
426 views

Properly installed Kivy on Pi3B won't exit or show mouse/cursor moves

I have set up kivy to where I can successfully launch the demos and even my own hello-world apps on a Raspberry Pi 3B. I have two problems that do not seem to have any good answers on the web at this ...
1
vote
1answer
57 views

Play a defined set of MP3's on defined days

am new to Python and have been struggling to create a workable script for a friends project - am hoping someone can point me in the right direction! The script is to control playback of mp3 files ...
0
votes
1answer
343 views

Keypad matrix 4x4 Python code error

Below is my code The code doesn't work because have this error: :NameError: name 'processKey' is not defined How do I fix this?
1
vote
0answers
36 views

raspberry pi 3 spi issue

I connected MOSI to MISO on Raspberry PI 3 Executed the below code: import time import sys import spidev spi = spidev.SpiDev() spi.open(0,0) print(spi.bits_per_word) print(spi.mode) print(spi....
1
vote
2answers
76 views

Use HC-SR04 Distance Sensor and Relay to trigger the Water Pump - Need help with triggering the pump

I am trying to trigger/stop a water pump with the use of a 4-channel relay and a UC-SR04 distance sensor. I tried with some codes but I think I am missing something because although there was no error ...
0
votes
2answers
393 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

serial errno 25 inappropriate ioctl for device

I have raspberry pi 3 B+ running latest raspbian-strech lite. i have a max485 ic connected to uart on the gpio. import serial,fcntl, struct ser = serial.Serial( port='/dev/serial0', ...
0
votes
2answers
105 views

Configure Raspberry pi to run my application before GUI Desktop

I have created an application through Python that has library dependencies on Qt4, pyqt4, pyqtgraph etc. This application is based on Raspberry Pi, I have developed and finished it on the platform. I ...
3
votes
1answer
470 views

prevent GUI notification for Bluetooth Pairing

Currently, I am trying to control Bluetooth (pairing - connecting - removing ...) with my python code (by accessing to bluetoothctl through pexpect). It actually works fine but I have a problem with ...
0
votes
1answer
51 views

How to hit the “run” button after starting up thonny automatically after boot to Desktop GUI

I try to hit the run button after opening the "thonny python ide" successfully with the following adjustments in /etc/xdg/lxsession/LXDE-pi/autostart @lxpanel --profile LXDE-pi @pcmanfm --desktop --...
1
vote
3answers
317 views

How to display gpsd.utc using paint or similar method

I am receiving reliable gps data from my Adafruit gps sensor. I would like to to show the gpsd.utc data across the screen so that it appears like a regular clock. I have the following code which shows ...
0
votes
0answers
31 views

picamera.exe.PiCameraIOError: Failed to write 291840 bytes from buffer to output <picamera.stream.BufferIO object at 0x62f70c60>

Using the PiCamera Advanced Recipies in the link I am trying to capture the image to a numpy array. My code basic lines of code are. final_image = np.empty((height , width , 3), dtype=np.uint8) ...
2
votes
1answer
53 views

is it possible to get 12 bit(4096) resolution output from pi hardware pwm pin?

I want to produce 12 bit resolution from Pi hardware pwm pin for my project. Please help me to go in right way as I am new to both Python and Pi. import time import pigpio as pi import RPi.GPIO as g ...
1
vote
1answer
175 views

Raspberry pi line follower using camera

I want to create a two-wheeled line following robot. I want to use the camera to detect a black line for the car to follow. I have programmed the wheels so now I need to work on the line detection. I ...
3
votes
1answer
902 views

Not getting a response from a connected PIR sensor

I have a PIR sensor which I'm using connected to a Raspberry Pi 3 Model B as part of a Magic Mirror project. I'm running this module for the sensor. I've had the Motion Sensor working before, but now ...
0
votes
1answer
371 views

Running openCV C++ file from python in Raspberrypi

I'm creating a object and color detection robot. Here in this case, I'm using C++ to run the camera and process the image with openCV in C++, but before I run the Camera, I want the robot to move and ...
0
votes
3answers
3k views

OpenCV 4 error?

When I run the command python faceDetection.py I get the error- VIDEOIO ERROR: V4L: can't open camera by index 0 Traceback (most recent call last): File "faceDetection.py", line 21, in <module&...
2
votes
1answer
104 views

Voice transmission through UART

I want to transmit real time voice signal recorded by usb MIC through uart using Raspberry pi 3b. But by using USB MIC it is not possible for me to transmit voice to uart directly without storing it. ...
-1
votes
1answer
71 views

How to print list of availble networks and connect using python

I have been search for a couple of hours to find a a tutorial on how to show the list of available networks and connect to a network programmatically.I don't want to use command line. I have ...
0
votes
1answer
476 views

NameError:Function not defined

I have a class RelayChannel and I want to call the function RelayChannelOn() to this code but I get error : NameError: name 'RelayChannelOn' is not defined. Here is the code where am calling the ...
0
votes
2answers
433 views

PIR Module False Positivesq

All I am working with a PIR Module and a camera for a project to provide text messaging when motion is detected as well as taking a picture. I am seeing a large number of false positives from the PIR. ...
1
vote
1answer
2k views

Issues with Kivy on Raspberry Pi 3 with 3.5 in Touchscreen

I followed every guide I could find on installing Kivy to Raspberry Pi. My touchscreen works totally fine. Trying to launch various Kivy demos will result in what seems to be a partial launch, but ...
0
votes
1answer
53 views

Connecting Multiple Raspberry Pi to One Laptop

I'm trying to use my laptop to instruct multiple raspberry pi's to take a picture simultaneously. I have a DHCP LAN network which connects to my laptop and raspberry pi through ethernet cables. I've ...
1
vote
1answer
771 views

Connecting 4 HX711 to one Raspberry Pi

I have four individual scales that are each connected to a HX711, those HX711s are each connected to the Raspberry Pi. I'm a beginner in python as well as this Rasberry Pi. how do i properly code this ...
0
votes
0answers
25 views

How to concatenate multiple variables

I have three UV sensors - integers output; one BMW280 - float output (temperature and pressure); and one GPS Module - float output. I need to build a string in this form - #teamname;temperature;...
0
votes
1answer
321 views

Setting up the Raspberry Pi as a client on a sever

I'm attempting to give my Raspberry Pi a static IP address on an ethernet network that I am controlling from a Windows machine. I want to be able to send my PI UDP packets directly from my server via ...
1
vote
1answer
157 views

Error Installing TensorFlow on Rasperry Pi 3 B

I'm following this guide to create an AI chatbot which requires Python 3.6, tensorflow etc. So I installed Python 3.6.8. To install TensorFlow I tried sudo pip install tensorflow I also downloaded ...
0
votes
0answers
45 views

How to configure the RaspberryPi-B1 RFID reader by Eccel?

I am trying to configure the B1 RFID hat on my raspberry pi since it is a cleaner solution than using a USB RFID reader. However I have ran into some issues. Firstly, the documentation supplied by ...
0
votes
2answers
706 views

Python MCP23017 16 ch. I2C input loosing a bit

I bought a MCP23017 and doing some small test with it. I've made a simple Python script to make read_out of pin state. Can anyove explain to me, why i'm loosing a bit when GPIO_A7 is triggered? I've ...
3
votes
2answers
2k views

How to make a Minecraft door in python on Minecraft Raspberry Pi edition

I have tried many times placing a door but all that seems to appear is the bottom half. How do I get the top half? My python code is: mc.setBlocks (10,11,16,10,10,16,64)
2
votes
3answers
941 views

PIR Triggering for no reason

I have a setup with a Raspberry PI model 3 a PIR sensor and a OEM HDTV Pi IR-Camera with two LED modules (pictures below). I'm running a little Python script triggering a camera recording whenever ...
0
votes
1answer
1k views

Wiegand GPIO read not working all the time. Works most times but hangs on some reads

I'm extremely new to Python, I've been learning a bit over the last couple weeks. This is what I've managed to come up with. I'm pretty over the moon the code works most of the time but it doesnt work ...

1 2 3 4 5 52