Created
November 14, 2017 06:12
-
-
Save YDKK/0a1ed6fe532c56fb41c22c0211c57428 to your computer and use it in GitHub Desktop.
This file contains hidden or 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> | |
IRsend irsend; | |
int zentouPin = 2; | |
int syoutouPin = 4; | |
unsigned int zentouRaw[131] = { | |
4100, 1600, 650, 250, 600, 1200, 600, 250, 650, 1200, | |
650, 250, 600, 1200, 650, 250, 600, 1250, 600, 250, | |
600, 1250, 600, 250, 600, 1200, 650, 1200, 600, 300, | |
600, 1200, 600, 300, 600, 1250, 550, 1250, 600, 1200, | |
600, 1250, 600, 300, 550, 300, 600, 1250, 600, 1250, | |
550, 300, 600, 1200, 600, 1250, 600, 300, 550, 1250, | |
600, 300, 550, 300, 600, 300, 550, 1300, 550, 300, | |
550, 350, 550, 350, 550, 300, 600, 300, 550, 300, | |
600, 300, 550, 1300, 550, 300, 600, 300, 550, 300, | |
600, 300, 550, 350, 550, 350, 550, 300, 550, 1250, | |
600, 300, 600, 300, 550, 350, 550, 300, 550, 1300, | |
550, 300, 550, 350, 550, 1300, 550, 300, 550, 350, | |
550, 300, 550, 1300, 550, 300, 550, 350, 550, 1300, | |
550 | |
}; | |
unsigned int syoutouRaw[131] = { | |
4050, 1650, 650, 250, 600, 1200, 650, 250, 600, 1200, | |
650, 250, 600, 1250, 600, 250, 600, 1250, 600, 250, | |
600, 1250, 600, 300, 600, 1200, 600, 1250, 550, 300, | |
600, 1250, 600, 250, 600, 1250, 600, 1200, 600, 1250, | |
550, 1300, 550, 300, 600, 300, 550, 1250, 600, 1250, | |
550, 350, 550, 1250, 550, 1250, 600, 300, 550, 1300, | |
550, 300, 550, 350, 550, 300, 600, 1250, 550, 350, | |
550, 300, 550, 350, 550, 300, 550, 350, 550, 350, | |
550, 300, 600, 300, 550, 1300, 550, 300, 550, 350, | |
550, 300, 550, 350, 550, 350, 500, 350, 550, 1300, | |
550, 300, 550, 350, 550, 350, 550, 350, 500, 1300, | |
500, 400, 500, 350, 550, 1250, 550, 350, 550, 400, | |
500, 350, 500, 400, 500, 1300, 550, 350, 500, 1300, | |
550 | |
}; | |
void setup() | |
{ | |
pinMode(zentouPin, INPUT); | |
pinMode(syoutouPin, INPUT); | |
Serial.begin(9600); | |
} | |
void loop() { | |
int button = digitalRead(zentouPin); | |
if (button == HIGH) { | |
irsend.sendRaw(zentouRaw, sizeof(zentouRaw) / sizeof(zentouRaw[0]), 38); | |
delay(100); | |
} | |
button = digitalRead(syoutouPin); | |
if (button == HIGH) { | |
irsend.sendRaw(syoutouRaw, sizeof(syoutouRaw) / sizeof(syoutouRaw[0]), 38); | |
delay(100); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment