Hello all,
I am having a bit of trouble using MySignals platform of Libelium with an Genuino 101. When compile example sketches of MySignals library or others appear a fatal error:
In file included from C:\Users\LABSONIDO\Documents\Arduino\libraries\MySignals\examples\Sensors\sensor_SPO2\sensor_SPO2\sensor_SPO2.ino:27:0:
C:\Users\LABSONIDO\Documents\Arduino\libraries\MySignals/MySignals.h:38:27: fatal error: avr/interrupt.h: No such file or directory
#include <avr/interrupt.h>
^
compilation terminated.
exit status 1
Error compilación en tarjeta Arduino/Genuino 101.
I have downloaded this library in this page of the official distributor of MySignals:
I don´t understand why appear this error, because i looked MySignals.h and sensor_SPO2.ino files, and
#include <avr/interrupt.h> exist in both.
My IDE version of arduino is 1.8.1 and i also have probed with older versions and the same error when i try to compile.
The code of the example sketch that i'm using is:
#include <MySignals.h>
#include "Wire.h"
#include "SPI.h"
int valuePulse;
int valueSPO2;
uint8_t pulsioximeter_state = 0;
void setup()
{
Serial.begin(19200);
MySignals.begin();
MySignals.initSensorUART();
MySignals.enableSensorUART(PULSIOXIMETER);
}
void loop()
{
// First way of getting sensor data
MySignals.enableSensorUART(PULSIOXIMETER);
Serial.println();
pulsioximeter_state = MySignals.getPulsioximeter();
if (pulsioximeter_state == 1)
{
Serial.print(F("Pulse:"));
Serial.print(MySignals.pulsioximeterData.BPM);
Serial.print(F("bpm / SPO2:"));
Serial.print(MySignals.pulsioximeterData.O2);
Serial.println(F("%"));
}
else if (pulsioximeter_state == 2)
{
Serial.println(F("Not valid data"));
}
else
{
Serial.println(F("No available data"));
}
MySignals.disableSensorUART();
delay(2000);
// Second way of getting sensor data
MySignals.enableSensorUART(PULSIOXIMETER);
valuePulse = MySignals.getPulsioximeter(PULSE);
Serial.println();
if (valuePulse == 2)
{
Serial.println(F("Not valid Pulse data"));
}
else if (valuePulse == 0)
{
Serial.println(F("No available data"));
}
else
{
Serial.print(F("Pulse:"));
Serial.print(valuePulse);
Serial.println(F("bpm"));
}
MySignals.disableSensorUART();
delay(2000);
MySignals.enableSensorUART(PULSIOXIMETER);
valueSPO2 = MySignals.getPulsioximeter(SPO2);
if (valueSPO2 == 2)
{
Serial.println(F("Not valid SPO2 data"));
}
else if (valueSPO2 == 0)
{
Serial.println(F("No available data"));
}
else
{
Serial.print(F("SPO2:"));
Serial.print(valueSPO2);
Serial.println(F("%"));
}
MySignals.disableSensorUART();
delay(2000);
}
Many thanks,
Fabián