Things used in this project

Hardware components:
nrf24l01
×5
switch reed
×1
Relay (generic)
×1
Atmel ATTiny84
×1
Maxim Integrated DS18B20
×1
12994 02
Raspberry Pi 1 Model B+
×1
A000066 iso both
Arduino UNO & Genuino UNO
×1
Software apps and online services:
Ide web
Arduino IDE
Hand tools and fabrication machines:
09507 01
Soldering iron (generic)

Schematics

Opening detector
Schema aqzjhgzhuv

Code

Opening detectorArduino
#include <RF24Network.h>
#include <RF24.h>
#include <PinChangeInterrupt.h> 
#include <init_variable_attiny.h>
#include "check_btn.h"

const byte this_node = 1;
const byte other_node = 0;

void setup() { 
	pinMode(csn_pin, OUTPUT); 
	attachPinChangeInterrupt(digitalPinToPCINT(2),check_btn,FALLING); 
	radio.begin();
	network.begin(95, this_node);
	radio.setDataRate(RF24_250KBPS);   
}

void check_btn(void)
{
  detectchange = true; 
}

void loop() {   
	if (detectchange) {    
		digitalWrite(csn_pin,HIGH);
		radio.powerUp(); 
		SendDataRF24('open',other_node); 
		detectchange = false; 
	} 
}

Credits

6e014f8d2360a2f0ccd008504a47c4a7
Thibault
1 project • 5 followers
Contact

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