Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

1
vote
1answer
112 views

Why does my raspberry pi zero w crashes when controlling a DC motor with an L9232D and a 9g Servo motor?

I use this simple circuit to control a DC motor with an L293D, and a 9g servo motor with a Raspberry PI Zero W: I use the simple following code to test the circuit: from time import sleep import RPi....
3
votes
0answers
190 views

Accelerated Numpy on Pi 3 B+

I'm looking to do some work with NumPy on my Pi 3 B+, and I'm not sure what the deal is with optimization, blas, etc. I installed libatlas using: sudo apt-get install libatlas-base-dev Following ...
2
votes
0answers
262 views

Difference between Thonny and Python 3 (running some code)

I'm just starting with the pi and to be more clear I'm spending time working with the Raspberry Pi Workshop for Beginners series on Youtube.To write an run code we use the Python 3 IDE but I don't ...
2
votes
0answers
508 views

Enabling I2C resulting in error Raspberry Pi

I am trying to use MPU 6050 on raspberry pi. For that I enabled i2c on raspi. But after that whenever I am trying to check the modules on my Python 3 or 2 shell for e.g. when I run help('modules'), I ...
2
votes
0answers
1k views

Segmentation fault, running out of memory? PyQt5

I am programming code to display camera feed with my raspberry pi 3 and Raspbian. Strangely, sometimes the code shows the video and sometimes i get the Segmentation fault error. I used gdb to find ...
2
votes
0answers
3k views

Want to Read COM Port Data and Write into TKinter Text Window

Using Python3, I want to read data on a serial port and display it into a tkinter GUI text window (not only the shell). Pretend I am trying to make the equivalent of a serial port character display. ...
1
vote
0answers
42 views

Pi-3, Model B, SenseHat - How can I restart my code while it's active.?

I am new with python and PI. I have been looking all over for information about this but with no luck. currently it works like this: I start the program, I press the button and then it starts counting ...
1
vote
0answers
63 views

Send data BMP180 between client and server trought module socket

I would like to send data of BMP180 sensor between a client and a server with two raspberry pi 3 being that the client when executing the command get the server will give the temperature value to the ...
1
vote
0answers
310 views

usb.core.USBError: [Errno 13] Access denied (insufficient permissions)

I am running Rasbperry pi and have the pyusb module installed. The printer is Bus 001 Device 004: ID 0fe6:811e Kontron (Industrial Computer Source / ICS Advent) Parallel Adapter, and it's idVendor and ...
1
vote
0answers
84 views

Python 3 Debugging Symbols for Raspbian Stretch

I am trying to track down a segfault when using Pip on my Raspberry Pi Model 3B running Raspbian Stretch. I've configured the pi to do a core dump, and I've gotten gdb to load the core. The ...
1
vote
0answers
30 views

Raspbian Python Package installtion errors, Parselmouth

I am trying to install this package, praat-parselmouth, however the installation does not move forward after getting stuck at either "Running setup.py bdist_wheel for praat-parselmouth" or if ...
1
vote
0answers
426 views

How can i emulate a ps/2 keyboard with raspberry pi3

So I am working on an medical machine which runs on microcontroller(So,No OS).It gets the input from ps/2 keyboard. I would like to automate it. I would like some basic idea and some help on how to do ...
1
vote
0answers
249 views

Block Raspberry Pi from quitting fbi fullscreen (HDMI) to command line

I'm developing a parking control system in Python 3 which runs in headless mode at the Raspberry Pi startup and uses one RFID reader, one Barcode reader and many other devices but they really don't ...
1
vote
0answers
317 views

I keep running into missing elements with GStreamer

I have tried uninstalling and reinstalling GStreamer on the Raspberry Pi 3 and I keep finding that I have missing elements. This is the Pi on Log Level 4 (GStreamer): This is my laptop, running ...
1
vote
0answers
397 views

IR Tracking Sensor (TCRT 5000 ) always gives led off as output

I am using a Raspberry PI3 Model B and TCRT 5000 sensor to monitor movement. I am using a Python script(Python3) to read the data from the sensor. Script used - #!/usr/bin/env python import RPi.GPIO ...
0
votes
0answers
12 views

SSLError while trying to install pip for python3.4 on Raspbian-Stretch (Armv7l)

The issue is that I have a tensorflow .whl targeted towards python3.4 but by default on raspbian-stretch python3.5 is installed so I installed python3.4 python3.4-dev using apt-get. After that i ...
0
votes
0answers
10 views

Pygame initalisation for TFT on /dev/fb1 only succeeds as root

I connected a 320x240 TFT to my Raspberry Pi A+ running Raspbian stretch via SPI and set it up as fbtft_device. It shows up in /dev/fb1 and I can write images to it via pygame. I initialize it like ...
0
votes
0answers
22 views

How can I install/use smptlib in Python 3.x with Thonny

I have got this response. I have no idea how to avoid it: Traceback (most recent call last): File "/home/pi/Franz/email3.py", line 2, in <module> import smtplib File "/usr/lib/python3/...
0
votes
0answers
27 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
16 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
32 views

Not able to install the latest version of Scipy(1.2.0) on Raspbian

I have Scipy version 0.18.2 on my RaspberryPi 3. However, I need the find_peaks() function which is only available on higher versions. I followed this link to install scipy. But the python3 setup.py ...
0
votes
0answers
58 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
54 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
27 views

DC Motors Not Moving, Programming or Wiring Error?

I got a Raspberry Pi 3B, That ive hooked 4 DC motors up to (with a motor controller of course). I run the program and they do not move, i cant figure out if im missing something or wired something up ...
0
votes
0answers
18 views

Is it possible to use half the screen as touch screen and the other half as a waveform display pane?

I am using waveshare 3.5 inch RPi LCD (A). Is it possible to use it as just a display for waveforms and half the screen of it responsive to the touch?
0
votes
0answers
79 views

Running python in PHP shows error. -sudo: no tty present and no askpass program specified

I want to run a python script to turn an led on from PHP. The script did not run. I used echo to print the error. It said "sudo: no tty present and no askpass program specified". What should I do? ...
0
votes
0answers
20 views

Rpi stops giving encoder data

I am again reposting my question. I am working on a hobby project and I have written the code to take encoder data and calculate the motor RPM which works fine. But sometimes it is very strange that ...
0
votes
0answers
63 views

Running the Waveshare DAC with Python

I've been working on setting up and using the Waveshare High Precision AD/DA. I have it set up but I can't seem to figure out how to use it with Python as it seems to be rather poorly documented. (It ...
0
votes
0answers
100 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
0answers
15 views

Rasberry Pi and Sim900A. Trouble with phone calls

First of all I apologize for my English) I connected Raspberry Pi 3 b with sim 900A correctly as many suggests. My sim900A has its own power supply with 2A/5V Task was to take phone calls ...
0
votes
0answers
84 views

Reading Input of tty in python

I'am looking for some support. For my project I need to read the input of ttyP0 (an extra module of my Raspberry Pi) when I open the terminal and press Screen /dev/ttyP0 [19200] I can read the output ...
0
votes
0answers
78 views

How to change the text colour by RGB LED Dot Matrix on Pi3 (Using APA102 strip)?

I am using python3 to control APA102 library with RGB LED on Raspberry Pi 3 B+. Currently, I can display the text and emoji on 32x32 LED Matrix. However, I do not know how to change the text colour ...
0
votes
0answers
239 views

Python program works using Thonny, but fails from command line

When I execute the program after opening with Thonny on the Raspberry, the program will run and execute with no issue. It will also execute when I tell it to "Execute in Terminal", when double ...
0
votes
0answers
23 views

Barcode and Ardunino IR receiver

We are using our barcode scanner as basically a keyboard. Therefore when it scans the barcodes it just prints the numbers associated with that barcode. With that, we are now trying to make our barcode ...
0
votes
0answers
314 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
1k views

Raspberry Pi zero Bluetooth Programming with Python

I have connected my galaxy on7 with Raspberry pi zero's bluetooth onboard.i could connected pi with my phone. In my phone i installed blue term(terminal).The problem is not my code(python) running on ...
0
votes
0answers
213 views

Switching between two cameras fails after resolution change from 640x480 to 1024x768

I have 2 cameras (1 - Kayeton KYT-U200-R01 and 2 - similar one but for IR) running on my Raspberry Pi 3. Everything worked fine but suddenly after resolution has been changed from 640x480 to 1024x768 ...
0
votes
0answers
60 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
55 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
0answers
442 views

''Unable to connect to X server" error, using xinput

I have a python3 script, intended to run at boot using rc.local. The script is for multimedia purposes, uses omxplayer and GPIO pins. Im using WaveShare 7In HDMI LCD as the display, with the ...
0
votes
0answers
568 views

PyQt5 on Raspberry Pi 2 Model B

After viewing the answer here I decided to ask the same question two years later: how can I install PyQt5 on a Raspberry Pi 2 Model B? I also followed a few other threads (like this one) which ...
0
votes
0answers
145 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
0answers
609 views

camera.capture() do not work - the image is hang up

I have a problem with simple code in python to capture the image, below you can find the script: from picamera import PiCamera from time import sleep camera = PiCamera() camera.start_preview() sleep(...
0
votes
0answers
311 views

Direct control of GPIO pins using gpiozero without using Button or LED interface

Using gpiozero, is there a way to directly control the GPIO pins of the Raspberry Pi? I know gpiozero has objects such as Buttons and LED for input and output. However I would like to access the pins ...
0
votes
0answers
35 views

How can i use the camera module V2 to see where my robot going and also use it for taking photo and video

I want to use my picamera whit python to see where my robot going and i want to use the camera also to take picture and video. The problem is that I don't what is the best way to do so. My plan is to ...
-1
votes
0answers
24 views

real time voice to qrcode using pyhton

How to convert audio signals to QRcode using raspberry using python.I want to record the voice using a microphone and convert it into QRcode.When I scan the QRcode the audio should be played.I have ...
-1
votes
0answers
44 views

Using Python smbus to communicate with Smart Battery

Getting I/O errors when using Python 3 smbus module under Raspbian to retrieve (read) data back from a laptop Smart Battery. A similar program coded in C for Arduino works perfectly with this battery. ...
-1
votes
0answers
38 views

Flask/Apache running @app.before_first_request twice

I have my raspberry pi running flask/Apache. I have a background task that I run using multiprocessing. (I know celery does this, but I just wanted something simple). My issue is that the background ...
-1
votes
0answers
53 views

GSM/GPRS SIM800L working in England,UK

I am from England and I am using SIM800L Module for sending the SMS. My module is not connecting with the network. I don't know what's the issue, I wanna know whether this module (SIM800L) works in ...
-1
votes
0answers
47 views

AttributeError: ge_add_event_data

I get this error when i try to import pynput to control my motor using keyboard: Traceback (most recent call last): File "/home/pi/.local/lib/python3.5/site-packages/Xlib/display.py", line 224, in ...