Skip to content

Commit

Permalink
Update use_explaned.ino
Browse files Browse the repository at this point in the history
  • Loading branch information
AndressAndrade committed Mar 22, 2016
1 parent 55c5361 commit 67362c5
Showing 1 changed file with 29 additions and 1 deletion.
30 changes: 29 additions & 1 deletion examples/use_explaned/use_explaned.ino
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include <IRremote.h>
#include <MideaIR.h>
#define IR_EMITER 3
#define FIVE_SECONDS 5000

// IRsend Object and Remote Control object
IRsend irsend;
Expand All @@ -10,7 +11,34 @@ void setup(){
// Define IR PIN as Output
pinMode(IR_EMITER, OUTPUT);

// Do Unit tests
// Try to turn ON the Air Conditioner
Serial.println(F("Trying to Turn ON the Air Conditioner..."));
remote_control.turnON();
delay(FIVE_SECONDS);

// Try to turn OFF
Serial.println(F("Trying to Turn OFF the Air Conditioner..."));
remote_control.turnOFF();
delay(FIVE_SECONDS);

// Change mode
remote_control.setState(true);

// Change mode
remote_control.setMode(mode_auto);
remote_control.emit();
delay(FIVE_SECONDS);

// Change speed fan
remote_control.setSpeedFan(fan_speed_1);
remote_control.emit();
delay(FIVE_SECONDS);

// Change temperature to 22
remote_control.setTemperature(22);
remote_control.emit();
delay(FIVE_SECONDS);

}

void loop(){}

0 comments on commit 67362c5

Please sign in to comment.