Skip to content

Commit

Permalink
Update dimmerPir_May16d.ino
Browse files Browse the repository at this point in the history
  • Loading branch information
binh-bk authored Aug 7, 2018
1 parent cdb89f5 commit 778ea5e
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions dimmerPir/dimmerPir_May16d.ino
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ const char* off_cmd = "OFF";
/**************************** PIN DEFINITIONS ********************************************/
#define outPin 0
#define pirPin 2
int ledPin = 3;
//#define outPin D7
//#define pirPin D5

/**************************** SENSOR DEFINITIONS *******************************************/
char message_buff[300];
Expand All @@ -63,8 +60,6 @@ void setup() {
flash(ledPin, 5, 100);
delay(1000);
pinMode(outPin, OUTPUT);
pinMode(ledPin, FUNCTION_3); //to use this pin as RX pin, change to FUNCTION_3
pinMode(ledPin, OUTPUT);
pinMode(pirPin, INPUT);
Serial.begin(115200);
delay(10);
Expand Down Expand Up @@ -218,7 +213,6 @@ void loop() {
if (pirRead == 1) {
i= 0;
};
flashPattern(i, ledPin);
delay(1000);
}
lightState = 0;
Expand All @@ -236,15 +230,6 @@ void loop() {
}

/*_________________flash pattern________________________________*/

void flashPattern(int i, int ledPin){
if (i=0) {
flash(ledPin, 2, 100);
};
if (i= (onRetain-2)) {
flash(ledPin, 3, 100);
}
}
void flash(int ledPin, int times, int interval){
for (int j=0; j < times; j++){
digitalWrite(ledPin, HIGH);
Expand Down

0 comments on commit 778ea5e

Please sign in to comment.