Hi Dear
i interfaced 433MHz LoRa SX1278 module appear in this site:
https://www.aliexpress.com/item/4000078118772.html
to Arduino Mega using the pins mapping Mega(50,51,52,53) to LoRa(MISO, MOSI, SLCK, NSS)
Now i want to interface on the same board Arduino Mega this module:
But this module pins are also (MISO, MOSI, SLCK, NSS)
can i connect them to same pins that i already connected to LoRa?
Best Regards
J-M-L
2
SPI is a bus - you can have multiple devices connected to it, they just need separate slave select (SS) pins
1 Like
Please how can i separate SS pins?
i have this line in the code
int pinCS = 53; // Pin 10 on Arduino Uno (for SD card)
J-M-L
4
Just use a different one - the SD card library takes usually a parameter when you configure the instance to tell to the library which pin you used
1 Like
like this?
int pinCS = 53; // Pin 10 on Arduino Uno (for SD card)
J-M-L
6
You used 53 for the Lora module
For the sd card pass the pin you connected as part of the begin() call
(It’s called here CS pin - for chip select
But it’s the same)
Any unused pin can do usually. Make sure it’s set as an output (libraries usually would take care of this)
Read about SPI to understand how it works
1 Like
Thanks a lot, it worked according to your advice.
J-M-L
8
Glad to hear - have fun !
system
Closed
9
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.