Skip to content

Commit

Permalink
Make sure microDelay is used instead of delayMicroseconds
Browse files Browse the repository at this point in the history
  • Loading branch information
vickash committed Nov 13, 2023
1 parent e5c743a commit 789c7e9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/lib/Denko.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,10 @@ class Denko {

// Included Libraries
void pulseRead (); //cmd = 9

// Servos
void servoToggle (); //cmd = 10
void servoWrite (); //cmd = 11
void handleSerial (); //cmd = 12

// Single Bit Bang UART
#ifdef DENKO_UART_BB
Expand Down
2 changes: 1 addition & 1 deletion src/lib/DenkoLEDArray.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ void Denko::showLEDArray() {

// ATmega4809 still needs this delay to avoid corrupt data. Not sure why.
#if defined(__AVR_ATmega4809__)
delayMicroseconds(64);
microDelay(64);
#endif

// Write the pixel buffer to the array.
Expand Down
2 changes: 1 addition & 1 deletion src/lib/DenkoPulseInput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ void Denko::pulseRead(){
uint16_t resetTime = (auxMsg[1] << 8) | auxMsg[0];
pinMode(pin, OUTPUT);
digitalWrite(pin, bitRead(val, 1));
delayMicroseconds(resetTime);
microDelay(resetTime);
}
pinMode(pin, INPUT);
byte state = digitalRead(pin);
Expand Down

0 comments on commit 789c7e9

Please sign in to comment.