aboutsummaryrefslogtreecommitdiff
path: root/Lesson 3 Infrared Remote Control Car/infrared_Blink
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2017-08-26 20:33:02 +0200
committerDimitri Sokolyuk <demon@dim13.org>2017-08-26 20:33:02 +0200
commitba216919262d7f888bfb99debf81babe1ce88e0e (patch)
tree16c19610a7a3a77c97b99a63f6ba85d11ebde4ec /Lesson 3 Infrared Remote Control Car/infrared_Blink
parentd80736ab6e8e3cad2f1a30c6eaba2d6883dbe967 (diff)
Move lessons to doc
Diffstat (limited to 'Lesson 3 Infrared Remote Control Car/infrared_Blink')
-rwxr-xr-xLesson 3 Infrared Remote Control Car/infrared_Blink/infrared_Blink.ino35
1 files changed, 0 insertions, 35 deletions
diff --git a/Lesson 3 Infrared Remote Control Car/infrared_Blink/infrared_Blink.ino b/Lesson 3 Infrared Remote Control Car/infrared_Blink/infrared_Blink.ino
deleted file mode 100755
index 59560e7..0000000
--- a/Lesson 3 Infrared Remote Control Car/infrared_Blink/infrared_Blink.ino
+++ /dev/null
@@ -1,35 +0,0 @@
-//www.elegoo.com
-//2016.09.12
-
-#include <IRremote.h>//Infrared Library
-int receiverpin = 12;//Infrared signal receiving pin
-int LED=13; //define LED pin
-volatile int state = LOW; //define default input mode
-unsigned long RED;
-#define L 16738455
-IRrecv irrecv(receiverpin);//initialization
-decode_results results;//Define structure type
-void setup() {
-pinMode(LED, OUTPUT); //initialize LED as an output
-Serial.begin(9600); // debug output at 9600 baud
- irrecv.enableIRIn();// Start receiving
-}
-void stateChange()
-{
- state = !state;
- digitalWrite(LED, state);
-}
-void loop() {
-if (irrecv.decode(&results))
- {
- RED=results.value;
- Serial.println(RED);
- irrecv.resume(); // Receive the next value
- delay(150);
- if(RED==L)
- {
- stateChange();
- }
- }
- }
-