Questions tagged [sensor]

For questions dealing with devices that measure the physical world around us and translate it into signals for the Raspberry Pi.

658 questions
46
votes
6 answers

How to measure temperature?

What can I connect to the RPi to measure temperature? I think devices connected to the I²C or SPI would make most sense. Here is a question about DHT-22 and other 1-wire devices. But at this stage it seems that 1-wire is difficult on the RPi due to…
John La Rooy
  • 12,025
  • 9
  • 50
  • 78
26
votes
3 answers

Do I have to connect a resistor to my DHT22 humidity sensor?

I've just bought a DHT22 sensor to connect to my RPi but most tutorials mention there should be a resistor connected between the sensor and the GPIO pin. Is this necessary? Will it work without or will I end up melting something?
Abbie
  • 373
  • 1
  • 3
  • 5
25
votes
4 answers

How can I control Lego motors?

I'd like to find a way to make my Raspberry Pi control some Lego motors, and as a bonus I'd like to make use of one or more optical sensors. Normally, Lego robotics make use of the Mindstorms "brick" controller - this appears to be expensive and…
Salim Fadhley
  • 2,035
  • 4
  • 19
  • 13
25
votes
7 answers

Is soil moisture sensor corrosion normal?

I have a Raspberry Pi project that has three soil moisture sensors. I take a moisture sample every minute. After about a month I started to get bad readings. On further inspection I noticed that my soil moisture sensors were corroded to the point…
Arthur Putnam
  • 353
  • 1
  • 3
  • 7
22
votes
7 answers

Multiple temperature sensors with a Raspberry Pi

I have seen plenty of examples for using one temperature sensor with the Raspberry Pi, however, how can I multiplex 5-6 temperature sensors to a Raspberry Pi? I want to read the temperature from several sources simultaneously. Can I simply assign…
jc303
  • 323
  • 1
  • 2
  • 7
17
votes
6 answers

DS18b20 temperature sensor not listed

I would really appreciate some advice on this. Being a TOTAL noob I have closely followed a guide on the internet explaining how to use a DS18b20 sensor with my Raspberry Pi. The guide is…
Raspnoob
  • 171
  • 1
  • 1
  • 3
15
votes
2 answers

Can I use a One Wire File System through the GPIO?

I have installed owfs (under debian) just to realise the initial setup (1wire) works only through the USB port. owfs is short for One Wire File System . It's a standard for low end sensors, but I'm specifically trying to connect a DS18B20 through…
Christian
  • 1,230
  • 1
  • 13
  • 25
14
votes
5 answers

Can I use a DHT22 as a temperature sensor for my Pi?

Is it possible to use a cheap temperature sensor such as the DHT-22 with the Raspberry Pi? I have found Arduino drivers for this and many similar things, and would be comfortable porting the code to the Raspberry Pi, but my understanding is that…
chrisrhoden
  • 243
  • 1
  • 2
  • 7
13
votes
2 answers

How to use a DS18B20 temperature sensor in my Pi?

I have a few DS18B20 temperature sensors. These are normally used in Arduino projects, but I don't see why not to use them with a Pi. There is a software called DigiTemp that seems to drive the device and I have compiled and installed it on the Pi.…
Tomas
  • 273
  • 1
  • 3
  • 11
11
votes
3 answers

Can I use the 3.3v pin instead of the 5v pin?

I am using a HC-SR04 ultrasonic sensors, and I don't have enough 5V pins on a Raspberry Pi, and I don't want to buy an expander. So is it possible to use the 3.3V pins on some of the sensors? What are the consequences? I'm a beginner, so I won't…
Stephanie
  • 113
  • 1
  • 1
  • 4
9
votes
2 answers

i2cdetect doesn't catch ANY address. How can I tell if I2C working correctly?

I'm having difficulties interfacing the Raspberry Pi to basically any I2C sensor. I've gone through a lot of tutorials on how to get the I2C driver to work and my connections are correct. Still, i2cdetect (Or any I2C based code) doesn't get me any…
Ahmed Farid
  • 91
  • 1
  • 1
  • 2
9
votes
2 answers

Why does the Sense Hat / Astro Pi show the wrong temperature and humidity?

I recently bought the sense-hat , previously called astro-pi. Unfortunately the temperature shows 28 to 31 degrees Celsius from both temperature sensors on the board. They often show around 30 degrees right from the start when the raspberry pi…
ElectroDxvid
  • 121
  • 1
  • 3
9
votes
4 answers

Sensor to detect water/liquid level

I have a swamp cooler that does not turn off automatically when the water level evaporates below the safe level, and if I fail to turn it off even once I could damage it. The sensor simply needs to know if it is A) covered in liquid or B) not…
Matthew Moisen
  • 755
  • 5
  • 11
  • 26
8
votes
1 answer

How to use the water flow sensor with raspberry?

I'm trying to use this water flow sensor with raspberry: https://www.adafruit.com/products/828 I'm using this python code to read the pulses: #!/usr/bin/env python import RPi.GPIO as GPIO import time, sys FLOW_SENSOR = 23 GPIO.setmode(GPIO.BCM)…
Thiago Scodeler
  • 183
  • 1
  • 1
  • 5
7
votes
1 answer

How to Decode TPMS Sensor data through RPi3 Bluetooth

I'm working with a Bluetooth TPMS Sensor (TP630). Here I have some important information about the sensor: Description: ➤ Bluetooth Transmit Power: 0dbm MAX ➤ Processor: 8-bit MCU / S08 core, ARM M0 ➤ Battery capacity: 140mAh (CR1632) Specification:…
fabocode
  • 123
  • 2
  • 2
  • 7
1
2 3
…
43 44