Hi all,
I have used the NRF24L01 with UNOs so far and it works with the simple NRF24L01 Transceiver demo. 1 TX sends to 5 RX. Now I need a Pro Micro as TX due to it's HID over USB capability (used for playing a song on PC while sending data).
Before I wire up and kill my board, how do I connect the NRF24L01 to a Pro Micro properly and what do I need to change in the code?
The code I used with the UNO TX:
// SimpleTx - the master or the transmitter
//Sender!
#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
#define CE_PIN 9
#define CSN_PIN 10
const byte slaveAddress[5] = {'R','x','A','A','A'};
RF24 radio(CE_PIN, CSN_PIN); // Create a Radio
void setup() {
//Serial.begin(9600);
//Serial.println("SimpleTx Starting");
radio.begin();
radio.setDataRate( RF24_250KBPS );
radio.setRetries(3,5); // delay, count
radio.openWritingPipe(slaveAddress);
}
void loop() {
send(1);
delay(2000);
send(0);
delay(2000);
}
void send(int data) {
bool rslt;
rslt = radio.write( &data, sizeof(data) );
}
This topic did not lead to a solution: Arduino Pro Micro NRF24L01 - Programming Questions - Arduino Forum
Thanks a lot!
Jan