Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
karrku
/
Skeem_G2
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
ef5116d2
authored
2 years ago
by
karrku
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Delete LihtneTMP36
parent
3a65f942
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
30 deletions
LihtneTMP36
LihtneTMP36
deleted
100644 → 0
View file @
3a65f942
/* TMP36 analog temperature sensor with Arduino example code. More info: https://www.makerguides.com */
// Define to which pin of the Arduino the output of the TMP36 is connected:
#define sensorPin A0
int serialpin = A0;
void setup() {
// Begin serial communication at a baud rate of 9600:
Serial.begin(9600);
}
void loop() {
// Get a reading from the temperature sensor:
int reading = analogRead(serialpin);
// Convert the reading into voltage:
float voltage = (reading * 5000) / 1024;
// Convert the voltage into the temperature in Celsius:
float temperature = (voltage - 500)/10;
// Print the temperature in the Serial Monitor:
Serial.println(reading );
Serial.print(temperature);
Serial.print(" \xC2\xB0"); // shows degree symbol
Serial.println("C");
delay(1000); // wait a second between readings
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment