Things used in this project

Hardware components:
nRF24L01+
×2
ATtiny85
×1
A000066 iso both
Arduino UNO & Genuino UNO
×1
Ceramic Capacitor - 10nF
×1
Carbon Film Resistor - 22kΩ
×1
Switching Diode - 1n4148
×1
Power Source - 3v3
×1
nRF24L01+ Socket Adapter
Optional
×1

Schematics

nRF24L01+ with ATtiny85 3 Pins
nRF24L01+(With Socket) Attiny85.fzz
nRF24L01+ with Arduino Uno
nRF24L01+ Arduino Uno.fzz

Code

TransmitterC/C++
#define CE_PIN 3
#define CSN_PIN 3 //Since we are using 3 pin configuration we will use same pin for both CE and CSN

#include "RF24.h"

RF24 radio(CE_PIN, CSN_PIN);

byte address[11] = "SimpleNode";
unsigned long payload = 0;

void setup() {
  radio.begin(); // Start up the radio
  radio.setAutoAck(1); // Ensure autoACK is enabled
  radio.setRetries(15,15); // Max delay between retries & number of retries
  radio.openWritingPipe(address); // Write to device address 'SimpleNode'
}

void loop(void){
  payload++;
  radio.write( &payload, sizeof(unsigned long) ); //Send data to 'Receiver' ever second
  delay(1000);
}
ReceiverC/C++
#define CE_PIN 7
#define CSN_PIN 8

#include <SPI.h>
#include "RF24.h"

RF24 radio(CE_PIN, CSN_PIN);

byte address[11] = "SimpleNode";
unsigned long payload = 0;

void setup() {
  Serial.begin(115200);
  radio.begin(); // Start up the radio
  radio.setAutoAck(1); // Ensure autoACK is enabled
  radio.setRetries(15,15); // Max delay between retries & number of retries
  radio.openReadingPipe(1, address); // Write to device address 'SimpleNode'
  radio.startListening();
}

void loop(void){
  radio.stopListening();
  radio.startListening();
  radio.read( &payload, sizeof(unsigned long) );
  if(payload != 0){
    Serial.print("Got Payload ");
    Serial.println(payload);
  }
  delay(1000);
}

Credits

Face logo kgqz4zceit
Arjun Ganesan
5 projects • 73 followers
27. Web, Mobile and Desktop Developer. Hacker. Gamer. IoT Enthusiast. Electronics for Hobby and Fun.
Contact
Thanks to Ralph Doncaster.

Replications

Did you replicate this project? Share it!

I made one

Love this project? Think it could be improved? Tell us what you think!

Give feedback

Comments

Sign up / LoginProjectsPlatformsTopicsContestsLiveAppsBetaBlog