Skip to content

Instantly share code, notes, and snippets.

@adamabernathy
Last active April 7, 2016 21:04
Show Gist options
  • Select an option

  • Save adamabernathy/775b57d406bb575b7bd20c4a0b39f389 to your computer and use it in GitHub Desktop.

Select an option

Save adamabernathy/775b57d406bb575b7bd20c4a0b39f389 to your computer and use it in GitHub Desktop.
Arduino Thermocouple
/* Thermocouple */
void setup() {
Serial.begin(9600);
}
void loop() {
int sensorValue = analogRead(A1);
// Convert the analog reading (which goes from 0 - 1023) to a voltage (0 - 5V):
float voltage = sensorValue * (5.0 / 1023.0);
Serial.println(voltage);
delay(1000);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment