Hello,
Lately I've started using the Spi library from the Arduino Playground to communicate between two arduino's using two nRF24L01+ transceiver modules.
http://www.arduino.cc/playground/Code/Spi
Because this library uses the Spi library I've downloaded it and started working with it. I interface between an Arduino Mega and an Arduino Duemilanove. I had a lot of problems at the start, this because both the boards use different digital pins for the SCK, MISO, MOSI and SS configuration.
Duemilanove:
pin 13 SCK SPI clock
pin 12 MISO SPI master in, slave out
pin 11 MOSI SPI master out, slave in
pin 10 SS SPI slave select
Mega:
pin 52 SCK SPI clock
pin 50 MISO SPI master in, slave out
pin 51 MOSI SPI master out, slave in
pin 53 SS SPI slave select
The Spi library uses the following pin configuration:
pin 13 SCK SPI clock
pin 12 MISO SPI master in, slave out
pin 11 MOSI SPI master out, slave in
pin 10 SS SPI slave select
Now I needs to change the pins in the Spi.h file before I upload the sketch to the Mega or Duamilanove board.....
Maybe it's better to be able to config the pins in the setup of the arduino board. In this way you'll have much more flexibility
For example:
void setup(){
Spi.MISO(12); // This will config pin 12 as MISO
}
Or maybe be able to select a board when the library is inserted.
#include <Spi.h>
void setup(){
Spi(mega);
}
(I don't know if this is possible, my library programming skills are bad....)
The problem is I don't have the skills to update/modify this library and I don't know how updating normally works? Can users just update and upload it or do they need to have permission from the author of this library
Any users who know how to do this or have better suggestions?
Thanks in advance,
/me