Community
cancel
Showing results for 
Search instead for 
Did you mean: 
idata
Community Manager
984 Views

SPI calling from other Library

Hi,

I'm trying to compile this Sketch on a Simatic IOT2020 but during the compiling I get some issues:

Code:

# include

# include

int counter = 0;

void setup() {

Serial.begin(9600);

while (!Serial);

Serial.println("LoRa Sender");

if (!LoRa.begin(915E6)) {

Serial.println("Starting LoRa failed!");

while (1);

}

}

void loop() {

Serial.print("Sending packet: ");

Serial.println(counter);A

// send packet

LoRa.beginPacket();

LoRa.print("hello ");

LoRa.print(counter);

LoRa.endPacket();

counter++;

delay(5000);

}

Issues:

In file included from C:\Users\hladik\Desktop\arduino-1.8.2\LoRaReceiver\LoRaReceiver.ino:2:0:

C:\Users\hladik\Documents\Arduino\libraries\LoRa\src/LoRa.h:74:3: error: 'SPISettings' does not name a type

Link to Library:

https://github.com/sandeepmistry/arduino-LoRa/tree/master/src arduino-LoRa/src at master · sandeepmistry/arduino-LoRa · GitHub

Could somebody help me with this?

By the way: when I compile it for a Arduino Mega 2560 everything runs propertly.

0 Kudos
3 Replies
idata
Community Manager
46 Views

Hello MerlinHladik,

 

 

Thank you for your interest in the Intel® Galileo Board.

 

 

I am not familiar with the SIMATIC IOT2020, I visited the manufacturer's site and noticed the compatibility with the Arduino IDE and Arduino shields.

 

 

Could you please tell me how you are using the Galileo Board in your project?

 

 

You mentioned that the code compiles in the Arduino Mega 2560, but there is a chance that the reason behind the error message may be due to an incompatibility issue.

 

 

I checked the technical specifications of the SIMATIC IOT2020 and noticed that it uses an Intel Quark SoC X1000 CPU, while the Arduino Mega 2560 board is microcontroller based (ATmega2560). Due to this difference, not every library can be used in both systems.

 

 

I'll be waiting for your response.

 

 

Have a nice day.

 

 

Regards,

 

Andres V.
idata
Community Manager
46 Views

Hello Andres V.

I found it out already.

In the SPI.h library that is used for the Intel galileo gen2 is the function SPISettings() missing.

I got this library by downloading the packet for Intel i586 Boards in the Board Manager in the Arduino IDE.

But anyway, thanks for your quick response.

Best Regards

MerlinHladik

idata
Community Manager
46 Views

Hello MerlinHladik,

 

 

I'm glad to hear that you could solve the issue.

 

 

Thank you for sharing your experience with the community, we really appreciate it.

 

 

Have a nice day.

 

 

Regards,

 

Andres V.
Reply