Questions tagged [python-3]

Use this tag when referring to the Python 3 language. This can include discussions about specific features unique to the language or perhaps when referring to software that requires Python 3 in order to function. Note that general programming questions are often better suited to Stack Overflow; use this tag only where directly relevant to the Pi.

123 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
0
votes
0answers
219 views

MQTT connection to broker

Hello I would like to configure paho mqtt but I am having trouble to get it to work properly. I am trying to connect my raspberry to external server where broker is up and running. Port and IP are ...
0
votes
0answers
31 views

Gpiozero inside custom function

So I have a odd problem. I have raspberry pi model 3 using gpiozero in python 3. Just trying to turn on the motor at half speed when calling the function. Issue is that nothing happens when ...
0
votes
0answers
792 views

Installing gstreamer on raspian

I am trying to compile gstreamer 1.14.4 to take advantage of the webrtc module. I was able to successfully compile it using cerbero on my raspberry pi but I have an issue where when testing my webrtc ...
0
votes
0answers
100 views

problem connecting with port serial0 for serial comm

I am facing this issue that I can't solve, I've been on this like 3 days and it is really frustrating! I'm trying to test AT commands through port serial0, I've tried it in a python file and when i ...
0
votes
0answers
219 views

pigpio python serial wave output not correct

I am trying to use joan's pigpio to write a serial command on my Rpi 3 gpio 14(UART0TX).My goal is to write a command from the pi to another device. When i send the command i do not see the ...
0
votes
1answer
1k views

Stream Deck Using PI 2

I have a RPi2 1gb. I've recently got a touch screen for it and have decided that I actually should use it for what it was intended for. Programming! So my adventure starts here. I want to make a ...
0
votes
1answer
870 views

Help with choosing a GUI library for RPI developpement

I am currently coding an app for Raspberry Pi, the app is very GUI dependent. During my research i saw online that tktinker is good for small/simple apps. I got really excited for PyQt but found out ...
0
votes
1answer
418 views

Why does a communication over SPI returns garbage?

I am trying to read from a gps module NEO-6M using Raspbery Pi 3 B over SPI. It nicely works with Arduino but it doesn't want to work with Raspberry. I have used different libraries in Pyhon, even ...
0
votes
1answer
206 views

Need assistance hooking up Sharp GP2Y0A41SK0F IR sensor

So I have this... Infrared Proximity Sensor Short Range - Sharp GP2Y0A41SK0F & 1 MCP3002. I have been scouring the web for hours, trying all code examples and I still get 0 as a reading no matter ...
0
votes
0answers
178 views

Motor driving using template matching using python and opencv on Rapberry pi

I want to drive a motor when my template is matched, I have written code of template matching but can't figure out how to drive the motor with it. This is my code: import cv2 import numpy as np ...
0
votes
1answer
220 views

I'm wanting to get user input from a screen, but I can't have any buttons

I'm developing an python3 application that only uses a handheld scanner for input. I need to prompt the user for input and want to use a nice window to do it. When I look at tkinter, it appears that ...
0
votes
0answers
552 views

Raspberry Pi + Mcp2515

I used Raspberry Pi + Mcp2515 with CAN bus. In my code, When I lost request it will locked,then GUI will not working. msg = can.Message(arbitration_id=0x000601, data=point, extended_id=false) bus....
0
votes
0answers
67 views

How to Start program when Pi boots up

I am making a system, in which I need to be able to make the pi autologin and run a python3 script without a monitor or password. The script requires human input from a keyboard, but it doesn't work ...
0
votes
0answers
81 views

Raspberry Pi 3 with Microstack GPS (latest GPS data)

I implemented the following code: gps = microstacknode.hardware.gps.l80gps.L80GPS() while True: data = gps.get_gprmc() print(data.keys(), data.values()) time.sleep(1) After some time it ...
0
votes
1answer
1k views

Hardware PWM for Python 3.5 or higher?

I am developing a camera tracker to follow objects identified via OpenCV in a dedicated environment on mt Pi3. Currently the two SG90 servos are controlled by software PWM using RPi.GPIO - but the ...
0
votes
0answers
192 views

After python3 script run I can't run any program anymore

From time to time when breaking a python3 program I encounter a very strange problem. To illustrate it I have taken the screenshot: Started program works (like the htop in the another terminal window)...
0
votes
1answer
340 views

Dependencies fail to install, cannot install picamera on pi3

When I run apt-get install python3-picamera it fails with different dependency issues like: files list file for package 'libparams-util-perl' is missing final newline or files list file for package '...
-1
votes
0answers
31 views

How to run a python3 program automatically in Raspberry pi 3 - Raspbian Jessie?

Good morning, I'm trying to run a program automatically When the Raspberry log in and shows the desktop, I'd already run a program following this tutorial: https://www.raspberrypi-spy.co.uk/2015/02/...
-1
votes
1answer
41 views

Python program runs with 'python3 progfile.py' but fail to start as service

I installed a python program from a github repo with an automatic script. It is configured to launch itself as a service on startup, and everything seems working fine. I edited the 'py' file to change ...
-1
votes
1answer
201 views

IR sensor program will not run

When I run it nothing happens either in command prompt or the shell. I think I am missing some code line but I got it from a online project and cant ferret out the problem This code is supposed to ...
-1
votes
1answer
135 views

Python urllib won't work from ~/.bashrc

I have the following code in a file called ~/foo.py: import urllib.request url = "https://raspberrypi.stackexchange.com" req = urllib.request.Request(url) resp = urllib.request.urlopen(req) It runs ...
-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 ...
-2
votes
1answer
278 views

How to blink led on Raspberry Pi

I wrote python program that can be blink led on raspberry pi . import RPi.GPIO as GPIO ## Import GPIO library import time ## import Delay library GPIO.setmode(GPIO.BOARD) GPIO....