arduino-LoRa icon indicating copy to clipboard operation
arduino-LoRa copied to clipboard

Using LoRa Library in Energia for MSP430G2553

Open DeeLoRa opened this issue 7 years ago • 5 comments

I'm trying to compile LoRa library for MSP430 using Energia platform and I get the error SPISettings' does not name a type.

This is because the SPISettings is nowhere in the SPI library for Energia but is used in the above LoRa library.

My problem is how do I modify the LoRa library to add SPISettings or is there another method to solve this issue?

#include <SPI.h>
#include <LoRa.h>
#include "Energia.h"
int counter = 0;

void setup() {
  Serial.begin(9600);
  while (!Serial);

  Serial.println("LoRa Sender");

  if (!LoRa.begin(433E6)) {
    Serial.println("Starting LoRa failed!");
    while (1);
  }
}

void loop() {
  Serial.print("Sending packet: ");
  Serial.println(counter);

  // send packet
  LoRa.beginPacket();
  LoRa.print("hello ");
  LoRa.print(counter);
  LoRa.endPacket();

  counter++;

  delay(5000);
}```

DeeLoRa avatar Aug 05 '18 07:08 DeeLoRa

I'm not familiar with Energia but it appears to be a fork of Arduino? If this is the case it would likely be out of the scope of this library. You might need to end up filing an issue with TI to get proper Arduino SPI compatibility.

morganrallen avatar Aug 05 '18 16:08 morganrallen

We could add support for board cores that don't have SPI transaction support if there is enough demand. There's an SPI_HAS_TRANSACTION macro available to detect it.

sandeepmistry avatar Aug 06 '18 23:08 sandeepmistry

Support on this would be great since LoRa is for Low powered IoT and MSP is also very low power oriented, so many will benefit from this.

DeeLoRa avatar Aug 06 '18 23:08 DeeLoRa

@DeeLoRa care to dive in and submit a pull request?

sandeepmistry avatar Aug 06 '18 23:08 sandeepmistry

Even i am facing his issue with energia with LORA with same SPI

sandeep-singh4486 avatar Apr 01 '20 07:04 sandeep-singh4486