This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
byte TEA5767N::searchNext() { | |
byte bandLimitReached; | |
if (isSearchUp()) { | |
selectFrequency(readFrequencyInMHz() + 0.1); | |
} else { | |
selectFrequency(readFrequencyInMHz() - 0.1); | |
} | |
//Turns the search on |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
byte TEA5767N::searchNextMuting() { | |
byte bandLimitReached; | |
mute(); | |
bandLimitReached = searchNext(); | |
turnTheSoundBackOn(); | |
return bandLimitReached; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
byte TEA5767N::startsSearchFromBeginning() { | |
setSearchUp(); | |
return startsSearchFrom(87.0); | |
} | |
byte TEA5767N::startsSearchFromEnd() { | |
setSearchDown(); | |
return startsSearchFrom(108.0); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
byte TEA5767N::startsSearchMutingFromBeginning() { | |
byte bandLimitReached; | |
mute(); | |
bandLimitReached = startsSearchFromBeginning(); | |
turnTheSoundBackOn(); | |
return bandLimitReached; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <TEA5767N.h> | |
// ... | |
// Init radio object | |
TEA5767N radio = TEA5767N(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Init LCD display object | |
// LiquidCrystal lcd(RS, E, D4, D5, D6, D7); | |
LiquidCrystal lcd(8, 9, 4, 5, 6, 7); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Buttons codes | |
#define btnRIGHT 0 | |
#define btnUP 1 | |
#define btnDOWN 2 | |
#define btnLEFT 3 | |
#define btnSELECT 4 | |
#define btnNONE 5 | |
// Delay between clock transitions | |
#define DELAY_VOLUME_TRANSITION 50 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void setup(){ | |
pinMode(BACKLIGHT_PIN, OUTPUT); | |
pinMode(UPDOWN_PIN, OUTPUT); | |
pinMode(INC_PIN, OUTPUT); | |
digitalWrite(UPDOWN_PIN, HIGH); | |
digitalWrite(INC_PIN, HIGH); | |
analogWrite(BACKLIGHT_PIN, 255); | |
lcd.begin(16, 2); |