Created
December 8, 2020 17:53
-
-
Save yemreeke/603967e561665607957588fd52360926 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <IRremote.h> | |
IRrecv irrecv(7); //IR alıcının data pini | |
decode_results results; | |
int Role=8; | |
#define PowerTUS 0x1CE3F00F | |
#define MuteTUS 0x1CE332CD | |
void setup() { | |
irrecv.enableIRIn(); //Aktif ediyoruz | |
pinMode(Role,OUTPUT); | |
} | |
void loop() { | |
if (irrecv.decode(&results)){ | |
//Eğer tuşa basıldığı algılandıysa | |
if(results.value==PowerTUS) //Röle Aç | |
digitalWrite(Role,HIGH); | |
else if(results.value==MuteTUS)//Röle Kapat | |
digitalWrite(Role,LOW); | |
irrecv.resume();// Daha sonraki değer için bekle. | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment