Skip to content

Commit

Permalink
add blink
Browse files Browse the repository at this point in the history
  • Loading branch information
ladyada committed Apr 6, 2024
1 parent d37a36f commit 228169c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/Adafruit_TestBed.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,24 @@ void Adafruit_TestBed::beepNblink(void) {
#endif
}

/**************************************************************************/
/*!
@brief light the LED for 500ms, if defined
*/
/**************************************************************************/
void Adafruit_TestBed::blink(void) {
if (ledPin >= 0) {
pinMode(ledPin, OUTPUT);
digitalWrite(ledPin, HIGH);
}

delay(500);

if (ledPin >= 0) {
digitalWrite(ledPin, LOW);
}
}

//--------------------------------------------------------------------+
// ESP32 Target
//--------------------------------------------------------------------+
Expand Down
1 change: 1 addition & 0 deletions src/Adafruit_TestBed.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ class Adafruit_TestBed {

void beep(uint32_t freq, uint32_t duration);
void beepNblink(void);
void blink(void);

uint32_t timestamp(void);
void printTimeTaken(bool restamp = false);
Expand Down

0 comments on commit 228169c

Please sign in to comment.