Skip to content

Commit ca71e2e

Browse files
committed
initial commit
1 parent 041e3fb commit ca71e2e

16 files changed

+780
-0
lines changed

IR_test_header.ino

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
//This program reads an IR signal and displays it's function if it is implemented in the header file.
2+
//TODO:
3+
// -check encoding and bit length in loop and return error if wrong remote
4+
// -return error from header if right encoding/bit length but no match
5+
// -rename defines and functions in header to differentiate betwen multiple headers
6+
// -implement DHT temp sensor polling (as ISR?)
7+
8+
#include "NA_setTopBox.h"
9+
#include "Onkyo_amp.h"
10+
#include "strong_setTopBox.h"
11+
#include "UPC_setTopBox.h"
12+
#include <DHT.h>
13+
#include <IRremote.h>
14+
15+
#define DHTPIN 2
16+
#define DHTTYPE DHT11
17+
#define RECV_PIN 19
18+
19+
//ha valami gebasz lenne:
20+
//int RECV_PIN = 19;
21+
22+
IRrecv irrecv(RECV_PIN);
23+
//DHT dht(DHTPIN, DHTTYPE);
24+
decode_results results;
25+
26+
//float t = 0, h = 0; //temp, humidity
27+
28+
void setup()
29+
{
30+
irrecv.enableIRIn();
31+
Serial.begin(9600);
32+
//dht.begin();
33+
}
34+
35+
void loop()
36+
{
37+
38+
if (irrecv.decode(&results))
39+
{
40+
if (testInput(&results)){
41+
}
42+
irrecv.resume();
43+
}
44+
45+
/*delay(5000);
46+
t = dht.readTemperature();
47+
h = dht.readHumidity();
48+
49+
Serial.print("Humidity: ");
50+
Serial.print(h);
51+
Serial.print(" %\t");
52+
Serial.print("Temperature: ");
53+
Serial.print(t);
54+
Serial.println(" *C ");*/
55+
56+
}

IR_test_header.sln

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 2013
4+
VisualStudioVersion = 12.0.31101.0
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IR_test_header", "IR_test_header.vcxproj", "{3C39EC52-D097-49F0-8389-C27212488FD6}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Win32 = Debug|Win32
11+
Release|Win32 = Release|Win32
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{3C39EC52-D097-49F0-8389-C27212488FD6}.Debug|Win32.ActiveCfg = Debug|Win32
15+
{3C39EC52-D097-49F0-8389-C27212488FD6}.Debug|Win32.Build.0 = Debug|Win32
16+
{3C39EC52-D097-49F0-8389-C27212488FD6}.Release|Win32.ActiveCfg = Release|Win32
17+
{3C39EC52-D097-49F0-8389-C27212488FD6}.Release|Win32.Build.0 = Release|Win32
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
EndGlobal

IR_test_header.vcxproj

+95
Large diffs are not rendered by default.

IR_test_header.vcxproj.filters

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ItemGroup>
4+
<Filter Include="Source Files">
5+
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
6+
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
7+
</Filter>
8+
<Filter Include="Header Files">
9+
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
10+
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
11+
</Filter>
12+
<Filter Include="Resource Files">
13+
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
14+
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
15+
</Filter>
16+
</ItemGroup>
17+
<ItemGroup>
18+
<None Include="IR_test_header.ino" />
19+
</ItemGroup>
20+
<ItemGroup>
21+
<ClInclude Include="__vm\.IR_test_header.vsarduino.h">
22+
<Filter>Header Files</Filter>
23+
</ClInclude>
24+
<ClInclude Include="Onkyo_amp.h">
25+
<Filter>Header Files</Filter>
26+
</ClInclude>
27+
<ClInclude Include="UPC_setTopBox.h">
28+
<Filter>Header Files</Filter>
29+
</ClInclude>
30+
<ClInclude Include="strong_setTopBox.h">
31+
<Filter>Header Files</Filter>
32+
</ClInclude>
33+
<ClInclude Include="NA_setTopBox.h">
34+
<Filter>Header Files</Filter>
35+
</ClInclude>
36+
</ItemGroup>
37+
<ItemGroup>
38+
<ClCompile Include="Onkyo_amp.cpp">
39+
<Filter>Source Files</Filter>
40+
</ClCompile>
41+
<ClCompile Include="UPC_setTopBox.cpp">
42+
<Filter>Source Files</Filter>
43+
</ClCompile>
44+
<ClCompile Include="strong_setTopBox.cpp">
45+
<Filter>Source Files</Filter>
46+
</ClCompile>
47+
<ClCompile Include="NA_setTopBox.cpp">
48+
<Filter>Source Files</Filter>
49+
</ClCompile>
50+
</ItemGroup>
51+
</Project>

NA_setTopBox.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
//
2+
//
3+
//
4+
5+
#include "NA_setTopBox.h"
6+
7+

NA_setTopBox.h

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
// NA_setTopBox.h
2+
//don't remember the brand name of this set top box
3+
//NEC encoding 32 bit long messages
4+
5+
#ifndef _NA_SETTOPBOX_h
6+
#define _NA_SETTOPBOX_h
7+
8+
#if defined(ARDUINO) && ARDUINO >= 100
9+
#include "arduino.h"
10+
#else
11+
#include "WProgram.h"
12+
#endif
13+
14+
15+
#endif
16+
17+
#define NA_POWER 0x80BF3BC4
18+
#define NA_VFORMAT 0x80BFC13E
19+
#define NA_MUTE 0x80BF39C6
20+
#define NA_SAT 0x80BF916E
21+
#define NA_USB 0x80BFB649
22+
#define NA_ZOOM 0x80BF8A75
23+
#define NA_SLEEP 0x80BFB34C
24+
#define NA_1 0x80BF49B6
25+
#define NA_2 0x80BFC936
26+
#define NA_3 0x80BF33CC
27+
#define NA_4 0x80BF718E
28+
#define NA_5 0x80BFF10E
29+
#define NA_6 0x80BF13EC
30+
#define NA_7 0x80BF51AE
31+
#define NA_8 0x80BFD12E
32+
#define NA_9 0x80BF23DC
33+
#define NA_0 0x80BFE11E
34+
#define NA_TV/RADIO 0x80BF9B64
35+
#define NA_PREV 0x80BF41BE
36+
#define NA_FAV 0x80BF11EE
37+
#define NA_PAUSE 0x80BF36C9
38+
#define NA_PAGE_UP 0x80BFBB44
39+
#define NA_PAGE_DOWN 0x80BF31CE
40+
#define NA_PR_UP 0x80BF53AC
41+
#define NA_PR_DOWN 0x80BF4BB4
42+
#define NA_VOL_UP 0x80BF837C
43+
#define NA_VOL_DOWN 0x80BF9966
44+
#define NA_OK/LIST 0x80BF738C
45+
#define NA_MENU 0x80BFA956
46+
#define NA_EXIT 0x80BFA35C
47+
#define NA_INFO 0x80BF0BF4
48+
#define NA_EPG 0x80BF6B94
49+
#define NA_FIND/RED 0x80BF8679
50+
#define NA_SUB/GREEN 0x80BF46B9
51+
#define NA_TXT/YELLOW 0x80BFC639
52+
#define NA_BLUE 0x80BF21DE
53+
#define NA_RECORD 0x80BF26D9
54+
#define NA_PLAY 0x80BFA659
55+
#define NA_STOP 0x80BF6699
56+
#define NA_SHIFT 0x80BFE619
57+
#define NA_REWIND 0x80BF16E9
58+
#define NA_FORWARD 0x80BF9669
59+
#define NA_PREVIOUS 0x80BF56A9
60+
#define NA_NEXT 0x80BFD629

0 commit comments

Comments
 (0)