Try with blinkity
This commit is contained in:
parent
19c530a054
commit
7041ec9e09
|
|
@ -19,12 +19,28 @@ uint32_t SLEEP_TIME = 5000; // Sleep time between reports (in milliseconds)
|
||||||
// Initialize motion message
|
// Initialize motion message
|
||||||
MyMessage msg(CHILD_ID, V_TRIPPED);
|
MyMessage msg(CHILD_ID, V_TRIPPED);
|
||||||
|
|
||||||
|
void blinkityBlink(uint8_t repetitions) {
|
||||||
|
for (int x=0;x<repetitions;x++) {
|
||||||
|
digitalWrite(LED,HIGH);
|
||||||
|
wait(20);
|
||||||
|
digitalWrite(LED,LOW);
|
||||||
|
wait(100);
|
||||||
|
digitalWrite(LED,HIGH);
|
||||||
|
wait(20);
|
||||||
|
digitalWrite(LED,LOW);
|
||||||
|
if (x<(repetitions-1)) { //skip waiting at the end of the final repetition
|
||||||
|
wait(500);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void setup()
|
void setup()
|
||||||
{
|
{
|
||||||
pinMode(DIGITAL_INPUT_SENSOR, INPUT); // sets the motion sensor digital pin as input
|
pinMode(DIGITAL_INPUT_SENSOR, INPUT); // sets the motion sensor digital pin as input
|
||||||
hwPinMode(LED,OUTPUT_D0H1);
|
hwPinMode(LED,OUTPUT_D0H1);
|
||||||
pinMode(LED,OUTPUT);
|
pinMode(LED,OUTPUT);
|
||||||
digitalWrite(ledPin, HIGH);
|
blinkityBlink(2,1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void presentation()
|
void presentation()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue