Last active
March 13, 2019 19:11
-
-
Save tom-a/5c7e5fa1b175a037354cf566459840c8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
気温測定 | |
LM35Zをアナログポートにつないで測定 | |
ARDUINO UNO用 | |
*/ | |
void setup() { | |
Serial.begin(9600); | |
analogReference(INTERNAL); | |
} | |
void loop() { | |
int sensorValue = analogRead(A0); | |
float temperature = sensorValue * 110.0 / 1023.0; | |
Serial.println(temperature); | |
delay(100); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment