Skip to content

Commit

Permalink
Doc
Browse files Browse the repository at this point in the history
  • Loading branch information
pu2clr committed Jan 7, 2025
1 parent a95a0ea commit c5d9115
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 15 deletions.
24 changes: 13 additions & 11 deletions examples/TEST/SI4844_01_OLED_SEEDUINO2/SI4844_01_OLED_SEEDUINO2.ino
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ void setup()
si4844.setupSlideSwitch(RESET_PIN, INTERRUPT_PIN, 100000);

// You must calibrate the default volume
// si4844.setVolume(40);
si4844.setVolume(50);

displayDial();

Expand Down Expand Up @@ -155,22 +155,24 @@ void displayDial()

void loop()
{
if (si4844.hasStatusChanged()) {
// if (si4844.hasStatusChanged()) {

si4844_status_response *s;
s = si4844.getStatus();
if (s->refined.BANDIDX != si4844.getCurrentBand() ) {
si4844.setBand(s->refined.BANDIDX);

si4844.setBand(s->refined.BANDIDX);
delay(100);
do {
s = si4844.getStatus();
delay(3);
} while (s->refined.INFORDY == 0);

s = si4844.getStatus();
delay(3);
} while (s->refined.INFORDY == 0);
si4844.setBand(s->refined.BANDIDX);
delay(100);
displayDial();
}

displayDial();
}

// }

delay(10);
delay(50);
}
8 changes: 4 additions & 4 deletions src/SI4844.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,16 +194,16 @@ void SI4844::setupSlideSwitch(uint16_t resetPin, int interruptPin, uint32_t high
data_from_device = false;

this->powerUp();

si4844_status_response *s;

do {
s = this->getStatus();
delay(3);
s = this->getStatus();
delay(5);
} while (s->refined.INFORDY == 0);

// Set band to real band defined by the slice switch
setBand(s->refined.BANDIDX);
this->setBand(s->refined.BANDIDX);

setVolume(30);

Expand Down

0 comments on commit c5d9115

Please sign in to comment.