Skip to content

Commit

Permalink
Examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Ricardo Lima Caratti committed Jun 8, 2020
1 parent ec52adb commit c1a46ee
Showing 1 changed file with 15 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ float currentFrequency;

SI4844 radio;

// interrupt service routine for PCINT3
ISR(PCINT3_vect)
{
interrupt_hundler(); // See SI4844.h
}

void setup()
{

Expand All @@ -40,15 +46,22 @@ void setup()
oled.setFont(FONT8X16);
oled.setCursor(0, 0);
oled.print("Si4844-Attiny85");
/*
oled.setCursor(0, 2);
oled.print(" By PU2CLR ");
delay(2000);
oled.clear();
*/

GIMSK = 1 << PCIE; // turn on pin change interrupts
PCMSK = 1 << PCINT3; // unmask PCINT3 pin change interrupt

sei();

// radio.setup(INT_PIN, RST_PIN, currentBand);
radio.setup(RST_PIN, -1, currentBand);

// Comment the line above and uncomment the line bellow to debug. See the function debugDevice dicumentation
radio.debugDevice(RST_PIN, INT_PIN, 0, showMsg);
// radio.debugDevice(RST_PIN, INT_PIN, 0, showMsg);


radio.setVolume(30);
Expand Down

0 comments on commit c1a46ee

Please sign in to comment.