raspberry-pi

Raspberry Pi transmits corrupted data

Raspberry Pi transmits corrupted data Question: I have a Raspberry Pi Zero trying to read GPS data. With this command: sudo cat /dev/ttyAMA0 I get the following correct data: $GPGSV,1,1,0*49 $GPRMC,,V,,,,,,,,,,N*53 $GPVTG,,,,,,,,,N*30 $GPGGA,,,,,,0,00,99.99,,,,,,*48 $GPGLL,,,,,,V,N*64 $GPGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99*30 But in the Python script: import serial import time import string while True: port="/dev/ttyAMA0" ser=serial.Serial(port, baudrate=9600, timeout=0.5) newdata=ser.readline().strip().decode(‘UTF-8’) print(newdata) the …

Total answers: 1

Running Flask App with GUI after boot on Raspberry PI

Running Flask App with GUI after boot on Raspberry PI Question: I’m trying to get a Flask App with a GUI with Tkinter to run on a Raspberry Pi after boot but I can’t seem to get it working. I’ve tried to make it run on boot by putting an sh script inside /etc/init.d/ with …

Total answers: 2

qt.qpa.xcb: could not connect to display localhost:17.0 DIFFERENT set up

qt.qpa.xcb: could not connect to display localhost:17.0 DIFFERENT set up Question: I run my Python code in VSCode on Windows 10 which ssh to the remote RPi 4. Got this error: qt.qpa.xcb: could not connect to display :1 qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/home/pi/mambaforge/envs/mb/lib/python3.8/site-packages/cv2/qt/plugins" even though it was found. This …

Total answers: 1

Writing a python door sensor with telegram bot integration

Writing a python door sensor with telegram bot integration Question: *This is a follow-up question to a previous problem I had writing a similar code, however the telgram-send library that I was using has not been updated since last year and I cannot configure it to make it work with my bot anymore; it gives …

Total answers: 1

Paho MQTT delivers "log: Caught exception in on_publish: 'int' object has no attribute 'topic'"

Paho MQTT delivers "log: Caught exception in on_publish: 'int' object has no attribute 'topic'" Question: I wrote following python script: import paho.mqtt.client as mqtt import Adafruit_DHT import time import ssl import logging logging.basicConfig(level=logging.DEBUG, filename=’/home/user/Dokumente/raspi.log’, encoding=’utf-8′) # Set up DHT22 sensor dht_sensor = Adafruit_DHT.DHT22 dht_pin = 4 # GPIO pin number the sensor is connected to …

Total answers: 1

I can't get Opencv aruco to work on raspberry pi

I can't get Opencv aruco to work on raspberry pi Question: I’ve tried to install cv2 on my raspberry pi and when I run just import cv2 in python it executes fine but when I run import cv2.aruco If it’s relevant, I have a raspberry pi 1b (the original one with 2 usb ports not …

Total answers: 2

VOLTTRON: `python3 bootstrap.py` Does not install all packages

VOLTTRON: `python3 bootstrap.py` Does not install all packages Question: I am in the process of installing VOLTTRON on my raspberry Pi. I came across this VOLTTON installation video and followed the same steps. But my installation is running into some issues: On a Linux machine, as shown in the installation video: It installed all packages …

Total answers: 2

Raspberry Pi No module named Plotly

Raspberry Pi No module named Plotly Question: I have installed plotly on the Raspberry Pi. The objective is connecting to a remote MySql database and plot interactive time-series plots (that would update as the new data arrives into the MySql database). But I am running into no module found even after installing it. Looks like …

Total answers: 2

Suggest faster way to check if a proccess is active or not

Suggest faster way to check if a proccess is active or not Question: I am developing a solution that is a voice chatbot using a Raspberry pi 4 and aws lex due to having many if condition and many stuff to check It takes a little bit of time to reach the recording part that …

Total answers: 1

Servo jittering and not turning fully

Servo jittering and not turning fully Question: I started a project with servos, making a crude robotic arm, with two servos. the issue is, that my servo keeps jittering when stationary, sometimes too much, and can cause the thing to fall over. Also, whenever i enter an angle for the servo to turn to ( …

Total answers: 1