Codebender Example - Sparkfun Electronics SHT15 Hook-Up Manual

Humidity and temperature sensor
Table of Contents

Advertisement

Codebender Example

To get started immediately, here is a Codebender example that uses the
SHT1x library.
SHT15_Basic (https://codebender.cc/sketch:153176?referrer=sparkfun)
Edit
by sparkfun (https://codebender.cc/user/sparkfun?referrer=sparkfun)
1
/**********************************************************
2
SHT15 Example
3
Joel Bartlett @ SparkFun Electronics
4
16 Sept 2015
5
https://github.com/sparkfun/SparkFun_ISL29125_Breakout_Ardu
6
7
This example shows how to get the temperature in F or C and
8
Developed/Tested with:
9
SparkFun RedBoard
10
Arduino IDE 1.6.5
11
12
Connections:
13
GND
­> A2
14
Vcc
­> A3
15
DATA ­> A4
16
SCK
­> A5
17
18
Requires:
19
SparkFun_SHT1X Arduino Library
20
https://github.com/sparkfun/SHT15_Breakout/
21
22
This code is beerware.
23
Distributed as­is; no warranty is given.
24
***********************************************************
25
#include <SHT1x.h>
26
27
//variables for storing values
28
float tempC = 0;
29
float tempF = 0;
30
Loading Boards...
Serial Monitor:
Port:
Once you've uploaded the code, connect using this serial terminal to see
the output.
Clone & Edit
Download
(/?
(https://codebende
referrer=sparkfun)
referrer=sparkfun)
9600
Speed:
Page 4 of 7

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the SHT15 and is the answer not in the manual?

Table of Contents