mirror of
https://github.com/Theaninova/Arduino-IRremote.git
synced 2026-01-05 04:52:52 +00:00
Many problems happen with git due to some machines liking CRLF at the end of lines, and others linking CR. To try to straighten this out, I'm using Unix-style LF (\n) as the line endings. To make sure your repository remains consistent, try: $ git config --global core.autocrlf input For details, see: http://help.github.com/dealing-with-lineendings/
26 lines
447 B
Plaintext
26 lines
447 B
Plaintext
/*
|
|
* IRremote: IRsendDemo - demonstrates sending IR codes with IRsend
|
|
* An IR LED must be connected to Arduino PWM pin 3.
|
|
* Version 0.1 July, 2009
|
|
* Copyright 2009 Ken Shirriff
|
|
* http://arcfn.com
|
|
*/
|
|
|
|
#include <IRremote.h>
|
|
|
|
IRsend irsend;
|
|
|
|
void setup()
|
|
{
|
|
Serial.begin(9600);
|
|
}
|
|
|
|
void loop() {
|
|
if (Serial.read() != -1) {
|
|
for (int i = 0; i < 3; i++) {
|
|
irsend.sendSony(0xa90, 12); // Sony TV power code
|
|
delay(40);
|
|
}
|
|
}
|
|
}
|