Compile errors: "HIGH" "LOW" "digitalRead" are "not declared in this scope"

I’m using an example straight off of the playground to display temperature and humidity readings from a Sensirion SHT75 sensor. All of this code is straight out of the playground, only difference is modified the numbers on the pins. I also changed Sensirion.cpp to show “Arduino.h” where it used to say “WConstants.h” – I’ve even tried (as it suggested on the playground) commenting out the WConstants declare and declaring Arduino.h south of that a few lines. What in sam hill is going on around here?

Here is the code for the program proper:

/*
 * Query a SHT10 temperature and humidity sensor
 *
 * A simple example that queries the sensor every 5 seconds
 * and communicates the result over a serial connection.
 * Error handling is omitted in this example.
 */

#include <Sensirion.h>

const uint8_t dataPin  =  2;
const uint8_t clockPin =  3;

float temperature;
float humidity;
float dewpoint;

Sensirion tempSensor = Sensirion(dataPin, clockPin);

void setup()
{
  Serial.begin(9600);
}

void loop()
{
  tempSensor.measure(&temperature, &humidity, &dewpoint);

  Serial.print("Temperature: ");
  Serial.print(temperature);
  Serial.print(" C, Humidity: ");
  Serial.print(humidity);
  Serial.print(" %, Dewpoint: ");
  Serial.print(dewpoint);
  Serial.println(" C");
  
  delay(5000);  
}

And here is the beginning of the code for the library with the modification (too big for one post but the rest is identical to the library on the playground called Sensirion.h published 10 Dec 2010:

/* ========================================================================== */
/*  Sensirion.cpp - Library for Sensirion SHT1x & SHT7x family temperature    */
/*    and humidity sensors                                                    */
/*  Created by Markus Schatzl, November 28, 2008                              */
/*  Released into the public domain                                           */
/*                                                                            */
/*  Revised (v1.1) by Carl Jackson, August 4, 2010                            */
/*  Rewritten (v2.0) by Carl Jackson, December 10, 2010                       */
/*    See README.txt file for details                                         */
/* ========================================================================== */


/******************************************************************************
 * Includes
 ******************************************************************************/

extern "C" {
  // AVR LibC Includes
  #include <stddef.h>
  #include <stdint.h>
  #include <math.h>

  // Wiring Core Includes
  //#include "WConstants.h"
}

#include "Arduino.h"
#include "Sensirion.h"


/******************************************************************************
 * Definitions
 ******************************************************************************/
...

Here is a list of error messages that are coming up:

D:\awarren\Documents\Arduino\libraries\Sensirion\Sensirion.cpp:24:26: error: WConstants.h: No such file or directory
D:\awarren\Documents\Arduino\libraries\Sensirion\Sensirion.cpp: In constructor 'Sensirion::Sensirion(uint8_t, uint8_t)':
D:\awarren\Documents\Arduino\libraries\Sensirion\Sensirion.cpp:82: error: 'OUTPUT' was not declared in this scope
D:\awarren\Documents\Arduino\libraries\Sensirion\Sensirion.cpp:82: error: 'pinMode' was not declared in this scope
D:\awarren\Documents\Arduino\libraries\Sensirion\Sensirion.cpp: In member function 'uint8_t Sensirion::meas(uint8_t, uint16_t*, bool)':
D:\awarren\Documents\Arduino\libraries\Sensirion\Sensirion.cpp:131: error: 'digitalRead' was not declared in this scope
D:\awarren\Documents\Arduino\libraries\Sensirion\Sensirion.cpp:135: error: 'delay' was not declared in this scope
D:\awarren\Documents\Arduino\libraries\Sensirion\Sensirion.cpp: In member function 'uint8_t Sensirion::measRdy()':
D:\awarren\Documents\Arduino\libraries\Sensirion\Sensirion.cpp:147: error: 'digitalRead' was not declared in this scope
D:\awarren\Documents\Arduino\libraries\Sensirion\Sensirion.cpp: In member function 'uint8_t Sensirion::putByte(uint8_t)':
D:\awarren\Documents\Arduino\libraries\Sensirion\Sensirion.cpp:235: error: 'OUTPUT' was not declared in this scope
D:\awarren\Documents\Arduino\libraries\Sensirion\Sensirion.cpp:235: error: 'pinMode' was not declared in this scope
D:\awarren\Documents\Arduino\libraries\Sensirion\Sensirion.cpp:238: error: 'digitalWrite' was not declared in this scope
D:\awarren\Documents\Arduino\libraries\Sensirion\Sensirion.cpp:239: error: 'delayMicroseconds' was not declared in this scope
D:\awarren\Documents\Arduino\libraries\Sensirion\Sensirion.cpp:240: error: 'HIGH' was not declared in this scope
D:\awarren\Documents\Arduino\libraries\Sensirion\Sensirion.cpp:242: error: 'LOW' was not declared in this scope
D:\awarren\Documents\Arduino\libraries\Sensirion\Sensirion.cpp:246: error: 'INPUT' was not declared in this scope
D:\awarren\Documents\Arduino\libraries\Sensirion\Sensirion.cpp:248: error: 'digitalWrite' was not declared in this scope
D:\awarren\Documents\Arduino\libraries\Sensirion\Sensirion.cpp:250: error: 'HIGH' was not declared in this scope
D:\awarren\Documents\Arduino\libraries\Sensirion\Sensirion.cpp:251: error: 'delayMicroseconds' was not declared in this scope
D:\awarren\Documents\Arduino\libraries\Sensirion\Sensirion.cpp:252: error: 'digitalRead' was not declared in this scope
D:\awarren\Documents\Arduino\libraries\Sensirion\Sensirion.cpp:255: error: 'LOW' was not declared in this scope
D:\awarren\Documents\Arduino\libraries\Sensirion\Sensirion.cpp: In member function 'uint8_t Sensirion::getByte(bool)':
D:\awarren\Documents\Arduino\libraries\Sensirion\Sensirion.cpp:265: error: 'HIGH' was not declared in this scope
D:\awarren\Documents\Arduino\libraries\Sensirion\Sensirion.cpp:265: error: 'digitalWrite' was not declared in this scope
D:\awarren\Documents\Arduino\libraries\Sensirion\Sensirion.cpp:266: error: 'delayMicroseconds' was not declared in this scope
D:\awarren\Documents\Arduino\libraries\Sensirion\Sensirion.cpp:267: error: 'digitalRead' was not declared in this scope
D:\awarren\Documents\Arduino\libraries\Sensirion\Sensirion.cpp:268: error: 'LOW' was not declared in this scope
D:\awarren\Documents\Arduino\libraries\Sensirion\Sensirion.cpp:271: error: 'OUTPUT' was not declared in this scope
D:\awarren\Documents\Arduino\libraries\Sensirion\Sensirion.cpp:271: error: 'pinMode' was not declared in this scope
D:\awarren\Documents\Arduino\libraries\Sensirion\Sensirion.cpp:272: error: 'digitalWrite' was not declared in this scope
D:\awarren\Documents\Arduino\libraries\Sensirion\Sensirion.cpp:273: error: 'delayMicroseconds' was not declared in this scope
D:\awarren\Documents\Arduino\libraries\Sensirion\Sensirion.cpp:274: error: 'HIGH' was not declared in this scope
D:\awarren\Documents\Arduino\libraries\Sensirion\Sensirion.cpp:276: error: 'LOW' was not declared in this scope
D:\awarren\Documents\Arduino\libraries\Sensirion\Sensirion.cpp:278: error: 'INPUT' was not declared in this scope
D:\awarren\Documents\Arduino\libraries\Sensirion\Sensirion.cpp: In member function 'void Sensirion::startTransmission()':
D:\awarren\Documents\Arduino\libraries\Sensirion\Sensirion.cpp:298: error: 'HIGH' was not declared in this scope
D:\awarren\Documents\Arduino\libraries\Sensirion\Sensirion.cpp:298: error: 'digitalWrite' was not declared in this scope
D:\awarren\Documents\Arduino\libraries\Sensirion\Sensirion.cpp:299: error: 'OUTPUT' was not declared in this scope
D:\awarren\Documents\Arduino\libraries\Sensirion\Sensirion.cpp:299: error: 'pinMode' was not declared in this scope
D:\awarren\Documents\Arduino\libraries\Sensirion\Sensirion.cpp:300: error: 'delayMicroseconds' was not declared in this scope
D:\awarren\Documents\Arduino\libraries\Sensirion\Sensirion.cpp:303: error: 'LOW' was not declared in this scope
D:\awarren\Documents\Arduino\libraries\Sensirion\Sensirion.cpp: In member function 'void Sensirion::resetConnection()':
D:\awarren\Documents\Arduino\libraries\Sensirion\Sensirion.cpp:325: error: 'HIGH' was not declared in this scope
D:\awarren\Documents\Arduino\libraries\Sensirion\Sensirion.cpp:325: error: 'digitalWrite' was not declared in this scope
D:\awarren\Documents\Arduino\libraries\Sensirion\Sensirion.cpp:326: error: 'OUTPUT' was not declared in this scope
D:\awarren\Documents\Arduino\libraries\Sensirion\Sensirion.cpp:326: error: 'pinMode' was not declared in this scope
D:\awarren\Documents\Arduino\libraries\Sensirion\Sensirion.cpp:327: error: 'delayMicroseconds' was not declared in this scope
D:\awarren\Documents\Arduino\libraries\Sensirion\Sensirion.cpp:331: error: 'LOW' was not declared in this scope

I’m so confused!!! Can someone tell me what I did wrong?

what pins was the example telling you to use?

can you compile it with out modifications? What version of the IDE and Library are you using?

If it has Wprogram.h in it, is is probably a very old example, and might have other incompatible aspects to it.