Skip to content

Instantly share code, notes, and snippets.

/a.cpp Secret

Created March 14, 2016 09:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/c8a1030e5c13668f7deb to your computer and use it in GitHub Desktop.
Save anonymous/c8a1030e5c13668f7deb to your computer and use it in GitHub Desktop.
void loop() {
if (sensors.available())
{
if (Serial.available() > 0)
{
while(Serial.available() > 0)
Serial.read();
for (byte i=0; i<SENSORS_NUM; i++)
{
float temperature = sensors.readTemperature(FA(address[i]));
Serial.print(F("#"));
Serial.print(i);
Serial.print(F(": "));
Serial.print(temperature);
Serial.println(F(" 'C"));
}
}
sensors.request();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment