HI we are trying to connect Grove - Barometer (High-Accuracy) http://wiki.seeedstudio.com/Grove-Barom … -Accuracy/. to a seeduino http://wiki.seeedstudio.com/Seeeduino_LoRAWAN/. but wee get this error
WARNING: Category ‘’ in library FlashStorage is not valid. Setting to ‘Uncategorized’
WARNING: library Wire claims to run on (samd) architecture(s) and may be incompatible with your current board which runs on (Seeeduino_SAMD) architecture(s).
C:\Users\pc1\Documents\Arduino\libraries\Grove_Barometer_HP20x-master\HP20x_dev.cpp: In constructor ‘HP20x_dev::HP20x_dev()’:
C:\Users\pc1\Documents\Arduino\libraries\Grove_Barometer_HP20x-master\HP20x_dev.cpp:33:22: error: no matching function for call to ‘TwoWire::TwoWire()’
HP20x_dev::HP20x_dev()
^
C:\Users\pc1\Documents\Arduino\libraries\Grove_Barometer_HP20x-master\HP20x_dev.cpp:33:22: note: candidates are:
In file included from C:\Users\pc1\Documents\Arduino\libraries\Grove_Barometer_HP20x-master\HP20x_dev.h:14:0,
from C:\Users\pc1\Documents\Arduino\libraries\Grove_Barometer_HP20x-master\HP20x_dev.cpp:13:
C:\Users\pc1\AppData\Local\Arduino15\packages\Seeeduino\hardware\Seeeduino_SAMD\1.2.0\libraries\Wire/Wire.h:37:5: note: TwoWire::TwoWire(SERCOM*, uint8_t, uint8_t)
TwoWire(SERCOM *s, uint8_t pinSDA, uint8_t pinSCL);
^
C:\Users\pc1\AppData\Local\Arduino15\packages\Seeeduino\hardware\Seeeduino_SAMD\1.2.0\libraries\Wire/Wire.h:37:5: note: candidate expects 3 arguments, 0 provided
the code we use is this
*
- Demo name : HP20x_dev demo
- Usage : I2C PRECISION BAROMETER AND ALTIMETER [HP206C hopeRF]
- Author : Oliver Wang from Seeed Studio
- Version : V0.1
- Change log : Add kalman filter 2014/04/04
/
#include <HP20x_dev.h>
#include “Arduino.h”
#include “Wire.h”
#include <KalmanFilter.h>
unsigned char ret = 0;
/ Instance /
KalmanFilter t_filter; //temperature filter
KalmanFilter p_filter; //pressure filter
KalmanFilter a_filter; //altitude filter
void setup()
{
Serial.begin(9600); // start serial for output
Serial.println(“HP20x_dev demo by seeed studio\n”);
Serial.println(“Calculation formula: H = [8.5(101325-P)]/100 \n”);
/ Power up,delay 150ms,until voltage is stable /
delay(150);
/ Reset HP20x_dev /
HP20x.begin();
delay(100);
/ Determine HP20x_dev is available or not */
ret = HP20x.isAvailable();
if(OK_HP20X_DEV == ret)
{
Serial.println(“HP20x_dev is available.\n”);
}
else
{
Serial.println(“HP20x_dev isn’t available.\n”);
}
}
void loop()
{
char display[40];
if(OK_HP20X_DEV == ret)
{
Serial.println("------------------\n");
long Temper = HP20x.ReadTemperature();
Serial.println(“Temper:”);
float t = Temper/100.0;
Serial.print(t);
Serial.println(“C.\n”);
Serial.println(“Filter:”);
Serial.print(t_filter.Filter(t));
Serial.println(“C.\n”);
long Pressure = HP20x.ReadPressure();
Serial.println(“Pressure:”);
t = Pressure/100.0;
Serial.print(t);
Serial.println(“hPa.\n”);
Serial.println(“Filter:”);
Serial.print(p_filter.Filter(t));
Serial.println(“hPa\n”);
long Altitude = HP20x.ReadAltitude();
Serial.println(“Altitude:”);
t = Altitude/100.0;
Serial.print(t);
Serial.println(“m.\n”);
Serial.println(“Filter:”);
Serial.print(a_filter.Filter(t));
Serial.println(“m.\n”);
Serial.println("------------------\n");
delay(1000);
}