Temperature Sensor

A temperature sensor measures the current temperature in the air.
Information

Type : Sensor

Mode : Analog

Pins : 0-7 (analog)

Output Values : Value in Celsius (0-40)

Tutorial : funduino

Note: The value needs to be transformed to celsius! See code below.

Image by funduino, CC-BY-SA.

Connection scheme

Scheme made with Fritzing.

Functions

Analog Read

Analog Read State

Reads a analog value and transforms it to Celsius.

void function_0_temperatureSensor(){
int value = map(analogRead(pin_0_temperatureSensor), 0, 410, -50, 150);
function_0_temperatureSensor();
}
  
int value = map(analogRead(pin_1_temperatureSensor), 0, 410, -50, 150);
  
void function_0_temperatureSensor(){
int value = map(analogRead(pin_1_temperatureSensor), 0, 410, -50, 150);
state = 1;
}
  

Last modified April 12, 2022: updated code snippets (e7162de)