Skip to content

Make SPI port configurable at runtime #103

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

facchinm
Copy link
Collaborator

No description provided.

@morganrallen
Copy link
Collaborator

This is great, #104 asks about using multiple radios, this could assist with that. I'll try to give this a test this week.

@@ -50,6 +50,8 @@

#define MAX_PKT_LENGTH 255

static SPIClass& SPIPORT = SPI;
Copy link
Contributor

@Rotzbua Rotzbua Feb 14, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not a member variable?
edit: I ask about the reason: programming, compiling, resources or design pattern?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, in order to make this work with multiple SX1276 devices at the same time, this would need to be part of the class.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@morganrallen For multiple devices are not multiple spi bus required. So 1 spi will work with 4-7 devices.
pic

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh right, I even commented that on #104

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The important part is the interrupt of each device @morganrallen are u working on this now?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not actively working on this yet, I hope to get time tomorrow or Saturday

@sandeepmistry
Copy link
Owner

@wero1414 @morganrallen I think a LoRa.setSPI(...) API would be a better fit rather than adding parameters to begin this was discussed with @facchinm. It's not specific to multiple radios. @facchinm's main goal was to get the MKR WAN "dumb" radio example working with this lib: https://github.com/arduino-libraries/MKRWAN/blob/master/examples/DumbModemLoraSender/DumbModemLoraSender.ino

Let me comment on #104 regarding multiple radios.

@sandeepmistry
Copy link
Owner

Closing in favour of #105.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants