Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
scripts-perso
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Daniel Stan
scripts-perso
Commits
581c60ee
Commit
581c60ee
authored
Jan 07, 2017
by
Daniel STAN
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Proprification
parent
02b34e75
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
20 deletions
+27
-20
.gitmodules
.gitmodules
+6
-0
arduino/kugel/kugel.ino
arduino/kugel/kugel.ino
+18
-20
arduino/libraries/IRLib
arduino/libraries/IRLib
+1
-0
arduino/libraries/RCSwitch
arduino/libraries/RCSwitch
+1
-0
arduino/libraries/readme.txt
arduino/libraries/readme.txt
+1
-0
No files found.
.gitmodules
0 → 100644
View file @
581c60ee
[submodule "IRrecv/rc-switch"]
path = arduino/libraries/RCSwitch
url = https://github.com/sui77/rc-switch.git
[submodule "arduino/libraries/IRLib"]
path = arduino/libraries/IRLib
url = https://github.com/cyborg5/IRLib.git
IRrecv/IRrecv
.ino
→
arduino/kugel/kugel
.ino
View file @
581c60ee
/* Example program for from IRLib – an Arduino library for infrared encoding and decoding
* Version 1.3 January 2014
* Copyright 2014 by Chris Young http://cyborg5.com
* Based on original example sketch for IRremuote library
* Version 0.11 September, 2009
* Copyright 2009 Ken Shirriff
* http://www.righto.com/
*/
/*
* IRLib: IRrecvDump - dump details of IR codes with IRrecv
* An IR detector/demodulator must be connected to the input RECV_PIN.
*/
/* Arduino directement connecté à kugel, pour communiquer
avec programme python coté port série*/
// Pin du recepteur Infrarouge
#define RECV_PIN 11
// Pin du rf
#define RF_PIN 10
#include <IRLib.h>
#include <RCSwitch.h>
int
RECV_PIN
=
11
;
IRrecv
My_Receiver
(
RECV_PIN
);
#include <RCSwitch.h>
RCSwitch
mySwitch
=
RCSwitch
();
// For ir-decoder
IRdecodeNEC
My_Decoder
;
unsigned
int
Buffer
[
RAWBUF
];
int
incomingByte
=
0
;
// Pour les relais. Canal et numéro de relai (port) sur lequel envoyer une
// commande. On indique également s'il faut allumer ou éteindre
int
todo_channel
=
4
;
int
todo_port
=
1
;
boolean
todo_on
=
true
;
...
...
@@ -37,13 +34,14 @@ void setup()
My_Receiver
.
enableIRIn
();
// Start the receiver
My_Decoder
.
UseExtnBuf
(
Buffer
);
mySwitch
.
enableTransmit
(
10
);
mySwitch
.
enableTransmit
(
RF_PIN
);
}
void
loop
()
{
int
val
;
int
incomingByte
=
0
;
if
(
My_Receiver
.
GetResults
(
&
My_Decoder
))
{
//Restart the receiver so it can be capturing another code
//while we are working on decoding this one.
...
...
@@ -77,16 +75,16 @@ void loop() {
case
0xfd50af
:
Serial
.
println
(
"Control: Next"
);
break
;
case
16589023
:
case
0xfd20df
:
Serial
.
println
(
"Control: Setup"
);
break
;
case
16605343
:
case
0xfd609f
:
Serial
.
println
(
"Control: Stop"
);
break
;
case
16617583
:
case
0xfd906f
:
Serial
.
println
(
"Control: Enter"
);
break
;
case
16609423
:
case
0xfd708f
:
Serial
.
println
(
"Control: Return"
);
break
;
default:
...
...
IRLib
@
8d9c22c5
Subproject commit 8d9c22c50df1901dcd310a8254788d19aaf6d2e4
RCSwitch
@
bb3f1423
Subproject commit bb3f142329d1be1adfd8ecc9a0b22ad2067cbc89
arduino/libraries/readme.txt
0 → 100644
View file @
581c60ee
For information on installing libraries, see: http://arduino.cc/en/Guide/Libraries
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment