Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
0 answers
46 views

Rotary encoder issues

I currently have a 600 p/r encoder hooked up to a pi 4. Seems to work ok, but due to the pi OS (bookworm) it usually misses some counts. From what I read, it seems that there are 2 possible ways to ...
Greg W's user avatar
  • 1
0 votes
1 answer
75 views

Troubleshooting Temp/RH Sensor with RPi

I am working off of a Raspberry Pi 4B. I have recently connected this temperature/RH sensor, but I am having trouble to with the python code. This is the datasheet for the sensor (Pg. 11-18 are most ...
Jack's user avatar
  • 1
0 votes
1 answer
140 views

AS5600 encoder is not reading on Raspberry Pi 4

I'm trying to read the stepper motor angle using the AS5600 magnetic position encoder. I'm using Raspberry Pi 4 and the pinout is the following: VCC to 3.3V , GND to Ground ,SDA to GPIO2 (Pin 3) , SCL ...
welp's user avatar
  • 1
0 votes
2 answers
460 views

BME280 sensor: OSError [Errno 5]

I recently bought a Raspberry Pi 4B along with a BME280 T/P/humidity sensor. I use the bme280 and smbus2 Python libraries to interface with the sensor. For a while it worked pretty well, but yesterday ...
MPA's user avatar
  • 103
-1 votes
1 answer
169 views

Multiprocessing to speed up data acquisition for I2C devices

Here's my situation: I have four FDC1004 devices that I want to have connected to an array of 64 electrodes through four ADG1206 16:1 multiplexers. Each device is slaved to a pi4 using separate I2C ...
Dallon Penney's user avatar
2 votes
2 answers
642 views

HC-SR04 sensor's ECHO pin stuck on HIGH

I have a raspberry pi 4 and a HC-SR04 ultrasonic distance sensor. I want to use it in a raspberry-pi based robot. The other features look fine, the robot can move, et cetera. But my code for the ...
allen546's user avatar
1 vote
1 answer
185 views

Using I2C/SMBus with Sense HAT and Output stays the same

I have a problem while reading the my lsm9ds1 acceleratorsensor registers . It always displays the same values. My setup is a raspberry pi 4 and the sense HAT which has this sensor integrated. I dont ...
Xenoshell's user avatar
1 vote
2 answers
453 views

hc-sr501 goes high every minute

So I bought three HC-SR501 PIR and all of them keep trigging (high) every single 60 second on the dot. I don't know what I am doing wrong. The PIR does detect motion when a person is moving but it ...
Rick's user avatar
  • 11
0 votes
2 answers
657 views

GPIO detects rising edge but does not change status to 1 [closed]

I am really confused: I have a lightbarrier connected over an optocoupler (ACPL-827) with my Raspberry Pi. When the lightbarrier gets triggered (detects a rising edge), it calls the scan-function. ...
deputy-chief-hardy's user avatar
2 votes
1 answer
3k views

How to PID control a heater with SSR, Raspberry Pi and python

I would like to PID control the temperature of a water bath using a RaspberryPi4, a solid state relay (SSR) and a heater (200W, 230VAC) using python. The IVMech library seems a good starting point. As ...
Marco Bobinger's user avatar
0 votes
1 answer
167 views

How to aggregate time-synced data from one RPi to another over bluetooth

I am currently working on a landslide-detection project coded in Python for a research group. At present we have two different sets of sensors running on two different RPis. One RPi has a strain gauge ...
Dakota Vaughn's user avatar
0 votes
3 answers
112 views

Trying to run a python program on boot - error file location?

I have edited rclocal to include this line: python3 /path/to/my/program.py & I used an ampersand as my program has an infinite loop. The program never runs though. The program: import RPi.GPIO as ...
Leon Segal's user avatar
0 votes
1 answer
235 views

Using I2C with MMC34160PJ magnetometer

I'm trying to read data from the MMC34160PJ magnetometer using the Raspberry Pi 4. However, I'm pretty stuck as to how I can do it as there's seemingly no example code or library for it. I have been ...
Frostbite's user avatar
1 vote
1 answer
64 views

I2C Interfacing with HIH6130

I'm trying to read data from sparkfun's HIH6130 Breakout for measuring humidity and temp data. Following this instructable (though without the i2c shield for the pi), the provided python code just ...
Cameron Fuller's user avatar
0 votes
1 answer
524 views

USB GPS dongle doesn't return consecutive GSP traces

I used this USB GPS dongle to retrieve GPS traces of user's trip. Device configuration is successful. pi@raspberrypi:~ $ cgps -s ┌───────────────────────────────────────────┐┌──────────────────Seen 17/...
arilwan's user avatar
  • 141
0 votes
1 answer
549 views

My desktop shortcut won´t execute

I created a GUI that tells me the temperature based on the temperature sensor I connected to the raspberry pi, that works fine, but then, I tried to do a desktop shortcut, and when I click on it, the ...
Gaston cohen's user avatar
1 vote
0 answers
402 views

Trying to plot the ADC values from the PICO similar to what an oscilloscope displays. Just scrolls to the left right now. Total Python newbie

#!/usr/bin/python #Python 3.7.3 # Attempting to plot the ADC values coming from the PICO # Program contains only necessary lines of code for testing plot routine # The Raspberry PI Pico is connected ...
R Bowles's user avatar
0 votes
1 answer
348 views

How to print temperature on nextion screen

I am new to the topic of raspberry and sensors, I am doing a project with a raspberry pi 4 and a temperature sensor DS18B20, I created a small project in python to display the temperature in real time....
Lucas's user avatar
  • 1
0 votes
0 answers
141 views

Raspberry Pi Water Level Sensor doesn't work

I got a question. I'm trying to make a water level sensor to check the water level with Raspberry Pi and a water level sensor using this tutorial. https://kookye.com/2017/06/01/design-a-water-level-...
Mindaugas's user avatar
1 vote
1 answer
318 views

How to open a window with the output of a sensor connected via Bluetooth serial port with Python? [closed]

I connected 3 sensors via Bluetooth serial port to a Raspberry Pi 4 with the following Python program: import socket serverMACAddress1 = 'XX:XX:XX:XX:XX:XX' serverMACAddress2 = 'XX:XX:XX:XX:XX:XX' ...
blt's user avatar
  • 37
-1 votes
2 answers
4k views

DHT 11 sensor not found, check wiring

I am using raspberry pi 4 model b and sensor DHT 11 for checking the humidity and temperature. When I am using the code DHT.py, the result is: 1604263139.922 4 3 0.0 0.0 1604263142.192 4 3 0.0 0.0 ...
omid's user avatar
  • 99
0 votes
0 answers
70 views

RPi and Ultrasonic Sensor

I'm new to RPi and electronics and I have a following problem: I'm trying to make app where I will count how many times a line is crossed. I'm using a Ultrasonic sensor with which I am measuring ...
vm381's user avatar
  • 1
0 votes
0 answers
108 views

Load cell changing over time

I'm using a 1kg load cell beam (see example at bottom) connected to a HX711 board then connected to the Raspberry GPIO. I'm running this Python3 code: https://github.com/gandalf15/HX711/blob/master/...
David B's user avatar
  • 101
0 votes
0 answers
1k views

Powering capacitive soil moisture sensor from 5V Pin

I'm completely new to RPi, and I'd like to make a garden project, at first I would like to measure the soil moisture. I purchased one of these sensors https://www.amazon.com/Analog-Capacitive-Moisture-...
shujaandi's user avatar
3 votes
3 answers
14k views

How can Rpi read the MAX30100 / MAX30102 Oximeter?

I want to connect the sensor max30100 to the Raspberry Pi board.I think everything is accurate.When I run the code, the red light flashes.I activated I2C.max30100 device address 0x57 is detected. When ...
saeed sadati's user avatar
0 votes
1 answer
224 views

PIR sensor shows movement when no movement is present

Completely new in the Raspberry Pi community, so please excuse me if this is a total noob question. Model: Raspberry Pi 4 Model B Component: Adafruit PIR motion sensor I am currently following the ...
KPM's user avatar
  • 101
0 votes
0 answers
98 views

How to call readings from one script that reads a sensor to be used by another script that controls servos

I'm trying to use the readings of the accelerometer of an IMU MPU9250 to control servos. For that I created (with help of resources online) a script(IMUmodule) that reads the IMU and spits out ...
Bernardo Belmar's user avatar
1 vote
0 answers
99 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 ...
shreeja kumbargoudar's user avatar
1 vote
2 answers
606 views

Use HC-SR04 Distance Sensor and Relay to trigger the Water Pump - Need help with triggering the pump

I am trying to trigger/stop a water pump with the use of a 4-channel relay and a UC-SR04 distance sensor. I tried with some codes but I think I am missing something because although there was no error ...
Juye C's user avatar
  • 55
3 votes
1 answer
3k views

5v/12v power source/submersible water pump/RPI/relay. What kind of combination is suitable?

I am using a 12v DC water pump with a 20 l/min flow rate, a raspberry pi 3B and a distance sensor. I would like to use a relay and an external power supply to control turning on/off the water pump. so ...
Juye C's user avatar
  • 55
1 vote
0 answers
282 views

"Attribute Error"- How to display data from distance sensor on lcd display?

I am trying to incorporate LCD display features with the codes that are already written for the sensor. "lcddriver.py" is in "lcd". "distance.py" contains codes for my distance sensor. This is the ...
Juye C's user avatar
  • 55
-1 votes
1 answer
1k views

Distance sensor with 16x2 lcd display- ImportError: cannot import name lcddriver

Happy new year. I am working on a personal project which involves a distance sensor and a LCD display. The distance sensor's data should ideally be displayed on the 16x2 LCD display. The codes for the ...
Juye C's user avatar
  • 55
1 vote
1 answer
3k views

Piezo sensor to pick up acoustic instrument signal using Rpi and ADC

I want to read analog inputs from piezo sensors like these on Raspberry using python, which ADC do you advise me with 8 or more channels and how to wire and program it to get digital values?
Miky's user avatar
  • 155
2 votes
0 answers
43 views

Pin Crosstalk Issue [closed]

I'm working on a quick project with my dad for his condo. He wanted to setup a bunch of moisture sensors around the condo near sources of water (sinks, bathtubs, toilets, etc), which, if triggered, ...
John's user avatar
  • 457
1 vote
1 answer
2k views

Reading Temp/Pressure with a single Raspberry Pi

I would like to be able to read values of two thermal couples and a pressure gauge using my raspberry pi. Recording the data and then sending it to a server at the end of the day. I am using dual t/...
Max's user avatar
  • 13
0 votes
1 answer
1k views

Taking multiple images when Camera is triggered

I have some code that when the PIR Sensor is triggered the camera takes one single images and uploads it to Azure blob storage, taking one single photo is not sufficient but I can't get the Program to ...
M.McCann's user avatar
1 vote
1 answer
406 views

Raspberry Pi PIR motion sensor and camera script dies after loop

I have a simple code for PIR sensor to detect a movement, which works as expected. Code: from gpiozero import MotionSensor import time pir = MotionSensor(4) while True: pir.wait_for_motion()...
Naruto's user avatar
  • 113
0 votes
2 answers
1k views

Camera with speed sensor on raspberry pi? [closed]

im useing raspberry pi 3 with ultrasonic sensor and normal usb camera . so i will connect the raspberry pi to AZURE IOT HUB so ive setted the ultrasonic sensor in a place so if any car pass that place ...
Iker Hameed's user avatar
1 vote
1 answer
2k views

Ultrasonic sensor stops working a few minutes later

I want to get distance continuously using while loop but a few minutes later my code suddenly stops working and doesn't get distance (there is None value in distance variable) I have changed first ...
allentando's user avatar
0 votes
2 answers
1k views

i2cdetect detects device - Pi can't access / find it

Currently I'm working with a gyro-sensor and need to use i2c in order to use it. Using a Pi 3 B (os:NOOBS) on kernel: Linux raspberrypi 4.14.98-v7+ #1200 SMP Tue Feb 12 20:27:48 GMT 2019 armv7l GNU/...
user avatar
1 vote
1 answer
861 views

Trouble accessing Sensirion sht21 though multiplexer tca9548a using i2c and python

I can't reach my sht21 sensor throughout the Multiplexer tca9548a (adafruit). When I run it with python3 in the raspberry pi's terminal, I get this error report: Traceback (most recent call last): ...
Mara 01010011's user avatar
-1 votes
2 answers
205 views

Small pulses - DHT11 relay triger

I'd like to trigger my relay to turn on my lamp when the humidity level measured is greater than 85. Here's the code I've been using. import Adafruit_DHT import RPi.GPIO as GPIO import time sensor = ...
Marcelo's user avatar
0 votes
1 answer
141 views

What are some common software design patterns, when it comes to raspberry pi programming? [closed]

I am kind of confused when I see raspberry pi code for reading sensor inputs, opening lights e.t.c. I am not experienced with python, but I would expect that code is much like in ui programming. ...
Marinos An's user avatar
0 votes
3 answers
1k views

Multithreading/infinite loops affecting sensor values

I run a Python script on my RPi that manages all the sensors on the board and communicates with another machine using TCP sockets. The project gained in complexity and my script now has 5 threads ...
GuiTeK's user avatar
  • 151
-1 votes
1 answer
166 views

At what instances do we use the Board mode and BCN mode in Raspberry Pi?

I know about the two modes of working in Pi using python, Board and BCN. However, I am really confused as to the instances or situations where I should use them. An example demonstrating their use ...
sumitpal0593's user avatar
4 votes
1 answer
2k views

My PIR sensor seems alittle keen to sense things

Before you tell me answers for my issue already exist I'd like to mention that I have checked previous answers and where similar issues have occurred I have tried to use their approved answer. So far ...
Nathaniel's user avatar
5 votes
4 answers
5k views

HC-SR04 randomly stops taking readings

I have implemented 3 HC-SR04 ultrasonic-distance sensors into my hobby-project, and they are working randomly, meaning they sometimes give me anywhere between 1-12 readings from the sensors and then ...
Ctpelnar1988's user avatar
3 votes
0 answers
5k views

How to run multiprocessing in python? [closed]

I am developing a system where I am avoiding an accident by slowing down the motor speed using distance provided by ultrasonic sensor. Also, if accident happens, it must be sense through sw420 and ...
Rishabh Gupta's user avatar
0 votes
0 answers
133 views

python error from RPi.GPIO

Im getting an error "Error waiting for edge" In this script: import RPi.GPIO as io import time from picamera import PiCamera from datetime import datetime #PIR setup pir_pin = 4 io.setmode(io.BCM) ...
glw's user avatar
  • 1
1 vote
0 answers
210 views

Time.sleep() zeroes photo resistor readings on Raspberry Pi [closed]

I have a Raspberry Pi 3 and a photoresistor, LEDs, resistors, breadboard etc. Now, I have observed a strange occurrence. When I run the following code all of the readings from the light sensor are ...
Anonymous Coder's user avatar