All Questions
119 questions
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 ...
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 ...
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 ...
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 ...
-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 ...
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 ...
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 ...
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 ...
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. ...
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 ...
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 ...
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 ...
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 ...
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 ...
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/...
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 ...
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 ...
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....
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-...
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'
...
-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
...
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 ...
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/...
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-...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
-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 ...
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?
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, ...
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/...
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 ...
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()...
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 ...
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 ...
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/...
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):
...
-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 = ...
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.
...
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 ...
-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 ...
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 ...
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 ...
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 ...
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)
...
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 ...