Содержание nRF24L01

Страница 1: ...1 51 Local Connectivity nRF24L01 Eueung Mulyana https eueung github io 012017 nrf24 CodeLabs Attribution ShareAlike CC BY SA...

Страница 2: ...Outline Introduction Getting Started Preparation Getting Started Code Play Simple Remote Control Gateway 2 51...

Страница 3: ...3 51...

Страница 4: ...Introduction 4 51...

Страница 5: ...synthesizer and baseband logic including the hardware protocol accelerator Enhanced ShockBurst supporting a high speed SPI interface for the application controller With peak RX TX currents lower than...

Страница 6: ...400 2 4835 GHz Spacing at 1 or 2 MHz GFSK 2 126 RF Channels 3 Air Data Rate Con gurable to 2 Mbps Options 250 kbps 1 Mbps 4 4 Pin Hardware SPI 5 5V Tolerant Inputs 6 6 Data Pipe MultiCeiver for 1 6 s...

Страница 7: ...Pin Map 7 51...

Страница 8: ...Important Notes Radio is sensitive to Noises Make sure that the circuit wire solder etc is stable Anything uxtuates is bad 8 51...

Страница 9: ...Preparation Getting Started 9 51...

Страница 10: ...This setup is for demo purpose only Can be any MCUs 10 51 Getting Started Arduino IDE NodeMCU Nano 1 Install RF24 Library 2 Prepare the First Node NodeMCU 3 Prepare the Second Node Arduino Nano...

Страница 11: ...RF24 Library 11 51...

Страница 12: ...RF24 Library 12 51...

Страница 13: ...First Node NodeMCU 13 51...

Страница 14: ...First Node NodeMCU 14 51...

Страница 15: ...Second Node Nano 15 51...

Страница 16: ...Second Node Nano 16 51...

Страница 17: ...Code Play Getting Started 17 51...

Страница 18: ...Simple Transmit Receive NodeMCU Transmit Nano Receive Ref Example Sketches 18 51...

Страница 19: ...e Transmit data Test dataTransmitted 100 myRadio begin myRadio setChannel 108 myRadio setPALevel RF24_PA_MIN myRadio openWritingPipe addresses 0 delay 1000 void loop myRadio write dataTransmitted size...

Страница 20: ...itted 100 No Acknowledge expected Data Transmitted 101 No Acknowledge expected Data Transmitted 102 No Acknowledge expected Data Transmitted 103 No Acknowledge expected Data Transmitted 104 No Acknowl...

Страница 21: ...00 Serial println F RF24 Simple Receive data Test myRadio begin myRadio setChannel 108 myRadio setPALevel RF24_PA_MIN myRadio openReadingPipe 1 addresses 0 myRadio startListening void loop if myRadio...

Страница 22: ...22 51 Nano Serial RF24 Simple Receive data Test Data received 100 Data received 101 Data received 102 Data received 103 Data received 104 Data received 105...

Страница 23: ...RF24 Sample Code 23 51...

Страница 24: ...RF24 Sample Code GettingStarted 24 51...

Страница 25: ...n radio setChannel 108 radio setPALevel RF24_PA_MIN if radioNumber radio openWritingPipe addresses 1 radio openReadingPipe 1 addresses 0 else radio openWritingPipe addresses 0 radio openReadingPipe 1...

Страница 26: ...Now sending failed Failed response timed out Now sending failed Failed response timed out Now sending failed Failed response timed out Now sending failed Failed response timed out Now sending failed...

Страница 27: ...ntln F RF24 examples GettingStarted Serial println F PRESS T to begin transmitting to the other node radio begin radio setChannel 108 radio setPALevel RF24_PA_MIN if radioNumber radio openWritingPipe...

Страница 28: ...MCU Switch It On RF24 examples GettingStarted PRESS T to begin transmitting to the other node After NodeMCU Switched ON Sent response 9284083 Sent response 10286475 Sent response 11288847 Sent respons...

Страница 29: ...Got response 19614686 Round trip delay 1840 microseconds Now sending Sent 20617552 Got response 20617552 Round trip delay 1803 microseconds Now sending Sent 21619866 Got response 21619866 Round trip...

Страница 30: ...Simple Remote Control 30 51...

Страница 31: ...NodeMCU Remote Controller 31 51...

Страница 32: ...Nano Local Controller 32 51...

Страница 33: ...Simple Remote Control 33 51...

Страница 34: ...egin 115200 delay 1000 myRadio begin myRadio setChannel 108 myRadio setPALevel RF24_PA_MIN myRadio openWritingPipe addresses 0 delay 1000 void loop int newButton digitalRead SW1 if newButton button bu...

Страница 35: ...51 NodeMCU Serial After Some ON OFFs 1384 room 16 tail 8 chksum Data Transmitted 20 Data Transmitted 10 Data Transmitted 20 Data Transmitted 10 Data Transmitted 20 Data Transmitted 10 Data Transmitted...

Страница 36: ...elay 1000 myRadio begin myRadio setChannel 108 myRadio setPALevel RF24_PA_MIN myRadio openReadingPipe 1 addresses 0 myRadio startListening void loop if myRadio available while myRadio available myRadi...

Страница 37: ...51 Nano Serial After Some ON OFFs Data received 20 Data received 10 Data received 20 Data received 10 Data received 20 Data received 10 Data received 20 Data received 10 Data received 20 Data received...

Страница 38: ...Simple Remote Control 38 51...

Страница 39: ...Nano Attach a Device 39 51...

Страница 40: ...Nano Attach a Device 40 51...

Страница 41: ...Connecting to Blynk Cloud Gateway 41 51...

Страница 42: ...Notes This is only an example of integration of local connected sensors and actuators to other cloud based services This is applicable not only for Blynk or Firebase but also for other services 42 51...

Страница 43: ...bed14d1234567 char ssid emAP 01 char pass 1010101010 BLYNK_WRITE V1 int pinValue param asInt if pinValue HIGH dataTransmitted 20 else dataTransmitted 10 myRadio write dataTransmitted sizeof dataTransm...

Страница 44: ...Blynk Button with Virtual Pin V1 44 51...

Страница 45: ...d 20 pinValue 0 Data Transmitted 10 pinValue 1 Data Transmitted 20 pinValue 0 Data Transmitted 10 pinValue 1 Data Transmitted 20 pinValue 0 Data Transmitted 10 pinValue 1 Data Transmitted 20 Data Tran...

Страница 46: ...Refs Resources 46 51...

Страница 47: ...Refs Resources 1 Nordic Semiconductor 2 Example Sketches arduino info 3 Connecting the Radio MySensors 4 nRF24 RF24 Optimized fork of nRF24L01 for Arduino Raspberry Pi Linux Devices 47 51...

Страница 48: ...NodeMCU V1 0 Pin Map 48 51...

Страница 49: ...Nano V3 0 Pin Map 49 51...

Страница 50: ...Nano V3 0 Pin Map 50 51...

Страница 51: ...51 51 END Eueung Mulyana https eueung github io 012017 nrf24 CodeLabs Attribution ShareAlike CC BY SA...

Отзывы: