hwthinker icon

Nano nRF24L01 - Transmitter

hwthinker | PRO | 05/17/21 09:01:03 AM UTC (Edited) | 0 ⭐ | 1191 👁️ | Never ⏰ | []
Arduino |

380 B

|

None

|

0 👍

/

0 👎

//transmitter
#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
 
RF24 radio(7, 8); // CE, CSN
 
const byte address[6] = "00001";
 
void setup() {
  radio.begin();
  radio.openWritingPipe(address);
  radio.setPALevel(RF24_PA_MIN);
  radio.stopListening();
}
 
void loop() {
  const char text[] = "Halo Apakabar";
  radio.write(&text, sizeof(text));
  delay(1000);
}

Comments