Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
//Install library //http://pastebin.com/kNMMxkkk //For computer side of things http://pastebin.com/PXCbLKNj //------------------------------------------------------------------------------ // Include the IRremote library header // #include
//------------------------------------------------------------------------------ // Tell IRremote which Arduino pin is connected to the IR Receiver (TSOP4838) // int recvPin = 11; IRrecv irrecv(recvPin); //+============================================================================= // Configure the Arduino // void setup ( ) { Serial.begin(9600); // Status message will be sent to PC at 9600 baud irrecv.enableIRIn(); // Start the receiver } void dumpCode (decode_results *results) { // All protocols have data Serial.print(results->value, HEX); Serial.print("\n"); } //+============================================================================= // The repeating section of the code // void loop ( ) { decode_results results; // Somewhere to store the results if (irrecv.decode(&results)) { // Grab an IR code dumpCode(&results); // Output the results as source code irrecv.resume(); // Prepare for the next value } }
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)