source: arduino-1-6-7/trunk/fuentes/arduino-ide-amd64/libraries/Adafruit_CircuitPlayground/examples/Hello_CircuitPlayground/Hello_Temperature/Hello_Temperature.ino @ 4837

Last change on this file since 4837 was 4837, checked in by daduve, 2 years ago

Adding new version

File size: 355 bytes
Line 
1#include <Adafruit_CircuitPlayground.h>
2
3float tempC, tempF;
4
5void setup() {
6  Serial.begin(9600);
7  CircuitPlayground.begin();
8}
9
10void loop() {
11  tempC = CircuitPlayground.temperature();
12  tempF = CircuitPlayground.temperatureF();
13
14  Serial.print("tempC: ");
15  Serial.print(tempC);
16  Serial.print("  tempF: ");
17  Serial.println(tempF);
18
19  delay(1000);
20}
Note: See TracBrowser for help on using the repository browser.