-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path29_UNIR_RX_ACK_nRF24L_arduino.ino
71 lines (56 loc) · 2.51 KB
/
29_UNIR_RX_ACK_nRF24L_arduino.ino
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
/*Project:
29_UNIR_RX_ACK_nRF24L_arduino
Link: [TODO: link to jungletronics page goes here ]
Objective:
This sketch is to upload to Arduino paired with nRF24L Radio. SEE Project #28.
This is the most basic and straightforward test ever conducted for dealing with the nRF24L Radio.
The receiver acknowledges the transmitter.
Tutorial: https://youtu.be/tWEgvS7Sj-8?si=zdPP_o1gHMPNGU54
This is a component of my study on nRF24L0 radios.
It was developed during the N.A.V.E TECH UNIR Samsung Eletrônica da Amazônia LTDA
In Porto Velho - RO - Brazil, Course from November 2023 to April 2024.
The project was supervised by Professor Dr. Ciro José Egoavil Montero
(https://www.linkedin.com/in/ciro-j-egoavil-210b7a44/?originalSubdomain=br),
an Associate Professor III in Electrical Engineering at the Federal University of Rondônia (UNIR).
homePage : (https://navetech.unir.br/) EDITAL Nº 01/2023/NAVE-Tech-RO/UNIR
(https://ciroegoavil.unir.br/homepage) Engenharia Elétrica da Fundação Universidade Federal de Rondônia (UNIR):
Authors: OLIVEIRA, Gilberto Jr (J3)
Hardware: Development Boards:
Arduino Uno R3
(https://docs.arduino.cc/hardware/uno-rev3 )
Software: Arduino IDE 2.2.1
Connections:
Arduino - Radio SPI - Wire Color
7 - CE - Black
8 - CSN - White
13 - SCK - Orange
11 - MOSI - Yellow
12 - MISO - Blue
3 - IRQ - Red
output: The radio receives an integer that increments by one.
Based on:
dparson
NRFLite Arduino nRF24L01 library
https://youtu.be/tWEgvS7Sj-8?si=zdPP_o1gHMPNGU54
https://github.com/dparson55/NRFLite/tree/master
Date: 14 jan 2024
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License v3 as published by
*/
#include <SPI.h>
#include <NRFLite.h>
NRFLite _radio;
uint8_t _data;
void setup()
{
Serial.begin(115200);
_radio.init(0, 7, 8); // Set radio to Id = 0, along with its CE and CSN pins
}
void loop() {
if (_radio.hasData()){
_radio.readData(&_data);
Serial.println(_data);
uint8_t ackData = _data + 100;
_radio.addAckData(&ackData, sizeof(ackData));
}
}