Genuino 101 and MySignals

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:

https://www.cooking-hacks.com/mysignals-hw-v1-ehealth-medical-biometric-iot-platform-arduino-tutorial/

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

1 Like

fabianglez91:
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:

https://www.cooking-hacks.com/mysignals-hw-v1-ehealth-medical-biometric-iot-platform-arduino-tutorial/

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

The error is that <avr/interrupt.h> is missing from the Arduino IDE.
I assume you are using Windows.
I do not use Windows so I am unable to tell you where the include files are located.

I would suggest starting by going over how Arduino IDE was installed.
Which version of Arduino IDE is installed.
You could try the create.arduino.cc application.

1 Like

The AVR include is non specific to the 101 which uses a different architecture to the standard AVR eg UNO, MEGA etc.

You would have to rewrite the interrupts routines (libraries) to use the 101 architecture.
This is based on the INTEL processor not the AVR.

You best bet at the moment would be to contact the supplier of the specialist shield directly if you are looking for a quick response.

It has absoloutly nothing to do with which IDE you use.
The compile would need to differentiate between and AVR board during compile or whatever board was taken and adjust accordingly.

It is safe to ignore "artisticforge" on this occasion.

1 Like