Create your own IoT platform using raspberry pi and ESP32 (Part 3) ~ ESP32 settings Analog temperature sensor

Since the connection between ESP32 and Arduino was fine last time, connect the temperature sensor and read it serially. The sensor is a product called LM35DZ-N that I had at hand. Apart from the temperature conversion, I was able to monitor it safely with Arduino-IDE.

Next, use Buletooth to link the Raspberry Pi with the ESP32. This is a big challenge as I've never done it (although there are many instructions on Qiita and the Web).

#define LM35DZN 25
void setup(){
    Serial.begin(115200);
    while(!Serial);
    pinMode(LM35DZN,INPUT);
}
void loop(){
  int e=analogRead(LM35DZN);

  float Vout = e/4095.0*3.3+0.1132;
  float temp =(Vout -0.6)/0.01;
  Serial.println(temp);
  delay(1000);
}

Recommended Posts

Create your own IoT platform using raspberry pi and ESP32 (Part 3) ~ ESP32 settings Analog temperature sensor
Create your own IoT platform using raspberry pi and ESP32 (Part 1)
Create your own IoT platform using raspberry pi and ESP32 (Part 2) ~ ESP32 setting L Chika
Create a color sensor using a Raspberry Pi and a camera
Monitor temperature using Raspberry Pi + Alibaba cloud IoT platform
Use Raspberry Pi Python to TMP36 analog temperature sensor and MCP3008 AD converter
Try using the temperature sensor (LM75B) on the Raspberry Pi.
Production of temperature control system with Raspberry Pi and ESP32 (1)
I tried using the DS18B20 temperature sensor with Raspberry Pi
Make a simple CO2 incubator using Raspberry PI and CO2 sensor (MH-Z14A)
Initial settings for using GrovePi + starter kit and camera on Raspberry Pi
I connected the thermo sensor to the Raspberry Pi and measured the temperature (Python)
Production of temperature control system with Raspberry Pi and ESP32 (2) Production of transmission device
Detect temperature using python on Raspberry Pi 3!
Creating a temperature control system with Raspberry Pi and ESP32 (3) Recipient Python file
Using the 1-Wire Digital Temperature Sensor DS18B20 from Python on a Raspberry Pi
Send data from Raspberry Pi using AWS IOT
Easy connection between Raspberry Pi and AWS IoT
Create a visitor notification system using Raspberry Pi
Raspberry + am2302 Measure temperature and humidity with temperature and humidity sensor
Get temperature and humidity with DHT11 and Raspberry Pi
Connect your Raspberry Pi to your smartphone using Blynk
Raspberry Pi and AWS IoT connection program example