Skip to content

Commit be7042c

Browse files
committed
Conditionally include Arduino.h for Arduino 1.0 compatibility
1 parent 4a555e7 commit be7042c

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

CHANGES.txt

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
2011-09-20
2+
* Conditionally include Arduino.h for compatibility with Arduino 1.0
3+
14
2010-07-23
25
* Added SHT7x to list of supported sensors.
36
* Fixed temperature offset in humidity calculation.

SHT1x.cpp

+6-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,12 @@
99
* Manages communication with SHT1x series (SHT10, SHT11, SHT15)
1010
* temperature / humidity sensors from Sensirion (www.sensirion.com).
1111
*/
12-
#include "WProgram.h"
12+
#if (ARDUINO >= 100)
13+
#include <Arduino.h>
14+
#else
15+
#include <WProgram.h>
16+
#endif
17+
1318
#include "SHT1x.h"
1419

1520
SHT1x::SHT1x(int dataPin, int clockPin)

SHT1x.h

+5-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@
1212
#ifndef SHT1x_h
1313
#define SHT1x_h
1414

15-
#include "WProgram.h"
15+
#if (ARDUINO >= 100)
16+
#include <Arduino.h>
17+
#else
18+
#include <WProgram.h>
19+
#endif
1620

1721
class SHT1x
1822
{

0 commit comments

Comments
 (0)