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