Currently, I’m trying to program the absolute encoder AMT222A-V on python using Rspberry Pi 4 B. I found an Arduino SPI Sample Code Tutorial , and I tried to interpret it in Python, word for word. You can find the code down below : import time import RPi.GPIO as GPIO import spidev import math import ..
I have a project in which I use a rq worker in conjuction with tensorflow to predict the genre of songs recorded on a microphone (Raspberry pi4). The problem is: when i use the function to predict the genre i get an error on the rq worker that says: 2021-09-13 10:49:30.246680: E tensorflow/core/platform/hadoop/hadoop_file_system.cc:132] HadoopFileSystem load ..
I am working through some LED tasks on my raspberry pi 4. I have the following code and I am getting the output on the breadboard wrong, which mean the code is faulty. Since I set the ‘previous_button_state = 0’, this would mean only the first ‘if’ would be executed (red LED). Since the previous_button_state ..
I am trying to install PyCharm on my raspberry-pi 4 but i get this error: ERROR: Cannot start PyCharm: No JDK found and i also tried: sudo apt install default-jre but im still getting the error Source: Python..
I am using a pyautogui to automate stuff with my raspberry pi 4 and I wanted to run the python program as soon as I boot in my raspberry pi The code that I used is: sudo nohup python3 main.py & All my other programs who doesnt have the pyautogui package of python execute properly ..
I’m attempting to host a personal discord bot, and I want it to launch on boot. I have set in raspi-config to wait for network before proceeding with boot, and I see that the script was at least started. Despite that, my bot remains offline. Here is my bash script for it. I can run ..
I’m trying to figure out why the following script is working when I launch it with pi user on my raspberry and not with root user. Goal: It should open Chromium full screen, and log into the website. With root user, it opens the web client and doesn’t display anything. Screen is white, and it ..
While uploading data from various sensors and GPS coordinates using SIM808 to AWS, we are getting this error after it uploads few rows. We are not running any other code but still, it gives multiple access on port error. We are running it on RPi 4 8GB/4GB and RPi 3B+. Data inserted successfully! **Traceback (most ..
I am trying to build a image in my RaspBerryPi 4 with raspbian. I want to make a docker image that run a python Image: my directory is: analizador_doff | tarea_periodica.py | Dockerfile | requirements.txt my dockerfile is: # syntax=docker/dockerfile:1 FROM python:3.9 WORKDIR /analizador_dof ENV PYTHONUNBUFFERED=1 COPY requirements.txt requirements.txt USER root RUN pip3 install –user ..
I’m using Raspberry pi 4 with linux kernal version 5.10.17-v7l+. The issue is with respect to the file operation on autorun. I’m using another python file to write into the the created file and I’m importing that file to the main python file and performing the write operation as shown below. path = os.path.abspath(__file__) dir_path ..