problem with HTU21D program


when installing program receive 'error compiling' - exit status 1 error compelling.
what do?

/*
 htu21d humidity sensor example code
 by: nathan seidle
 sparkfun electronics
 date: september 15th, 2013
 license: code public domain buy me beer if use , meet someday (beerware license).
 
 uses htu21d library display current humidity , temperature
 
 open serial monitor @ 9600 baud see readings. errors 998 if not sensor detected. error 999 if crc bad.
 
 hardware connections (breakoutboard arduino):
 -vcc = 3.3v
 -gnd = gnd
 -sda = a4 (use inline 330 ohm resistor if board 5v)
 -scl = a5 (use inline 330 ohm resistor if board 5v)

 */

#include <wire.h>
#include "sparkfunhtu21d.h"

//create instance of object
htu21d myhumidity;

void setup()
{
  serial.begin(9600);
  serial.println("htu21d example!");

  myhumidity.begin();
}

void loop()
{
  float humd = myhumidity.readhumidity();
  float temp = myhumidity.readtemperature();

  serial.print("time:");
  serial.print(millis());
  serial.print(" temperature:");
  serial.print(temp, 1);
  serial.print("c");
  serial.print(" humidity:");
  serial.print(humd, 1);
  serial.print("%");

  serial.println();
  delay(1000);
}



Arduino Forum > Using Arduino > Installation & Troubleshooting > problem with HTU21D program


arduino

Comments