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

Platypush: where is the SRC folder?

Trying to get a thermal camera working on my raspberry pi 4. Have installed platypush. Following these instructions and next command is "cd PLATYPUSH_SRC_DIR" But where is the SRC directory? I can't ...
0
votes
1answer
30 views

In Python, how to send data from a Pi to a PC and back over ethernet?

Here is my Pi code: socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) ip = "PC's ip address" port = 5005 serverAddress = (ip, port) socket.bind(serverAddress) socket.listen(1) print("Waiting ...
1
vote
1answer
28 views

Parts of code not running when autostarting script in crontab

I am getting some really strange behavior when trying to run a python script at start up using an sh script in crontab. Here is the python script (it controls wifi lights in my house): #IMPORTS from ...
1
vote
0answers
16 views

Different user login (same 'pi' username) depending on method

I'm just using putty and SSH'ing into a Raspberry Pi If I log in using the hostname "pi@raspberrypi" + password then I get one filesystem/folders. If I determine the Pi IP address using ifconfig,...
1
vote
0answers
21 views

Raspberry pi oled display

I have got a problem with Raspberry Pi and Oled display (128x32). Yesterday I tried and everything was OK, but today when I started working it didn't work. Raspberry Pi detecting i2c device. I'm using ...
1
vote
1answer
13 views

OpenCV camera resolution

I am working on a project with OpenCV. It is running on a Raspberry Pi 3 B+. When i start the camera, and do some visual processing the framerate becomes really low and there is a lot of lag. My ...
0
votes
1answer
11 views

PI Zero SPI info needed for Python

I'm trying to program the SPI in Python but the documentation is terrible. SPI Docs I found some sites that show how to get started but I need to know how to change modes, set clock polarity, and set ...
-1
votes
3answers
40 views

What is simplest Python code to call the begin_time function with the value of time equal to 5 when the launch Button is pressed?

I have the following code: def begin_time(time): print(time) from gpiozero import Button begin = Button(27) I want to call this function with time = 5 Any help would be appreciated
1
vote
1answer
105 views

Trying to code a RFID tag to a MFRC522 chip using raspberry pi but it is not allowing me to read it

Trying to read my RFID MFRC522 using a Mifare blue tag and it is not working. Wondering if i could get any help on this as when i put the tag to read it doesn't show up as quick? using: https://...
0
votes
1answer
26 views

no output from 8 channel relay when i run the python script below

# import GPIO and datetime import RPi.GPIO as GPIO import datetime # set GPIO numbering mode and define output pins GPIO.setmode(GPIO.BOARD) GPIO.setwarnings(False) GPIO.setup(37,GPIO.OUT) #Relay 1 ...
0
votes
1answer
19 views

How can I use copy to/from command in VNC on pi in my python code?

I am working with Raspberry Pi-0. Currently I am copying data from/to windows using VNC button at top. I want to do it using python code i.e I want to access the commands used by VNC on Pi to copy ...
1
vote
1answer
15 views

Python Tkinder Button

i have a promblem with GUI Tkinter, when i click the button of my gui enviroment the arm of my robot dont response more specific call the function but steal remaning in 0 degre``es from the other my ...
-1
votes
0answers
53 views

How to run python fast on raspberry Pi

I have a python application running on Raspberry Pi. Python version: 3.7.3. The application does heavy run-time calculations and therefore runs very slow on the raspberry pi. The application uses ...
0
votes
1answer
27 views

What the difference between 'mac tx' and 'radio tx' commands in LoRaWAN?

I am trying to send a message to my TTN application using ABP encryption mechanism through RN2483 LoRaWAN microchip and Raspberry Pi 3. In this case, I am using ArduPi extension board and enable UART ...
5
votes
2answers
319 views

Autostart Python script doesn't work

I am trying to get my Raspberry Pi to open a terminal and run a Python script when it boots up. I have followed the instructions of some guides and have so far been unsuccessful. My steps I have ...
0
votes
1answer
30 views

symbolic link does not work when using it for cv2.so

I followed a tutorial online for installing opencv4 on raspberry pi. Everything works except when trying to create a symbolic link to my cv2.so. It appears to be working but I can only import cv2 ...
0
votes
1answer
29 views

Python process Memory error

I am running a Python program that is scrapping data so whenever I try to retrieve too much data (I have not been able to scrape files up to 16 MB) the programme crashes. The error: INFO: Got 45294 ...
2
votes
0answers
42 views

Sending an image from Pi Camera continuously to a display

I want to send 6 images per minute from the Pi Camera continuously to any display. Like for say I have the camera that is at my house but I want to send the images to my work computer. The end goal ...
1
vote
2answers
31 views

RGB Led flickers when controlled by GPIO Raspberry

I found a python script to control an RGB LED with GPIO output pins from a raspberry. I connected a common cathode LED to the GPIO Pins and added a 300 ohm resistor to the ground pin. When I run the ...
-1
votes
1answer
30 views

“Outside Function” issue with code when building a Reverse Park Sensor [closed]

I am using a Pi 4 to build a reverse park sensor based on these tutorials: https://forum.core-electronics.com.au/t/raspi-parking-sensor/3736/6 https://www.instructables.com/id/Raspberry-Pi-Park-...
0
votes
0answers
15 views

_curses.error: setupterm: could not find terminal

# import curses import curses # Get the curses window, turn off echoing of keyboard to screen, turn on # instant (no waiting) key response, and use special values for cursor keys screen = curses....
1
vote
2answers
66 views

How to connect to Raspberry Pi remotely using laptop to see camera output

I have just completed my project on an object tracking robot using raspberry pi and I want to be able to view my live video output remotely but I cant seem to find a way how to do it. What I ...
3
votes
2answers
87 views

execute Python file on Systemstart

I want to run a simple python script like: import webbrowser webbrowser.open('http://google.com/', new=2) when the startup progress of my RPI 4 is finished. I tried something like "[How to run a ...
0
votes
0answers
12 views

Frames from picamera.capture have different length of pixels

I am trying to both stream a video with a websocket and to detect wether something is moving in the camera video. I have finished successfully the websocket part of my project, and right now I want to ...
1
vote
0answers
24 views

Uart Communication pi to pi

I first connected two raspberry pi, one is Model 4B(transmitter) and another Model 3 B+(receiver) via Uart. Done all uart enable steps (sudo raspi-config>Interfacing Options>Serial>Serial Interface is ...
1
vote
0answers
27 views

Multiplexer and Python problem on Pi

So I've got a 16-to-1 multiplexer I'm using on the raspberry pi. Right now I've only got one motion sensor attached to it (on channel 15) to test it before i attach and fill up all 16 channels on it ...
-1
votes
0answers
24 views

Selinium Web Driver for Command Line Raspberry Pi

I cannot execute my Selenium script as I cannot install a driver. My raspberry pi is using a CLI so I don't know how to install the web driver on it. Is their a sudo apt link to install one? ...
-1
votes
0answers
33 views

No module named Selenium despite being installed

I am trying to use a RPI with selenium using python. I cannot run my script, as apparently selenium is not installed (despite being installed) see below image. Why is the RPI not detecting selenium ...
0
votes
0answers
10 views

How to set up bluetooth broadcasting on a pi 3 b v1.2

um new to working with bluetooth on linux or on a raspberry pi but i have managed to set up the controllers. What i want to accomplish now is using python to connect or broadcast my raspberry pi as a ...
1
vote
0answers
30 views

Overlay text to a playing video

My project will play a video on a Pi with some buttons attached to the GPIO. What I need is to pop up a menu in response to those buttons, ideally without pausing the video if it's playing. I've seen ...
2
votes
1answer
36 views

Dead SD Card: How do I salvage the python virtual environment on my USB SSD Drive?

Last week, my SD card died. I have a python virtual environment on a USB SSD that required a lot of work. Ideally, I'd be able to reactivate the environment, but it seems that none of my original ...
0
votes
1answer
43 views

Running a python script from a webserver

I made a Webserver using my Laptop and a few PHP-HTML-Javascript programms. Right now i am able to connect to these pages and everything works just fine. My problem is that i want to run a Python ...
2
votes
0answers
44 views

Raspberry Pi Jsch Diconnect Handler

I am using Android Studio "Jsch" package to connect my Android Device to my Raspberry Pi via SSH. The Event "on press" sends a command,which executes a Python file on my Raspberry Pi. This File turns ...
0
votes
0answers
19 views

Interrupt Servo once movement has initiated

I'm new to python and RPis. I'm building my own robot to learn. I manage to control my little robot and move it around, as well as moving the pan camera with my keyboard. While I was searching for a ...
0
votes
0answers
42 views

raspicam slow for real-time usage

I am currently using a raspberry 3 model B and a raspicam version 1.2. I want to use it to detect colour using opencv. I'm taking input using imshow and then using image procesing to obtained the ...
1
vote
0answers
54 views

Connect the Raspebrry pi to WiFi from another device

Is there anyway to connect the raspberry pi to WiFi from another device like from a flask app? I know it's a crazy idea, without connecting to a network I cannot access flask app but I'm just ...
1
vote
1answer
60 views

Controlling Raspberry PI zero device over the internet

I have five Raspberry Pi zero W devices and each device connected to 4 channel relay module. These five devices are in different locations and connected to the internet. We wrote a python program to ...
1
vote
1answer
36 views

Motioneye on Raspbian - Run a Command python script failing

So on my Raspberry Pi with Motioneye (not OS) installed and I'm trying to get the Pushover Notification to work. The problem is on Raspbian I'm not sure where to put the python script. I've put it in /...
1
vote
0answers
29 views

Problem using MQTT: published message will publish but won't receive

I wrote this code for controlling gpio pins everything is ok but i cant turn on or off gpio pins message will publish but it will not turn on or off gpio pins import paho.mqtt.client as mqtt import ...
1
vote
1answer
48 views

Error when trying to read out temperature with gpiozero

I am new to gpiozero. I successfully managed to make some LEDs blink, but I am struggling reading out the CPU temperature as described in the example at gpiozero.readthedocs.io. My code is pretty ...
-1
votes
0answers
38 views

how to detect and track one yellow tennis ball from multiple yellow tennis balls using OpenCV on raspberry pi

I am working on a ball detecting and tracking robot currently using a yellow tennis ball and i got thinking that what if there are multiple yellow tennis balls wouldn't that confuse the robot since ...
0
votes
0answers
22 views

Using Motion Library with pygame.camera

I have a python file that works standalone to take a photo, then post it to an api, but I want this file to be run when motion is detected on my livestream using on_event_start. The file begins as ...
0
votes
0answers
20 views

Why does EmulationStation block GPIO event loop?

I am working on a custom startup script for the Kintaro super kuma 9000 (link is down ATM) case for my raspberry pi 3B+ Here is the minimal example: import RPi.GPIO as GPIO import os import time ...
1
vote
1answer
30 views

Activation of Multiple Webcams Simultaneously for Video Recording (Logitech C270)

I needed two cameras for a project requirement. To test the working of the tow cameras together I wrote a short that goes as follows: { import cv2,os import numpy as np webcam = cv2....
2
votes
1answer
43 views

VL53L1X python library module not callable error

Hello i am trying to interface with my VL535L TOF module, but upon installing the library i am getting an error: File "/home/pi/Desktop/VL53L1X.py", line 3, in <module> tof = VL53L1X.VL53L1X(...
1
vote
2answers
78 views

Read USB RFID via tty1 in Python very unreliable

I have an RFID reader (Neuftech USB RFID Reader, https://www.amazon.de/Neuftech-Reader-Kartenleseger%C3%A4t-Kartenleser-Kontaktlos/dp/B018OYOR3E) that attaches via USB. Via /var/log/syslog I found out,...
1
vote
0answers
45 views

How would I go about writing a program(python) to mimic the use of an AND Gate using Raspberry Pi

How I set up my breadboard: Placed SN74LS08N (AND gate) on a breadboard. Connected IC pin 7 to GND and IC pin 14 to 5 V for IC to get powered. Connected GPIO pin 16 to IC pin 13, Connected GPIO pin ...
1
vote
3answers
5k views

ERROR: Environment '/home/pi/.virtualenvs/cv' does not contain an activate script

I am trying to install opencv 4 on my raspberry pi 4 using these instructions from this website but I have come across an error when I run the command mkvirtualenv cv -p python3. The error is found ...
1
vote
0answers
26 views

Combining programs dht11 and soil moisture sensor

Hey I'm doing a project and I need to combine programs of dht11 sensor and soil moisture sensor..but they're in different directories and their libraries also. I'm not able to run them simultaneously ...
3
votes
1answer
48 views

PiCamera Video Corruption

I'm trying to save video from my picam and it ends up like this: import picamera # set up camera camera = picamera.PiCamera(); camera.resolution = (640, 480); camera.framerate = 24; # record camera....

1
2 3 4 5
52