Skip to content

Instantly share code, notes, and snippets.

@furkanbakkal
Last active March 31, 2022 21:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save furkanbakkal/b023be09dd2b35f4dc6f05c32aebcfe3 to your computer and use it in GitHub Desktop.
Save furkanbakkal/b023be09dd2b35f4dc6f05c32aebcfe3 to your computer and use it in GitHub Desktop.
#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
//NRF24L01
RF24 radio(9, 8); // CE, CSN
//haberleşme kanalı (herhangi bir "string" olabilir)
const byte address[8] = "robolink";
void setup()
{
radio.begin();
//haberleşme adresini tanımla
radio.openWritingPipe(address);
//verici olarak ayarla
radio.stopListening();
}
void loop()
{
//sürekli mesaj gönder
const char text[] = "Robolink Akademi"; //mesaj en fazla 32 karakter olabilir
radio.write(&text, sizeof(text));
delay(1000); //1 saniye bekle
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment