NRF24L01

problémám van, 2 adó és 1 vevő, de ne működjön. használtam RF24Network.h library.

TX1: *******************************************************************

#include <SPI.h>

#include <RF24Network.h>

#include <nRF24L01.h>

#include <RF24.h>

vcc 3,3v // gnd gnd // sck 13 // mosi 11 // miso 12

RF24 rádió (8, 10); // CE, CSN

RF24Hálózati hálózat (rádió);

const uint16_t ado1 = 01; // saját cím

const uint16_t vevo = 00; // alaplap ami veszi az infokat

const előjel nélküli hosszú intervallum = 1000; // ms // Milyen gyakran kell adatokat elküldeni a másik egységnek

aláíratlan hosszú last_sent;

int pir = 3;

int i = 0;

int pirertek;

void setup () {

Serial.begin (115200);

SPI.begin ();

radio.begin ();

network.begin (90, kb. 1); // csatorna, csomópont címe

késés (100);

}

void loop () {

network.update ();

hosszú ideje aláíratlan = millisz ();

if (now - last_sent> = intervallum) {// Ha ideje elküldeni az adatokat, küldje el!

last_sent = most;

RF24NetworkHeader fejléc (vevo); // erre a címre küldi az adatot

bool ok = network.write (fejléc, & pirertek, sizeof (pirertek));

Soros.println (pirertek);

pirertek = pirertek + 2;

}

}

RX: ************************************************** *****************************

#include <SPI.h>

#include <RF24Network.h>

#include <nRF24L01.h>

#include <RF24.h>

vcc 3,3v // gnd gnd // sck 13 // mosi 11 // miso 12

RF24 rádió (8, 10); // CE, CSN

RF24Hálózati hálózat (rádió);

const uint16_t vevo = 00;

int hangjelző = 5;

int i;

int val;

int pirertek;

int pirertek2;

void setup () {

Serial.begin (115200);

SPI.begin ();

radio.begin ();

network.begin (90, vevo);

pinMode (hangjelző, OUTPUT);

késés (100);

}

void loop () {

network.update ();

while (network.available ()) {

RF24NetworkHeader fejléc;

aláíratlan hosszú bejövő adat;

network.read (header, & incomingData, sizeof (incomingData));

Serial.print ("fejléc:");

Serial.print ("adat:");

Serial.println (bejövőData);

}

}

Megpróbáltam direkt megfogalmazni, hogy "pirertek", de nem sikerült.

TX soros monitor: 4 6 8 10 12 14 etc
RX soros monitor:
8061004
8061006
8061008
8061010
8061012

kérem, segítsen, nem értem, ez a cím?
hogy csak az adatokat olvashatom el?

program: riasztórendszer. 2 szoba, 2 adó, 1-pir sensor, and 1 receiver.

@gadroli, yours is a new question so I have suggested to the Moderator to move it to its own Thread.

Also, the text is not in English so I can't understand it. Can you translate it to English or perhaps use one of the other language sections of the Forum.

Please use the code button </> when posting code

See How to get the best out of the Forum

...R

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.