workshop/infrared_controller/main

Arduinoで赤外線リモコン

ここではArduinoを利用して赤外線リモコンを制作する手順を紹介します.

参考ウェブサイト


サンプルデータ

フルカラーLED
OFF
912,444,60,53,66,45,66,47,63,50,63,47,66,47,63,50,64,47,66,160,64,161,65,158,66,160,64,47,66,160,64,161,63,161,65,47,63,161,66,47,64,50,63,47,66,47,63,50,64,47,66,161,64,47,66,160,64,160,64,160,66,160,64,160,63,161,66,4109,910,219,60

ON
914,441,63,50,63,47,66,47,64,50,63,47,63,50,64,50,63,47,66,161,63,161,63,160,66,161,63,47,66,161,63,160,66,158,66,160,64,160,64,50,60,50,66,47,63,50,63,47,66,47,63,50,64,47,66,160,63,161,63,160,66,160,61,163,64,160,66

照度下げる
910,444,60,52,61,50,64,49,53,60,61,53,60,50,60,52,62,50,63,163,60,164,53,170,64,162,61,49,64,162,61,163,53,171,64,162,62,48,64,50,53,60,56,54,63,50,53,60,56,54,59,55,60,164,58,171,53,168,61,163,59,168,56,172,58,163,58,4116,900,228,61

照度上げる
905,448,58,55,53,57,56,57,58,55,55,55,56,57,58,55,56,55,58,168,53,170,58,166,59,168,54,57,58,168,54,170,58,166,56,57,58,55,56,55,58,55,58,56,55,55,59,54,58,55,53,171,58,166,56,171,54,170,58,166,56,171,53,170,58,166,56,4118,905,224,54

R1(リモコン縦方向に1,2,3,4,5)
904,449,55,59,56,54,59,54,54,58,56,54,59,54,54,58,56,54,59,167,57,167,55,169,59,167,57,54,59,167,57,167,55,170,59,54,55,58,57,167,55,58,57,54,59,54,58,55,57,54,59,167,57,167,55,58,56,167,55,169,60,167,56,168,55,169,60,4115,904,224,57,92184,34

R2
905,448,58,54,58,56,56,54,59,54,57,56,56,54,59,54,50,62,56,168,57,166,59,168,56,168,50,63,56,169,49,174,59,168,56,54,58,54,50,63,56,168,50,63,57,54,59,54,58,56,56,168,57,167,59,168,56,54,59,168,56,168,57,167,58,168,56

R3
903,451,56,54,58,54,58,56,56,54,59,54,58,55,56,54,59,54,58,166,59,168,56,168,58,166,58,55,57,166,59,168,56,168,58,55,56,54,59,168,56,168,50,63,56,54,59,54,58,56,56,168,58,166,59,54,57,56,56,162,64,166,59,168,56,168,58,4117,903,223,59

R4
904,449,58,53,60,52,52,62,58,52,60,53,51,62,58,53,60,53,52,172,60,166,58,166,51,173,60,53,51,172,61,166,58,166,51,61,58,52,60,53,51,62,58,166,51,62,58,52,60,52,51,172,61,166,58,167,51,172,61,53,51,173,60,166,58,166,51

R5
907,446,61,52,52,62,58,53,60,52,51,62,58,53,60,53,51,62,57,166,51,172,60,166,58,167,51,61,58,167,51,172,60,167,57,53,60,53,56,167,61,53,56,168,60,53,56,57,58,53,60,166,58,167,56,57,57,167,56,57,58,166,56,168,60,167,57  

G     
901,452,50,63,56,54,59,54,50,63,56,54,59,54,50,63,57,54,59,167,57,167,50,174,59,168,56,54,59,167,56,168,50,174,60,167,57,54,59,1
67,57,54,59,54,50,62,57,54,59,54,50,63,56,168,50,62,57,168,50,174,59,167,57,167,50,174,59

G2
904,449,58,52,61,52,58,55,58,54,60,52,58,56,58,52,60,53,57,166,60,167,57,166,58,166,60,53,58,166,60,167,57,167,58,166,60,53,57,56,58,166,58,56,58,52,60,53,58,56,57,52,60,166,58,166,58,55,58,166,58,166,61,167,57,167,57,4117,904,222,60

G3
904,449,58,53,60,53,58,55,58,53,61,52,57,56,58,52,60,53,58,166,60,166,58,166,58,166,60,53,58,166,60,166,58,167,57,167,60,53,57,166,60,166,57,53,61,52,57,55,58,53,60,53,58,166,60,53,58,54,58,166,57,167,60,166,58,166,58

G4
904,450,57,53,60,53,54,59,59,50,60,53,52,62,57,53,60,54,51,172,60,166,58,166,57,167,58,55,54,170,62,164,57,167,54,170,60,53,54,59,54,56,59,167,55,56,57,56,51,62,57,54,60,166,57,167,54,169,58,56,53,170,57,170,54,169,57

G5
903,450,60,51,57,56,57,56,57,54,57,56,55,58,57,54,60,53,57,167,60,166,58,166,57,167,57,56,54,170,60,166,57,167,57,167,59,54,56,167,60,53,57,167,59,53,57,56,57,54,60,53,54,169,60,53,58,167,60,53,57,168,60,167,57,167,56    

B1
901,452,50,63,56,54,59,54,50,63,56,54,59,54,49,63,57,54,59,167,57,168,50,174,59,167,57,54,59,167,57,168,50,174,59,54,50,174,59,168,56,54,59,54,50,62,57,54,59,54,50,174,58,54,50,63,56,168,50,174,59,168,56,168,50,174,59,4115,902,228,56

B2
904,449,58,53,60,52,58,56,58,53,60,52,58,56,57,53,60,53,58,166,60,166,57,167,57,166,60,53,57,167,60,166,58,166,58,56,57,167,57,56,58,166,58,56,57,53,60,53,57,55,58,166,57,56,57,166,57,55,58,166,57,167,60,166,58,166,57,4118,904,222,60

B3
903,450,57,53,60,53,57,56,57,54,60,53,57,56,57,53,60,53,57,166,60,167,57,166,58,166,60,53,57,167,60,166,58,167,57,55,58,167,57,166,60,166,58,53,60,53,57,56,57,53,60,166,58,54,59,54,57,56,57,167,57,167,60,166,58,166,57,4118,904,222,60

B4
903,450,57,53,60,53,57,56,57,54,60,53,57,56,57,53,60,53,57,166,60,167,57,166,58,166,60,53,57,167,60,166,58,167,57,55,58,167,57,166,60,166,58,53,60,53,57,56,57,53,60,166,58,54,59,54,57,56,57,167,57,167,60,166,58,166,57,4118,904,222,60

B5
904,449,58,53,60,52,58,56,58,52,60,53,57,56,58,53,60,53,57,166,61,166,58,166,58,166,61,52,58,166,60,166,58,166,58,55,58,166,58,167,59,53,57,166,60,53,58,55,57,53,60,166,58,53,63,50,58,166,60,53,58,166,60,167,57,167,60    

W
901,452,50,63,56,54,59,54,50,62,57,54,59,54,50,63,56,53,59,168,57,167,50,174,59,167,57,54,59,167,57,167,50,174,59,167,57,167,50,174,59,54,50,63,56,54,59,54,50,63,57,54,59,54,50,63,56,167,50,174,59,167,57,167,50,174,59,4116,904,224,56      

FLASH
904,449,58,53,60,53,57,56,58,53,60,52,58,55,58,53,60,53,57,166,60,166,57,167,57,166,60,53,57,166,61,166,58,166,57,168,60,166,58,53,60,166,58,53,60,53,57,56,58,53,60,53,58,56,57,167,57,56,57,166,58,166,60,168,57,167,57,4117,904,222,60 

STROBE
904,449,54,56,57,56,60,54,54,56,58,56,59,53,55,56,57,56,60,164,57,170,54,169,60,164,58,55,60,165,57,170,54,169,60,164,57,170,55,169,60,164,58,56,59,53,55,56,57,56,60,54,58,52,57,56,59,54,55,169,60,164,58,169,55,169,60,4114,904,222,61 

FADE
904,450,58,53,60,52,58,56,60,51,60,53,58,56,57,53,60,53,58,166,61,166,58,166,58,166,60,53,58,166,60,166,58,166,58,166,61,167,57,53,62,50,58,166,60,52,58,56,57,52,60,53,57,56,57,166,58,166,60,53,57,166,60,167,57,166,58 

SMOOTH
904,450,57,53,60,53,54,58,58,53,59,54,54,60,56,54,59,54,54,170,60,167,57,167,54,170,60,54,54,170,60,167,57,166,55,170,60,167,57,167,54,58,58,167,54,59,57,53,60,54,51,62,57,54,60,53,54,170,60,53,57,167,60,166,55,170,54,4120,904,222,60
扇風機
on (mode_1)
234,338,44,130,132,42,132,44,42,130,132,44,130,44,130,42,44,130,44,129,44,129,44,129,44,129,44,129,44,129,44,130,132,41,44,675,231,343,44,130,128,46,127,46,44,130,128,46,127,46,128,46,44,130,44,130,44,129,44,130,44,130,44,130,44,130,44,130,128,48,41,675,231,343,43,130,128,48,125,46,42,131,128,47,127,48,126,46,36,137,43,130,36,138,42,131,43,131,36,137,43,130,43,130,128,48,34,682,232,342,36,137,128,46,127,46,36,138,127,46,128,46,128,48,34,137,36,138,36,137,36,137,36,138,36,136,36,137,43,130,128,46,36
mode_2
230,343,36,137,127,49,124,46,36,137,127,49,125,49,124,49,34,137,36,138,127,47,36,136,37,136,36,138,127,49,125,49,33,137,36,683,230,343,37,136,128,49,124,49,34,137,127,49,125,49,125,49,34,136,37,138,127,49,34,137,36,137,36,137,127,49,125,46,36,137,36,682,238,336,36,137,127,49,125,49,34,137,127,49,124,47,127,49,34,137,36,137,127,49,34,136,37,138,36,137,127,49,125,47,36,137,36,682,230,343,36,138,127,47,127,49,34,137,127,49,125,49,124,49,34,137,37,138,126,47,36,136,37,137,36,138,126,49,125,49,34,137,37,683,231,343,36,137,127,50,124,47,36,137,127,49,125,49,125,49,34,137,36,137,127,49,34,137,36,137,36,138,127,49,124,49,34,137,37,683,231,343,36,137,127,47,126,49,34,137,127,50,124,49,124,49,34,137,36,137,127,49,34,137,36,137,37,137,128,49,125,49,34,137,36

mode_3
234,338,44,130,132,42,132,42,44,130,132,42,132,42,132,44,42,130,44,130,132,41,44,129,44,128,46,130,132,44,130,41,44,130,44,674,236,338,44,129,133,42,132,41,44,130,132,42,132,41,132,42,44,130,44,129,133,43,42,130,44,129,44,130,132,44,130,44,42,129,44,674,236,338,44,130,132,42,132,42,44,130,132,44,130,42,133,41,44,129,44,130,132,44,42,130,44,129,44,130,132,44,130,41,44,129,44,674,236,338,44,129,133,42,132,42,44,130,132,42,132,44,130,42,44,129,44,130,132,42,44,130,44,129,44,129,132,42,131,42,44,130,44

mode_4
234,338,44,130,132,42,132,43,42,130,133,41,133,42,132,41,44,130,44,130,133,40,44,130,44,130,43,130,133,41,133,41,43,130,44,674,237,338,43,130,133,41,133,43,42,130,133,43,130,43,130,41,44,130,44,130,133,43,41,130,43,130,44,130,133,41,133,40,44,130,44,680,228,346,44,130,131,45,129,42,44,130,132,45,129,44,130,44,44,127,47,127,130,46,44,127,44,129,44,130,130,46,125,49,41,132,41,675,237,336,37,138,134,42,124,49,34,137,127,49,124,47,127,49,34,137,36,138,127,49,34,137,36,136,37,137,127,49,125,49,34,137,36

SLEEP_1h
233,338,45,129,132,44,129,44,42,130,132,42,132,45,129,42,44,130,44,129,44,129,44,130,44,129,44,130,124,52,42,129,44,130,44,674,228,345,44,130,125,51,122,50,43,130,124,49,124,49,125,51,41,130,44,130,44,129,44,130,44,129,44,129,125,49,44,130,44,130,44,674,228,346,44,129,125,50,124,49,44,130,124,49,124,50,131,44,42,129,44,130,44,129,44,129,44,129,44,130,124,49,44,130,44,129,44,675,228,346,44,130,124,49,124,49,44,130,131,43,131,42,132,42,44,129,44,129,44,129,44,129,44,130,46,127,131,45,42,129,46,127,47
2h
233,336,44,130,134,42,132,39,46,127,135,39,134,39,134,39,46,127,47,127,46,127,47,127,46,127,47,127,132,44,44,128,46,127,46,672,236,338,44,129,132,45,128,45,41,129,132,43,124,52,122,49,44,129,44,129,44,130,44,129,44,129,44,130,131,45,42,129,44,129,44,674,235,338,45,129,132,44,122,49,44,129,124,52,122,49,125,52,42,129,44,129,44,130,44,130,44,129,44,130,132,44,41,130,44,130,44,674,237,337,44,130,133,40,133,41,44,130,133,41,132,41,133,41,44,129,44,129,44,129,44,129,44,129,44,129,132,42,44,129,44,129,44,678,236,338,44,129,133,42,132,41,44,130,132,42,132,41,133,43,42,129,44,130,44,130,44,130,44,130,43,130,134,40,44,130,44,130,44
4h
230,344,36,137,127,47,127,49,33,137,128,49,125,49,124,49,34,137,36,136,37,137,36,137,36,139,34,138,126,49,34,137,36,137,37,682,231,343,37,137,127,47,127,47,36,137,127,49,124,47,127,47,36,137,37,137,36,137,37,137,36,137,37,137,127,47,36,137,37,137,36,686,231,343,37,137,127,46,127,47,36,137,127,49,124,47,126,47,36,137,36,137,36,136,37,137,36,137,37,136,128,49,34,137,37,137,36,680,231,343,36,137,127,49,124,47,36,137,127,47,126,49,125,49,34,137,36,136,37,137,37,136,37,137,36,137,127,49,34,137,36,136,37

SLEEP_OFF
234,338,43,130,132,42,131,42,44,130,132,42,131,43,130,43,44,129,44,129,44,129,45,129,44,129,44,130,131,44,42,129,44,129,44,674,236,338,44,129,132,42,131,44,42,130,132,44,130,42,132,44,42,129,44,129,44,129,45,129,46,127,47,127,132,44,42,130,46,129,44,672,236,338,46,127,132,42,132,44,44,128,132,44,130,44,129,42,46,127,47,127,46,128,46,127,47,127,46,128,132,44,44,127,46,127,46,673,235,338,46,127,132,45,129,44,44,128,132,42,131,44,129,42,46,127,47,127,46,127,46,127,47,127,46,128,129,47,43,127,44,130,44

SWING
229,343,36,137,128,49,125,46,36,137,128,48,125,46,128,46,36,137,36,137,36,138,38,134,36,138,127,46,36,137,36,140,36,134,39,679,232,343,36,137,128,47,127,48,36,135,127,47,127,48,125,46,36,137,36,137,36,136,40,135,38,134,128,46,36,137,40,134,36,137,37,683,231,343,39,134,128,46,128,49,36,134,128,48,126,46,127,48,41,130,39,134,39,134,39,134,39,134,128,46,36,137,39,134,39,134,39,680,231,342,40,134,128,46,127,46,39,134,128,48,125,49,125,48,37,134,39,134,39,134,39,134,39,134,131,43,39,134,39,134,39,134,39

OFF
236,336,37,138,134,42,132,39,43,130,134,40,134,42,132,42,41,132,41,130,43,130,36,138,36,138,43,130,44,130,44,130,134,42,41,675,238,335,37,137,135,42,132,42,41,130,135,42,132,41,132,42,41,130,44,130,36,137,44,130,36,137,37,136,37,136,44,131,134,42,40,675,238,335,37,138,134,42,132,42,42,130,134,42,132,42,132,42,41,130,44,130,44,129,44,130,44,130,44,130,43,129,44,130,134,42,41,675,238,336,44,130,134,42,131,42,41,130,135,42,131,42,132,42,41,130,43,130,37,137,44,130,43,130,44,130,37,137,44,130,134,42,41

ONTIMER_2h
229,343,36,137,127,47,127,46,36,137,128,47,127,46,128,46,36,137,36,138,127,46,36,137,36,137,36,138,36,138,127,49,125,46,36,682,231,342,36,137,128,47,127,48,34,137,128,46,127,46,128,46,36,137,36,137,128,46,36,137,36,137,37,137,36,138,128,46,127,46,36,683,231,342,36,137,128,47,127,46,36,137,128,48,125,47,127,46,39,134,37,138,127,47,36,137,39,135,39,134,36,137,128,46,128,46,38,679,232,343,39,135,127,46,128,48,37,135,128,46,128,46,127,46,39,134,39,134,128,46,39,134,40,134,39,134,39,134,128,46,128,46,39,682,234,340,39,134,130,44,130,44,39,134,131,43,130,44,130,46,37,134,40,134,130,43,39,134,39,135,39,134,39,134,130,43,131,43,39

4h
229,343,37,137,127,49,124,49,34,130,135,49,124,47,127,49,34,136,44,130,127,47,36,137,36,137,36,137,36,138,127,47,127,47,36,682,230,343,37,137,127,47,127,49,33,137,128,49,124,49,125,49,34,137,36,139,125,49,34,137,36,136,37,138,36,137,127,49,125,46,36,682,238,336,37,137,127,49,125,49,34,137,134,42,131,40,134,42,34,137,36,137,134,42,34,137,36,137,36,137,37,137,134,42,132,41,41,676,238,336,36,138,134,42,132,42,40,130,134,42,131,42,131,42,34,137,36,138,134,42,34,137,36,136,37,137,37,137,134,42,132,41,41

6h
230,343,37,137,128,49,125,49,34,137,127,49,124,49,125,46,37,137,36,135,129,49,34,137,36,136,37,137,37,137,127,49,124,49,34,682,231,343,37,137,127,49,125,46,36,137,127,49,125,49,125,49,33,137,36,138,127,47,36,137,36,137,36,138,36,138,127,49,125,49,34,682,231,343,37,137,127,49,124,49,34,137,127,49,124,47,127,48,34,137,36,138,126,49,34,137,36,136,37,136,37,138,127,49,125,49,33,682,231,343,37,137,127,49,124,49,34,138,126,49,125,49,125,49,34,137,36,137,128,49,34,137,36,137,37,136,37,137,127,49,124,49,34,

ONTIMER_OFF
236,336,37,137,127,49,125,49,34,137,127,49,132,42,132,42,34,137,36,137,127,49,34,137,37,136,37,137,36,138,127,49,132,42,34,682,238,336,37,137,127,49,125,47,36,137,134,43,131,42,124,49,34,139,34,137,134,42,34,137,36,137,37,137,36,137,134,42,132,42,34,682,238,335,37,137,134,39,134,42,33,137,134,42,131,40,134,42,34,137,36,137,134,42,34,137,36,136,37,138,36,137,127,49,131,42,34,682,231,343,36,138,134,42,131,42,34,140,132,42,131,42,132,42,34,136,37,137,135,42,34,137,37,136,37,137,37,137,134,42,132,42,41
Appleリモコン
上
918,436,63,49,63,158,67,155,63,158,64,48,63,158,68,154,64,158,67,155,63,158,63,158,68,47,60,49,63,48,64,48,68,154,63,48,67,155,63,52,60,158,67,48,60,51,60,49,67,45,66,155,63,48,67,154,63,48,63,49,66,155,63,158,68,156,63,3815,915,213,63

下
918,436,66,46,62,159,67,154,63,159,66,46,63,158,62,158,67,156,63,158,67,154,63,158,67,45,63,49,62,49,63,48,67,155,63,49,63,49,66,155,63,159,67,45,67,47,60,49,62,49,63,158,63,51,60,158,67,48,60,52,60,158,67,155,63,160,64

右
914,440,64,48,63,158,60,162,67,154,63,48,64,158,63,159,64,158,63,158,67,155,63,158,63,48,66,45,63,51,60,52,63,156,63,52,59,159,67,155,62,52,60,48,63,49,62,51,60,52,61,158,63,52,60,159,64,48,63,51,60,159,67,155,63,160,64,3816,903,226,66

左
915,439,63,48,60,162,64,158,63,159,67,48,60,159,63,158,63,159,66,155,63,159,64,158,63,52,57,54,61,48,67,46,62,159,66,155,63,52,60,51,60,158,63,52,60,49,63,48,67,46,62,159,63,48,66,155,62,50,63,49,62,158,63,159,63,160,60,3818,911,215,61

真ん中
918,436,64,48,64,158,63,158,67,154,68,44,66,155,64,158,66,155,64,158,64,158,67,154,68,45,67,44,67,45,67,45,66,155,67,45,67,48,64,154,64,158,64,158,66,46,67,154,67,46,66,155,67,45,66,155,67,45,67,45,66,154,67,155,67,156,66,3608,914,436,66,46,63,158,67,155,67,155,67,45,67,155,67,154,67,154,67,154,68,154,67,155,68,45,66,45,67,44,67,45,68,154,67,154,67,45,67,154,67,45,67,44,67,45,67,46,66,45,66,156,66,45,64,158,66,45,64,49,66,155,67,154,67,156,67

Menu
914,440,62,49,66,155,60,162,67,154,63,52,60,159,67,154,63,159,66,155,63,159,66,155,60,54,64,45,67,45,62,52,60,158,66,155,63,158,67,45,62,52,60,49,66,45,66,45,62,49,62,159,64,48,63,159,63,48,63,49,62,158,64,158,63,161,66

再生/停止914,439,63,52,60,158,64,158,63,158,63,49,62,158,64,158,63,159,64,158,63,158,66,155,63,52,60,49,63,49,62,48,63,159,66,155,63,158,64,158,64,158,63,158,64,48,62,159,63,48,63,159,62,49,63,158,63,52,60,52,61,158,62,159,66,157,63,3383,911,439,66,45,63,159,63,158,63,159,66,45,64,158,63,158,64,158,63,159,63,158,63,158,67,46,62,52,60,49,66,45,63,158,63,158,64,48,63,158,64,48,63,49,62,49,62,51,61,49,62,158,62,52,63,155,63,51,60,51,64,155,63,158,67,156,63 


Copyright (c) 2015 Tetsuaki BABA all rights reserved.