<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[forum.rcl-radio.ru &mdash; Радио модули NRF24L01 (ARDUINO)]]></title>
	<link rel="self" href="http://forum.rcl-radio.ru/extern.php?action=feed&amp;tid=500&amp;type=atom" />
	<updated>2026-04-29T14:22:52Z</updated>
	<generator>PunBB</generator>
	<id>http://forum.rcl-radio.ru/viewtopic.php?id=500</id>
		<entry>
			<title type="html"><![CDATA[Re: Радио модули NRF24L01 (ARDUINO)]]></title>
			<link rel="alternate" href="http://forum.rcl-radio.ru/viewtopic.php?pid=12631#p12631" />
			<content type="html"><![CDATA[<p><a href="https://drive.google.com/file/d/1Ytfbf08Gn88nJ7Lv2qWTAdBuqAI65C1r/view?usp=sharing">https://drive.google.com/file/d/1Ytfbf0 … sp=sharing</a></p>]]></content>
			<author>
				<name><![CDATA[User81]]></name>
				<uri>http://forum.rcl-radio.ru/profile.php?id=4848</uri>
			</author>
			<updated>2026-04-29T14:22:52Z</updated>
			<id>http://forum.rcl-radio.ru/viewtopic.php?pid=12631#p12631</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Радио модули NRF24L01 (ARDUINO)]]></title>
			<link rel="alternate" href="http://forum.rcl-radio.ru/viewtopic.php?pid=6494#p6494" />
			<content type="html"><![CDATA[<p>УПРАВЛЕНИЕ 4- РЕЛЕ</p><p>ПЕРЕДАТЧИК</p><div class="codebox"><pre><code>#include &lt;SPI.h&gt;                                          
#include &lt;nRF24L01.h&gt;                                     
#include &lt;RF24.h&gt;                                   
 RF24 radio(9, 10);  // (CE, CSN)
 
 int data_reg;
 bool w1,w2,w3,w4;                              

void setup(){
    delay(1000);
    Serial.begin(9600);
    radio.begin();                                        
    radio.setChannel(5);                      // канал от 0 до 127
    radio.setDataRate(RF24_250KBPS);          // RF24_250KBPS, RF24_1MBPS, RF24_2MBPS 
    radio.setPALevel(RF24_PA_MIN);            // RF24_PA_MIN=-18dBm, RF24_PA_LOW=-12dBm, RF24_PA_HIGH=-6dBm, RF24_PA_MAX=0dBm
    radio.openWritingPipe(0xA1A1A1A102);           
    pinMode(2,INPUT_PULLUP); 
    pinMode(3,INPUT_PULLUP); 
    pinMode(4,INPUT_PULLUP); 
    pinMode(5,INPUT_PULLUP);                                                        
}

void loop(){
  if(digitalRead(2)==LOW &amp;&amp; w1==0){w1=1;data_reg |= (1&lt;&lt;0);delay(200);}
  if(digitalRead(2)==LOW &amp;&amp; w1==1){w1=0;data_reg &amp;=~(1&lt;&lt;0);delay(200);}

  if(digitalRead(3)==LOW &amp;&amp; w2==0){w2=1;data_reg |= (1&lt;&lt;1);delay(200);}
  if(digitalRead(3)==LOW &amp;&amp; w2==1){w2=0;data_reg &amp;=~(1&lt;&lt;1);delay(200);}

  if(digitalRead(4)==LOW &amp;&amp; w3==0){w3=1;data_reg |= (1&lt;&lt;2);delay(200);}
  if(digitalRead(4)==LOW &amp;&amp; w3==1){w3=0;data_reg &amp;=~(1&lt;&lt;2);delay(200);}

  if(digitalRead(5)==LOW &amp;&amp; w4==0){w4=1;data_reg |= (1&lt;&lt;3);delay(200);}
  if(digitalRead(5)==LOW &amp;&amp; w4==1){w4=0;data_reg &amp;=~(1&lt;&lt;3);delay(200);}  
                                                   
  radio.write(&amp;data_reg, sizeof(data_reg));
  Serial.println(data_reg);
  delay(100);
}</code></pre></div><p>ПРИЕМНИК</p><div class="codebox"><pre><code>#include &lt;SPI.h&gt;                                          
#include &lt;nRF24L01.h&gt;                                 
#include &lt;RF24.h&gt;                                         
 RF24 radio(9, 10);     // (CE, CSN)

 int data_old,data;  
 unsigned long times;


void setup(){
    delay(1000);
    Serial.begin(9600);
    pinMode(2,OUTPUT);pinMode(3,OUTPUT);pinMode(4,OUTPUT);pinMode(5,OUTPUT);
    radio.begin();                                        
    radio.setChannel(5);                   // канал от 0 до 127
    radio.setDataRate(RF24_250KBPS);       // RF24_250KBPS, RF24_1MBPS, RF24_2MBPS
    radio.setPALevel(RF24_PA_MIN);         // RF24_PA_MIN=-18dBm, RF24_PA_LOW=-12dBm, RF24_PA_HIGH=-6dBm, RF24_PA_MAX=0dBm
    radio.openReadingPipe(1, 0xA1A1A1A102);
    radio.startListening();               
}
void loop(){
    if(radio.available()){                                
     radio.read(&amp;data, sizeof(data));
     Serial.println(data);
      
    if(((data &gt;&gt; 0) &amp; 1) ==1){digitalWrite(2,HIGH);}else{digitalWrite(2,LOW);}
    if(((data &gt;&gt; 1) &amp; 1) ==1){digitalWrite(3,HIGH);}else{digitalWrite(3,LOW);}
    if(((data &gt;&gt; 2) &amp; 1) ==1){digitalWrite(4,HIGH);}else{digitalWrite(4,LOW);}
    if(((data &gt;&gt; 3) &amp; 1) ==1){digitalWrite(5,HIGH);}else{digitalWrite(5,LOW);}
    }
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[liman324]]></name>
				<uri>http://forum.rcl-radio.ru/profile.php?id=2</uri>
			</author>
			<updated>2022-07-22T08:37:22Z</updated>
			<id>http://forum.rcl-radio.ru/viewtopic.php?pid=6494#p6494</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Радио модули NRF24L01 (ARDUINO)]]></title>
			<link rel="alternate" href="http://forum.rcl-radio.ru/viewtopic.php?pid=6493#p6493" />
			<content type="html"><![CDATA[<p>ТЕРМОРЕГУЛЯТОР</p><p>БАЗА</p><div class="codebox"><pre><code>#include &lt;SPI.h&gt;                                          
#include &lt;nRF24L01.h&gt;                                     
#include &lt;RF24.h&gt; 
#include &lt;LiquidCrystal_I2C.h&gt;  // http://forum.rcl-radio.ru/misc.php?action=pan_download&amp;item=45&amp;download=1
#include &lt;Wire.h&gt;    
#include &lt;Encoder.h&gt;            // http://rcl-radio.ru/wp-content/uploads/2019/05/Encoder.zip    
#include &lt;EEPROM.h&gt;
#include &lt;MsTimer2.h&gt;           // http://rcl-radio.ru/wp-content/uploads/2018/11/MsTimer2.zip                                      
  RF24 radio(9, 10);  // (CE, CSN)
  LiquidCrystal_I2C lcd(0x27,16,2);
  Encoder myEnc(A2, A1);// DT, CLK
 
 int data,data_reg;
 unsigned long times,times_eeprom,oldPosition  = -999,newPosition;
 bool w;
 byte v1[8] = {0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07};
 byte v2[8] = {0x07,0x07,0x00,0x00,0x00,0x00,0x00,0x00};      
 byte v3[8] = {0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0x1F};
 byte v4[8] = {0x1F,0x1F,0x00,0x00,0x00,0x00,0x1F,0x1F};
 byte v5[8] = {0x1C,0x1C,0x00,0x00,0x00,0x00,0x1C,0x1C};
 byte v6[8] = {0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C};
 byte v7[8] = {0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x07};
 byte v8[8] = {0x1F,0x1F,0x00,0x00,0x00,0x00,0x00,0x00};
 byte d1,d2,d3,d4,d5,d6,e1,e2,e3,a[6],x;                                  

void setup(){
    delay(1000);
    Serial.begin(9600);
    radio.begin();                                        
    radio.setChannel(5);                      // канал от 0 до 127
    radio.setDataRate(RF24_250KBPS);          // RF24_250KBPS, RF24_1MBPS, RF24_2MBPS 
    radio.setPALevel(RF24_PA_MIN);            // RF24_PA_MIN=-18dBm, RF24_PA_LOW=-12dBm, RF24_PA_HIGH=-6dBm, RF24_PA_MAX=0dBm
    radio.openReadingPipe(1, 0xA0A0A0A001);
    radio.openWritingPipe(0xA1A1A1A102);         
    radio.startListening  ();                              
    Wire.begin();lcd.init();lcd.backlight();
    lcd.createChar(1, v1);lcd.createChar(2, v2);lcd.createChar(3, v3);lcd.createChar(4, v4);
    lcd.createChar(5, v5);lcd.createChar(6, v6);lcd.createChar(7, v7);lcd.createChar(8, v8);                            
    MsTimer2::set(3, to_Timer);MsTimer2::start();
    if(EEPROM.read(100)!=0){for(int i=0;i&lt;101;i++){EEPROM.update(i,0);}}// очистка памяти при первом включении  
    data_reg = EEPROM.read(0);
}

void loop(){
  if(radio.available() &amp;&amp; w==0){                                
      radio.read(&amp;data, sizeof(data));
      Serial.println((float)data/100);
     a[0]=data/1000;
     a[1]=data/100%10;
     a[2]=data/10%10;
     a[3]=data%10;
     if(data&lt;1000){a[0]=10;}
     if(data&lt;100){a[1]=10;}
   for(x=0;x&lt;4;x++){
    switch(x){
        case 0: e1=0;e2=1,e3=2;break;
        case 1: e1=3,e2=4,e3=5;break;
        case 2: e1=7,e2=8,e3=9;break;
        case 3: e1=10,e2=11,e3=12;break;
   }digit();}
   lcd.setCursor(6,1);lcd.print(&quot;.&quot;);
   lcd.setCursor(13,1);lcd.write((uint8_t)223);;lcd.print(&quot;C&quot;);
   lcd.setCursor(15,1);lcd.print(&quot;*&quot;);
   delay(200);
  }
  else{lcd.setCursor(15,1);lcd.print(&quot; &quot;); }

  if (newPosition != oldPosition){oldPosition = newPosition;data_reg=data_reg+newPosition;myEnc.write(0);newPosition=0;times_eeprom=millis();w=1;
    if(data_reg&gt;9){lcd.setCursor(14,0);}else{lcd.setCursor(15,0);}lcd.print(data_reg);}

  if(millis()-times&gt;2000 &amp;&amp; w==0){times=millis();
  radio.stopListening();                                                   
  radio.write(&amp;data_reg, sizeof(data_reg));
  radio.startListening();
  }

if(millis()-times_eeprom&gt;5000 &amp;&amp; w==1){EEPROM.update(0,data_reg);w=0;}   
}

void to_Timer(){newPosition = myEnc.read()/4;} 

void digit(){
  switch(a[x]){
    case 0: d1=1,d2=8,d3=6,d4=1,d5=3,d6=6;break;
    case 1: d1=32,d2=2,d3=6,d4=32,d5=32,d6=6;break;
    case 2: d1=2,d2=8,d3=6,d4=1,d5=4,d6=5;break;
    case 3: d1=2,d2=4,d3=6,d4=7,d5=3,d6=6;break;
    case 4: d1=1,d2=3,d3=6,d4=32,d5=32,d6=6;break;
    case 5: d1=1,d2=4,d3=5,d4=7,d5=3,d6=6;break;
    case 6: d1=1,d2=4,d3=5,d4=1,d5=3,d6=6;break;
    case 7: d1=1,d2=8,d3=6,d4=32,d5=32,d6=6;break;
    case 8: d1=1,d2=4,d3=6,d4=1,d5=3,d6=6;break;
    case 9: d1=1,d2=4,d3=6,d4=7,d5=3,d6=6;break;
    case 10:d1=150,d2=150,d3=150,d4=150,d5=150,d6=150;break;
    }
lcd.setCursor(e1,0);lcd.write((uint8_t)d1);
lcd.setCursor(e2,0);lcd.write((uint8_t)d2);lcd.setCursor(e3,0);lcd.write((uint8_t)d3);lcd.setCursor(e1,1);
lcd.write((uint8_t)d4);lcd.setCursor(e2,1);lcd.write((uint8_t)d5);lcd.setCursor(e3,1);lcd.write((uint8_t)d6);}</code></pre></div><p>ДАТЧИК</p><div class="codebox"><pre><code>#include &lt;SPI.h&gt;                                          
#include &lt;nRF24L01.h&gt; 
#include &lt;OneWire.h&gt;    // http://rcl-radio.ru/wp-content/uploads/2018/07/OneWire.zip                                    
#include &lt;RF24.h&gt;                                         
 RF24 radio(9, 10);     // (CE, CSN)
 OneWire  ds(2); // Вход датчика 18b20
 int data_t,data;  
 unsigned long times;
 int gis = 50;// 0.5 гр.цельсия

void setup(){
    delay(1000);
    Serial.begin(9600);
    pinMode(3,OUTPUT);
    radio.begin();                                        
    radio.setChannel(5);                   // канал от 0 до 127
    radio.setDataRate(RF24_250KBPS);       // RF24_250KBPS, RF24_1MBPS, RF24_2MBPS
    radio.setPALevel(RF24_PA_MIN);         // RF24_PA_MIN=-18dBm, RF24_PA_LOW=-12dBm, RF24_PA_HIGH=-6dBm, RF24_PA_MAX=0dBm
    radio.openReadingPipe(1, 0xA1A1A1A102);
    radio.openWritingPipe(0xA0A0A0A001);
    radio.startListening();               
}
void loop(){
    if(radio.available()){                                
      radio.read(&amp;data, sizeof(data));
      Serial.println(data);
      }

  if(millis()-times&gt;2000){times=millis();
  data_t = dsRead(0)*100;
  radio.stopListening();                                                     
  radio.write(&amp;data_t, sizeof(data_t));
  radio.startListening();
  }

  if(data*100 &gt;= data_t + gis){digitalWrite(3,HIGH);}
  if(data*100 &lt;= data_t - gis){digitalWrite(3,LOW);} 
}

float dsRead(byte x) {
  byte data[2], addr[8][8], kol = 0;
  while (ds.search(addr[kol])) {  // поиск датчиков, определение адреса и кол-ва датчиков
    kol++;
  } 
  ds.reset_search();  // Сброс поиска датчика
  ds.reset();         // Инициализация, выполняется сброс шины
  ds.select(addr[x]); // Обращение к датчику по адресу
  ds.write(0x44, 0);  // Измерение температуры с переносом данных в память
  ds.reset();         // Инициализация, выполняется сброс шины
  ds.select(addr[x]); // Обращение к датчику по адресу
  ds.write(0xBE);     // Обращение памяти
  data[0] = ds.read();// Чтение памяти byte low
  data[1] = ds.read();// Чтение памяти byte high
  float value = ((data[1] &lt;&lt; 8) | data[0]) / 16.0; return (float)value; // Расчет температуры и вывод
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[liman324]]></name>
				<uri>http://forum.rcl-radio.ru/profile.php?id=2</uri>
			</author>
			<updated>2022-07-22T07:15:57Z</updated>
			<id>http://forum.rcl-radio.ru/viewtopic.php?pid=6493#p6493</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Радио модули NRF24L01 (ARDUINO)]]></title>
			<link rel="alternate" href="http://forum.rcl-radio.ru/viewtopic.php?pid=6484#p6484" />
			<content type="html"><![CDATA[<p>ЭЛЕКТРОННЫЙ ТЕРМОМЕТР DS18B20</p><p><span class="postimg"><img src="http://forum.rcl-radio.ru/uploads/images/2022/07/bd61adbc89a1c7cf32eb9180a652d614.png" alt="http://forum.rcl-radio.ru/uploads/images/2022/07/bd61adbc89a1c7cf32eb9180a652d614.png" /></span> </p><br /><p>ПЕРЕДАТЧИК</p><div class="codebox"><pre><code>#include &lt;SPI.h&gt;                                          
#include &lt;nRF24L01.h&gt; 
#include &lt;OneWire.h&gt;    // http://rcl-radio.ru/wp-content/uploads/2018/07/OneWire.zip                                    
#include &lt;RF24.h&gt;                                         
 RF24 radio(9, 10);     // (CE, CSN)
 OneWire  ds(2); // Вход датчика 18b20
 int data_t;  

void setup(){
    radio.begin();                                        
    radio.setChannel(5);                     // канал от 0 до 127
    radio.setDataRate     (RF24_1MBPS);      // RF24_250KBPS, RF24_1MBPS, RF24_2MBPS
    radio.setPALevel      (RF24_PA_HIGH);    // RF24_PA_MIN=-18dBm, RF24_PA_LOW=-12dBm, RF24_PA_HIGH=-6dBm, RF24_PA_MAX=0dBm
    radio.openWritingPipe (0xA0A0A0A001);               
}
void loop(){
    data_t = dsRead(0)*100;                                                       
    radio.write(&amp;data_t, sizeof(data_t));
    delay(1000);                
}

float dsRead(byte x) {
  byte data[2], addr[8][8], kol = 0;
  while (ds.search(addr[kol])) {  // поиск датчиков, определение адреса и кол-ва датчиков
    kol++;
  } 
  ds.reset_search();  // Сброс поиска датчика
  ds.reset();         // Инициализация, выполняется сброс шины
  ds.select(addr[x]); // Обращение к датчику по адресу
  ds.write(0x44, 0);  // Измерение температуры с переносом данных в память
  ds.reset();         // Инициализация, выполняется сброс шины
  ds.select(addr[x]); // Обращение к датчику по адресу
  ds.write(0xBE);     // Обращение памяти
  data[0] = ds.read();// Чтение памяти byte low
  data[1] = ds.read();// Чтение памяти byte high
  float value = ((data[1] &lt;&lt; 8) | data[0]) / 16.0; return (float)value; // Расчет температуры и вывод
}</code></pre></div><p>ПРИЕМНИК</p><div class="codebox"><pre><code>#include &lt;SPI.h&gt;                                          
#include &lt;nRF24L01.h&gt;                                     
#include &lt;RF24.h&gt; 
#include &lt;LiquidCrystal_I2C.h&gt;  // http://forum.rcl-radio.ru/misc.php?action=pan_download&amp;item=45&amp;download=1
#include &lt;Wire.h&gt;                                       
  RF24 radio(9, 10);  // (CE, CSN)
  LiquidCrystal_I2C lcd(0x27,16,2);
 
 int data; 
 byte v1[8] = {0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07};
 byte v2[8] = {0x07,0x07,0x00,0x00,0x00,0x00,0x00,0x00};      
 byte v3[8] = {0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0x1F};
 byte v4[8] = {0x1F,0x1F,0x00,0x00,0x00,0x00,0x1F,0x1F};
 byte v5[8] = {0x1C,0x1C,0x00,0x00,0x00,0x00,0x1C,0x1C};
 byte v6[8] = {0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C};
 byte v7[8] = {0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x07};
 byte v8[8] = {0x1F,0x1F,0x00,0x00,0x00,0x00,0x00,0x00};
 byte d1,d2,d3,d4,d5,d6,e1,e2,e3,a[6],x;                                  

void setup(){
    delay(1000);
    Serial.begin(9600);
    radio.begin();                                        
    radio.setChannel(5);                      // канал от 0 до 127
    radio.setDataRate     (RF24_1MBPS);       // RF24_250KBPS, RF24_1MBPS, RF24_2MBPS 
    radio.setPALevel      (RF24_PA_HIGH);     // RF24_PA_MIN=-18dBm, RF24_PA_LOW=-12dBm, RF24_PA_HIGH=-6dBm, RF24_PA_MAX=0dBm
    radio.openReadingPipe (1, 0xA0A0A0A001);         
    radio.startListening  ();                             
//  radio.stopListening   (); 
    Wire.begin();lcd.init();lcd.backlight();
    lcd.createChar(1, v1);lcd.createChar(2, v2);lcd.createChar(3, v3);lcd.createChar(4, v4);
    lcd.createChar(5, v5);lcd.createChar(6, v6);lcd.createChar(7, v7);lcd.createChar(8, v8);                            
}
void loop(){
  if(radio.available()){                                
      radio.read(&amp;data, sizeof(data));
      Serial.println((float)data/100);
     a[0]=data/1000;
     a[1]=data/100%10;
     a[2]=data/10%10;
     a[3]=data%10;
     if(data&lt;1000){a[0]=10;}
     if(data&lt;100){a[1]=10;}
   for(x=0;x&lt;4;x++){
    switch(x){
        case 0: e1=0;e2=1,e3=2;break;
        case 1: e1=3,e2=4,e3=5;break;
        case 2: e1=7,e2=8,e3=9;break;
        case 3: e1=10,e2=11,e3=12;break;
   }digit();}
   lcd.setCursor(6,1);lcd.print(&quot;.&quot;);
   lcd.setCursor(14,1);lcd.write((uint8_t)223);;lcd.print(&quot;C&quot;);
   lcd.setCursor(15,0);lcd.print(&quot;*&quot;);
   delay(200);
  }
  else{lcd.setCursor(15,0);lcd.print(&quot; &quot;);}
}

void digit(){
  switch(a[x]){
    case 0: d1=1,d2=8,d3=6,d4=1,d5=3,d6=6;break;
    case 1: d1=32,d2=2,d3=6,d4=32,d5=32,d6=6;break;
    case 2: d1=2,d2=8,d3=6,d4=1,d5=4,d6=5;break;
    case 3: d1=2,d2=4,d3=6,d4=7,d5=3,d6=6;break;
    case 4: d1=1,d2=3,d3=6,d4=32,d5=32,d6=6;break;
    case 5: d1=1,d2=4,d3=5,d4=7,d5=3,d6=6;break;
    case 6: d1=1,d2=4,d3=5,d4=1,d5=3,d6=6;break;
    case 7: d1=1,d2=8,d3=6,d4=32,d5=32,d6=6;break;
    case 8: d1=1,d2=4,d3=6,d4=1,d5=3,d6=6;break;
    case 9: d1=1,d2=4,d3=6,d4=7,d5=3,d6=6;break;
    case 10:d1=150,d2=150,d3=150,d4=150,d5=150,d6=150;break;
    }
lcd.setCursor(e1,0);lcd.write((uint8_t)d1);
lcd.setCursor(e2,0);lcd.write((uint8_t)d2);lcd.setCursor(e3,0);lcd.write((uint8_t)d3);lcd.setCursor(e1,1);
lcd.write((uint8_t)d4);lcd.setCursor(e2,1);lcd.write((uint8_t)d5);lcd.setCursor(e3,1);lcd.write((uint8_t)d6);}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[liman324]]></name>
				<uri>http://forum.rcl-radio.ru/profile.php?id=2</uri>
			</author>
			<updated>2022-07-21T08:41:32Z</updated>
			<id>http://forum.rcl-radio.ru/viewtopic.php?pid=6484#p6484</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Радио модули NRF24L01 (ARDUINO)]]></title>
			<link rel="alternate" href="http://forum.rcl-radio.ru/viewtopic.php?pid=6483#p6483" />
			<content type="html"><![CDATA[<p><span class="postimg"><img src="http://forum.rcl-radio.ru/uploads/images/2022/07/022e4752ddb7313205452167b1da5a4e.png" alt="http://forum.rcl-radio.ru/uploads/images/2022/07/022e4752ddb7313205452167b1da5a4e.png" /></span> </p><p><span class="attention-yellow"></span> </p><br /><p>ПЕРЕДАТЧИК</p><div class="codebox"><pre><code>#include &lt;SPI.h&gt;                                          
#include &lt;nRF24L01.h&gt;                                     
#include &lt;RF24.h&gt;                                         
 RF24 radio(9, 10);     // (CE, CSN)
 int data[2];  

void setup(){
    radio.begin();                                        
    radio.setChannel(5);                     // канал от 0 до 127
    radio.setDataRate     (RF24_1MBPS);      // RF24_250KBPS, RF24_1MBPS, RF24_2MBPS
    radio.setPALevel      (RF24_PA_HIGH);    // RF24_PA_MIN=-18dBm, RF24_PA_LOW=-12dBm, RF24_PA_HIGH=-6dBm, RF24_PA_MAX=0dBm
    radio.openWritingPipe (0xA0A0A0A001);               
}
void loop(){
    data[0] = 1234;                             
    data[1] = 5678;                             
    radio.write(&amp;data, sizeof(data)); 
    delay(1000);                
}</code></pre></div><p>ПРИЕМНИК</p><div class="codebox"><pre><code>#include &lt;SPI.h&gt;                                          
#include &lt;nRF24L01.h&gt;                                     
#include &lt;RF24.h&gt;                                        
  RF24 radio(9, 10);  // (CE, CSN)

  int data[2];                                   

void setup(){
    delay(1000);
    Serial.begin(9600);
    radio.begin();                                        
    radio.setChannel(5);                      // канал от 0 до 127
    radio.setDataRate     (RF24_1MBPS);       // RF24_250KBPS, RF24_1MBPS, RF24_2MBPS 
    radio.setPALevel      (RF24_PA_HIGH);     // RF24_PA_MIN=-18dBm, RF24_PA_LOW=-12dBm, RF24_PA_HIGH=-6dBm, RF24_PA_MAX=0dBm
    radio.openReadingPipe (1, 0xA0A0A0A001);         
    radio.startListening  ();                             
//  radio.stopListening   ();                             
}
void loop(){
  if(radio.available()){                                
      radio.read(&amp;data, sizeof(data));
      Serial.println(data[0]);
      Serial.println(data[1]);
    }
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[liman324]]></name>
				<uri>http://forum.rcl-radio.ru/profile.php?id=2</uri>
			</author>
			<updated>2022-07-21T07:00:02Z</updated>
			<id>http://forum.rcl-radio.ru/viewtopic.php?pid=6483#p6483</id>
		</entry>
</feed>
