### Install All Libraries and Boards (macOS/Linux) Source: https://pu2clr.github.io/SI4735/examples Installs all available libraries and boards for the SI4735 examples on macOS and Linux, after the basic installation. ```bash curl -fsSL https://raw.githubusercontent.com/pu2clr/SI4735/master/examples/install_all_libraries_and_boards.sh | sh ``` -------------------------------- ### Install All Libraries and Boards (Windows) Source: https://pu2clr.github.io/SI4735/examples Installs all available libraries and boards for the SI4735 examples on Windows, after the basic installation, using a batch script. ```batch curl -fsSL https://raw.githubusercontent.com/pu2clr/SI4735/master/examples/install_all_libraries_and_boards.bat --output install_all_libraries_and_boards.bat . install_all_libraries_and_boards.bat ``` -------------------------------- ### setup() - Basic Configuration Source: https://pu2clr.github.io/SI4735/extras/apidoc/html/group__group07.html Starts the Si473X device with basic configuration, suitable for scenarios where interrupt resources are not used. Analog mode is considered by default if audio mode is not specified. ```APIDOC ## setup() [2/2] ### Description Starts the Si473X device. Use this setup if you are not using interrupt resource. If the audio mode parameter is not entered, analog mode will be considered. You can use any Arduino digital pin. Be sure you are using less than 3.6V on Si47XX RST pin. ### Method `void SI4735::setup(uint8_t _resetPin_, uint8_t _defaultFunction_)` ### Parameters * **_resetPin_** (uint8_t) - Digital Arduino Pin used to RESET command. * **_defaultFunction_** (uint8_t) - 0 = FM mode; 1 = AM. ``` -------------------------------- ### setup() - Full Configuration Source: https://pu2clr.github.io/SI4735/extras/apidoc/html/group__group07.html Starts the Si473X device with a full set of configuration parameters, including reset pin, interrupt enable, default function, audio mode, clock type, and GPO2 enable. ```APIDOC ## setup() [1/2] ### Description Starts the Si473X device. Use this function to start the device up with the parameters shown below. If the audio mode parameter is not entered, analog mode will be considered. You can use any Arduino digital pin. Be sure you are using less than 3.6V on Si47XX RST pin. ### Method `void SI4735::setup(uint8_t _resetPin_, uint8_t _ctsIntEnable_, uint8_t _defaultFunction_, uint8_t _audioMode_ = SI473X_ANALOG_AUDIO, uint8_t _clockType_ = XOSCEN_CRYSTAL, uint8_t _gpo2Enable_ = 0)` ### Parameters * **_resetPin_** (uint8_t) - Digital Arduino Pin used to RESET de Si47XX device. * **_ctsIntEnable_** (uint8_t) - CTS Interrupt Enable. * **_defaultFunction_** (uint8_t) - is the mode you want the receiver starts. * **_audioMode_** (uint8_t) - default SI473X_ANALOG_AUDIO (Analog Audio). Use SI473X_ANALOG_AUDIO or SI473X_DIGITAL_AUDIO. * **_clockType_** (uint8_t) - 0 = Use external RCLK (crystal oscillator disabled); 1 = Use crystal oscillator. * **_gpo2Enable_** (uint8_t) - GPO2OE (GPO2 Output) 1 = Enable; 0 Disable (defult). ### References SI4735::getFirmware(), SI4735::radioPowerUp(), SI4735::reset(), and SI4735::setHardwareAudioMute(). ``` -------------------------------- ### setup (basic) Source: https://pu2clr.github.io/SI4735/extras/apidoc/html/class_s_i4735.html Starts the Si473X device with a specified reset pin and default function. ```APIDOC ## setup (basic) ### Description Starts the Si473X device. ### Method void setup(uint8_t resetPin, uint8_t defaultFunction) ### Parameters * **resetPin** (uint8_t) - The pin used for resetting the device. * **defaultFunction** (uint8_t) - The default operating function of the device. ``` -------------------------------- ### Install arduino-cli and Libraries on Windows Source: https://pu2clr.github.io/SI4735 Batch script to install arduino-cli and necessary libraries and boards for SI4735 Arduino Library examples on Windows. ```batch @echo off REM Installs arduino-cli and some libraries and boards used by some the examples curl -fsSL https://downloads.arduino.cc/arduino-cli/arduino-cli_latest_Windows_64bit.zip --output arduinocli.zip tar -xf arduinocli.zip set ARDUINO_LIBRARY_ENABLE_UNSAFE_INSTALL=true . arduino-cli lib install "Adafruit Unified Sensor" . arduino-cli lib install "SparkFun Si4703" . arduino-cli lib install "Si47XX" . arduino-cli core update-index . arduino-cli core install arduino:avr . arduino-cli lib install --git-url https://github.com/pu2clr/SI4735 ``` -------------------------------- ### Compile All Examples on Windows Source: https://pu2clr.github.io/SI4735 Batch script to compile all examples for the SI4735 Arduino Library on Windows. This script assumes libraries and boards are already installed. ```batch @echo off REM compiles all examples and save the binaries in your Downloads folder REM Make sure you have installed the libraries and boards first REM Examples are located in the SI4735 library folder REM cd %%USERPROFILE%%\Arduino\libraries\SI4735\examples REM FOR /D %%d IN (*) DO ( REM echo Compiling %%d... REM . REM arduino-cli compile --fqbn arduino:avr:uno "%%d" REM IF ERRORLEVEL 0 ( REM echo Compiled %%d successfully. REM REM Optionally, you can copy the .hex file to Downloads REM REM copy "%%d\%%d.hex" %%USERPROFILE%%\Downloads\ REM ) ELSE ( REM echo Failed to compile %%d. REM ) REM ) REM echo Compilation process finished. ``` -------------------------------- ### Install All Libraries and Boards on macOS or Linux Source: https://pu2clr.github.io/SI4735 Shell script to install all required libraries and boards for the SI4735 Arduino Library examples on macOS or Linux. ```shell #!/bin/bash # Installs all libraries and all boards used by the examples curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | sh export ARDUINO_LIBRARY_ENABLE_UNSAFE_INSTALL=true ./bin/arduino-cli lib update-index ./bin/arduino-cli lib install "Adafruit Unified Sensor" ./bin/arduino-cli lib install "SparkFun Si4703" ./bin/arduino-cli lib install "Si47XX" ./bin/arduino-cli core update-index ./bin/arduino-cli core install arduino:avr ./bin/arduino-cli core install esp32:esp32 ./bin/arduino-cli core install esp8266:esp8266 ./bin/arduino-cli lib install --git-url https://github.com/pu2clr/SI4735 ``` -------------------------------- ### Install Arduino CLI (Linux/macOS) Source: https://pu2clr.github.io/SI4735/examples Installs the Arduino CLI on Linux or macOS by downloading and executing an installation script. ```bash $ curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | sh ``` -------------------------------- ### Install Arduino CLI (Windows) Source: https://pu2clr.github.io/SI4735/examples Provides links to download the Arduino CLI installer for Windows. ```text Download the install file: https://downloads.arduino.cc/arduino-cli/arduino-cli_latest_Windows_64bit.msi Download the exe (binary)file: https://downloads.arduino.cc/arduino-cli/arduino-cli_latest_Windows_64bit.zip ``` -------------------------------- ### Compile All Examples on macOS or Linux Source: https://pu2clr.github.io/SI4735 Shell script to compile all examples for the SI4735 Arduino Library and save the binaries to the Downloads folder on macOS or Linux. ```shell #!/bin/bash # compiles all examples and save the binaries in your Downloads folder # Make sure you have installed the libraries and boards first # Examples are located in the SI4735 library folder # cd ~/Arduino/libraries/SI4735/examples # for example in *; do # if [ -d "$example" ]; then # echo "Compiling $example..." # ./bin/arduino-cli compile --fqbn arduino:avr:uno "$example" # if [ $? -eq 0 ]; then # echo "Compiled $example successfully." # # Optionally, you can copy the .hex file to Downloads # # cp "$example/$example.hex" ~/Downloads/ # else # echo "Failed to compile $example." # fi # fi # done # echo "Compilation process finished." ``` -------------------------------- ### Install ESP32 Core and SI4735 Library using arduino-cli Source: https://pu2clr.github.io/SI4735/examples/SI47XX_06_ESP32 Commands to install the necessary ESP32 board support and the SI4735 Arduino Library using the arduino-cli. ```bash arduino-cli config set board_manager.additional_urls https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json $ arduino-cli core update-index $ arduino-cli core install esp32:esp32 ``` -------------------------------- ### List Installed Arduino Cores Source: https://pu2clr.github.io/SI4735/examples Lists all installed Arduino cores and their versions. This is useful for checking available core installations. ```bash $ arduino-cli core list ID Installed Latest Name arduino:avr 1.8.5 1.8.5 Arduino AVR Boards arduino:mbed_nano 3.0.0 3.0.0 Arduino Mbed OS Nano Boards arduino:mbed_rp2040 3.0.0 3.0.0 Arduino Mbed OS RP2040 Boards arduino:sam 1.6.12 1.6.12 Arduino SAM Boards (32-bits ARM Cortex-M3) arduino:samd 1.8.13 1.8.13 Arduino SAMD Boards (32-bits ARM Cortex-M0+) atnel-avr-xminis:avr 0.6.0 0.6.0 Atmel AVR Xplained-minis attiny:avr 1.0.2 1.0.2 ATtiny Microcontrollers ATTinyCore:avr 1.5.2 1.5.2 ATTinyCore esp32:esp32 2.0.2 2.0.2 ESP32 Arduino esp8266:esp8266 3.0.2 3.0.2 ESP8266 Boards (3.0.2) MegaCore:avr 2.1.3 2.1.3 MegaCore MightyCore:avr 2.1.3 2.1.3 MightyCore MiniCore:avr 2.1.3 2.1.3 MiniCore rp2040:rp2040 1.13.0 1.13.0 Raspberry Pi RP2040 Boards(1.13.0) Seeeduino:samd 1.8.2 1.8.2 Seeed SAMD (32-bits ARM Cortex-M0+ and Cortex-M4) Boards STM32:stm32 1.9.0 1.9.0 STM32 Boards (selected from submenu) teensy:avr 1.56.1 1.56.1 Teensyduino ``` -------------------------------- ### Example Output of 'arduino-cli board list' Source: https://pu2clr.github.io/SI4735/examples An example output of the 'arduino-cli board list' command, showing a connected Arduino Due board with its details. ```text Port Protocol Type Board Name FQBN Core /dev/cu.usbmodem14201 serial Serial Port (USB) Arduino Due (Programming Port) arduino:sam:arduino_due_x_dbg arduino:sam ``` -------------------------------- ### SI4735::setup Source: https://pu2clr.github.io/SI4735/extras/apidoc/html/group__group07.html Starts the Si473X device with specified configuration parameters. This is an overloaded function with two signatures. ```APIDOC ## SI4735::setup() ### Description Starts the Si473X device. ### Overloads #### Signature 1 void SI4735::setup (uint8_t resetPin, uint8_t ctsIntEnable, uint8_t defaultFunction, uint8_t audioMode=SI473X_ANALOG_AUDIO, uint8_t clockType=XOSCEN_CRYSTAL, uint8_t gpo2Enable=0) #### Signature 2 void SI4735::setup (uint8_t resetPin, uint8_t defaultFunction) ### Parameters #### Signature 1 Parameters - **resetPin** (uint8_t) - The reset pin for the Si473X. - **ctsIntEnable** (uint8_t) - Enable or disable CTS interrupts. - **defaultFunction** (uint8_t) - The default function to set for the device. - **audioMode** (uint8_t) - The audio mode to use (defaults to SI473X_ANALOG_AUDIO). - **clockType** (uint8_t) - The clock type to use (defaults to XOSCEN_CRYSTAL). - **gpo2Enable** (uint8_t) - Enable or disable GPO2 (defaults to 0). #### Signature 2 Parameters - **resetPin** (uint8_t) - The reset pin for the Si473X. - **defaultFunction** (uint8_t) - The default function to set for the device. ``` -------------------------------- ### List Installed Cores Source: https://pu2clr.github.io/SI4735/examples Shows the installed Arduino cores and their associated board names and FQBNs, helping to manage the development environment. ```bash $ arduino-cli core list Board Name FQBN 3D printer boards STM32:stm32:3dprinter 4D Systems gen4 IoD Range esp8266:esp8266:gen4iod AI Thinker ESP32-CAM esp32:esp32:esp32cam . . . Arduino Due (Native USB Port) arduino:sam:arduino_due_x Arduino Due (Programming Port) arduino:sam:arduino_due_x_dbg . . . Arduino Nano arduino:avr:nano Arduino Nano 33 BLE arduino:mbed_nano:nano33ble . . . Arduino Uno arduino:avr:uno ``` -------------------------------- ### Install Arduino CLI and SI4735 Library (Windows) Source: https://pu2clr.github.io/SI4735/examples Installs arduino-cli, the SI4735 Arduino Library, and essential support libraries and boards for Windows 10/11 using a batch script. ```batch curl -fsSL https://raw.githubusercontent.com/pu2clr/SI4735/master/examples/lib_si4735_basic_install.bat --output lib_si4735_basic_install.bat . lib_si4735_basic_install.bat ``` -------------------------------- ### Install SI4735 Library via arduino-cli on Windows Source: https://pu2clr.github.io/SI4735 Installs the latest version of the PU2CLR SI4735 Arduino Library from GitHub using arduino-cli in a Windows command prompt. This process involves downloading the arduino-cli, extracting it, setting an environment variable, and then installing the library. ```batch echo off curl -fsSL https://downloads.arduino.cc/arduino-cli/arduino-cli_latest_Windows_64bit.zip --output arduinocli.zip tar -xf arduinocli.zip set ARDUINO_LIBRARY_ENABLE_UNSAFE_INSTALL=true .\arduino-cli lib install --git-url https://github.com/pu2clr/SI4735 ``` -------------------------------- ### Arduino Sketch Setup with EEPROM for SI4735 Source: https://pu2clr.github.io/SI4735/extras/schematic This snippet shows the setup function for an Arduino sketch using the SI4735 library. It initializes pins, checks for EEPROM reset conditions, loads stored volume and frequency from EEPROM, or sets defaults if no data is found. It then configures the SI4735 receiver. ```Arduino #include #include #define SHUTDOWN_DETECTOR 16 // A2 - Arduino pin 16 configured as digital const uint8_t app_id = 35; // Useful to check the EEPROM content before processing useful data const int eeprom_address = 0; void setup() { pinMode(SHUTDOWN_DETECTOR, INPUT); // If HIGH power supply detected; else, no power supply detected pinMode(VOLUME_DOWN, INPUT_PULLUP); pinMode(VOLUME_UP, INPUT_PULLUP); . . // If you want to reset (erase) the eeprom, keep the VOLUME_UP button pressed during startup if (digitalRead(VOLUME_UP) == LOW) { EEPROM.write(eeprom_address, 0); // In our case, just the app_id is enough. oled.print("EEPROM RESETED"); delay(2000); } // Checking the EEPROM content if (EEPROM.read(eeprom_address) == app_id) { // There are useful data stored to rescue volume = EEPROM.read(eeprom_address + 1); // Gets the stored volume; freqByteHigh = EEPROM.read(eeprom_address + 2); // Gets the frequency high byte freqByteLow = EEPROM.read(eeprom_address + 3); // Gets the frequency low byte currentFrequency = (freqByteHigh << 8) | freqByteLow; // Converts the stored frequency to SI473X frequency. } else { // No data found volume = 45; currentFrequency = 10390; // 103.9MHz } . . . rx.setup(RESET_PIN, FM_FUNCTION); rx.setFM(8400, 10800, currentFrequency, 10); rx.setVolume(volume); . . . } /** * Saves the current volume and frequency into the internal EEPROM */ void writeReceiverData() { EEPROM.write(eeprom_address, app_id); // stores the app id; EEPROM.write(eeprom_address + 1, rx.getVolume()); // stores the current Volume EEPROM.write(eeprom_address + 2, (currentFrequency >> 8) ); // stores the current Frequency HIGH byte EEPROM.write(eeprom_address + 3, (currentFrequency & 0xFF)); // stores the current Frequency LOW byte } void loop { . . . // Checks the shutdown status if (digitalRead(SHUTDOWN_DETECTOR) == LOW ) { writeReceiverData(); while(1); // Stop working } } ``` -------------------------------- ### Install Arduino CLI using Homebrew (macOS) Source: https://pu2clr.github.io/SI4735/examples Installs the Arduino CLI on macOS using the Homebrew package manager. ```bash $ brew update $ brew install arduino-cli ``` -------------------------------- ### Install Arduino CLI and SI4735 Library (macOS/Linux) Source: https://pu2clr.github.io/SI4735/examples Installs arduino-cli, the SI4735 Arduino Library, and essential support libraries and boards for macOS and Linux systems using a shell script. ```bash curl -fsSL https://raw.githubusercontent.com/pu2clr/SI4735/master/examples/lib_si4735_basic_install.sh | sh ``` -------------------------------- ### Custom SI4735 Class Example Source: https://pu2clr.github.io/SI4735 This C++ code extends the SI4735 class to add custom methods and override existing ones. It shows how to create a new instance and use the customized functionalities in the Arduino setup. ```cpp #include class MyCustomSI4735 : public SI4735 { // extending the original class SI4735 public: // New functions / methods int methodA() { // some SI47XX command that PU2CLR SI4735 Arduino Library does not implement return 0; } int methodB() { // another SI47XX command that PU2CLR SI4735 Arduino Library does not implement return 1; } // Overwriting existent methods void setTuneFrequencyAntennaCapacitor(uint16_t capacitor) { // Here, your setTuneFrequencyAntennaCapacitor code that will replace the original code // Tip: currentFrequencyParams is a protected member of SI4735 class and can be referred in your code currentFrequencyParams.arg.ANTCAPH = 0; // it is just an example currentFrequencyParams.arg.ANTCAPL = capacitor; // it is just an example return; } void reset() { /// your reset code that will replace the original reset code pinMode(resetPin, OUTPUT); delay(1); digitalWrite(resetPin, LOW); delay(50); digitalWrite(resetPin, HIGH); } }; MyCustomSI4735 radio; // the instance of your custom class based on SI4735 class void setup() { Serial.begin(9600); while (!Serial); Serial.println("Customizing Si4735 class example."); radio.setup(12, 0); // Arduino pin 12 as reset and FM mode (0) radio.setFM(8400, 10800, 10390, 10); // Setting the tune capacitor with your code instead Si4735 library code. radio.setTuneFrequencyAntennaCapacitor(100); // Calling new functions implemented by you. Serial.println(radio.methodA()); Serial.println(radio.methodB()); } void loop() { // Your code with your custom SI4735 library. } ``` -------------------------------- ### Install SI4735 Library via arduino-cli on macOS or Linux Source: https://pu2clr.github.io/SI4735 Installs the latest version of the PU2CLR SI4735 Arduino Library from GitHub using arduino-cli. Ensure you have curl installed and set the ARDUINO_LIBRARY_ENABLE_UNSAFE_INSTALL environment variable. ```bash curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | sh export ARDUINO_LIBRARY_ENABLE_UNSAFE_INSTALL=true ./bin/arduino-cli lib install --git-url https://github.com/pu2clr/SI4735 ``` -------------------------------- ### getFirmwareCMPMAJOR Source: https://pu2clr.github.io/SI4735/extras/apidoc/html/group__group06.html Get the Firmware C M P M A J O R object. ```APIDOC ## getFirmwareCMPMAJOR() ### Description Get the Firmware C M P M A J O R object. ### Method ``` uint8_t SI4735::getFirmwareCMPMAJOR (void) ``` ### Returns - uint8_t: The Firmware C M P M A J O R. ``` -------------------------------- ### Example of Setting Volume Source: https://pu2clr.github.io/SI4735/extras/docbr Demonstrates setting the radio's volume to a specific level, in this case, 45. ```cpp si4735.setVolume(45); ``` -------------------------------- ### SI4735::setAM() (Band Configuration) Source: https://pu2clr.github.io/SI4735/extras/apidoc/html/group__group08.html Sets the radio to AM (LW/MW/SW) function with specified band limits, initial frequency, and step. Example: sets band from 550kHz to 1750kHz, starting at 810kHz with a 10kHz step. ```APIDOC ## SI4735::setAM() [2/2] ### Description Sets the radio to AM (LW/MW/SW) function. The example below sets the band from 550kHz to 1750kHz on AM mode. The band will start on 810kHz and step is 10kHz. si4735.setAM(520, 1750, 810, 10); ### Parameters * **fromFreq** (uint16_t) - minimum frequency for the band * **toFreq** (uint16_t) - maximum frequency for the band * **initialFreq** (uint16_t) - initial frequency * **step** (uint16_t) - step used to go to the next channel ### See also setFM() setSSB() ### References SI4735::setAM() ``` -------------------------------- ### Set AM Function with Band and Step Source: https://pu2clr.github.io/SI4735/extras/apidoc/html/group__group08.html Sets the radio to AM (LW/MW/SW) function, defining the band range and initial frequency with a specific step. Example sets band from 550kHz to 1750kHz, starting at 810kHz with a 10kHz step. ```cpp void SI4735::setAM(uint16_t _fromFreq, uint16_t _toFreq, uint16_t _initialFreq, uint16_t _step) ``` ```cpp si4735.setAM(520, 1750, 810, 10); ``` -------------------------------- ### Get Device I2C Address Function Source: https://pu2clr.github.io/SI4735 This function automatically detects the I2C bus address of the SI473X device. It simplifies setup by eliminating the need to manually configure the address based on the SEN pin connection. ```c++ getDeviceI2CAddress() ``` -------------------------------- ### Setup SI4735 with Full Parameters Source: https://pu2clr.github.io/SI4735/extras/apidoc/html/group__group07.html Initializes the SI4735 device with specified parameters including reset pin, interrupt enable, default function, audio mode, clock type, and GPO2 enable. Analog audio mode is default if not specified. ```cpp rx.setup(RESET_PIN, 0, POWER_UP_AM, SI473X_ANALOG_AUDIO, XOSCEN_CRYSTAL, 0); ``` -------------------------------- ### SI4735::setFM() (Band Configuration) Source: https://pu2clr.github.io/SI4735/extras/apidoc/html/group__group08.html Sets the radio to FM function, defining the band range, initial frequency, and step. Example: sets band from 64MHz to 108MHz, starting at 103.9MHz with a 100kHz step (step value 10 means 100kHz). ```APIDOC ## SI4735::setFM() [2/2] ### Description Sets the radio to FM function. Defines the band range you want to use for the FM mode. The example below sets the band from 64MHz to 108MHzkHz on FM mode. The band will start on 103.9MHz and step is 100kHz. On FM mode, the step 10 means 100kHz. If you want a 1MHz step, use 100. si4735.setFM(6400, 10800, 10390, 10); ### Parameters * **fromFreq** (uint16_t) - minimum frequency for the band * **toFreq** (uint16_t) - maximum frequency for the band * **initialFreq** (uint16_t) - initial frequency (default frequency) * **step** (uint16_t) - step used to go to the next channel ### See also Si47XX PROGRAMMING GUIDE; AN332 (REV 1.0); pages 70 setFM() setFrequencyStep() ### References SI4735::setFM() ``` -------------------------------- ### SI4735 's' Functions Source: https://pu2clr.github.io/SI4735/extras/apidoc/html/functions_s.html This section details various functions available in the SI4735 library that start with the letter 's'. These functions cover a wide range of operations including station seeking, command sending, property setting, audio configuration, and device setup. ```APIDOC ## SI4735 Library Functions (s) ### Description This document lists the available functions for the SI4735 library that start with the letter 's'. These functions control various aspects of the SI4735 chip, including tuning, seeking, audio settings, and device properties. ### Functions * seekNextStation() * seekPreviousStation() * seekStation() * seekStationDown() * seekStationProgress() * seekStationUp() * sendCommand() * sendProperty() * sendSSBModeProperty() * setAGC() * setAM() * setAmAgcAttackRate() * setAmAgcReleaseRate() * setAMDeEmphasis() * setAmDelayNB() * setAMFrontEndAgcControl() * setAmNoiseBlank() * setAMSoftMuteAttackRate() * setAmSoftMuteMaxAttenuation() * setAMSoftMuteRate() * setAMSoftMuteReleaseRate() * setAMSoftMuteSlop() * setAMSoftMuteSnrThreshold() * setAudioMode() * setAudioMute() * setAudioMuteMcuPin() * setAutomaticGainControl() * setAvcAmDefaultGain() * setAvcAmMaxGain() * setAvcAmMinGain() * setBandwidth() * setDeviceI2CAddress() * setDeviceOtherI2CAddress() * setFifoCount() * setFM() * setFmBandwidth() * setFmBlendMonoThreshold() * setFmBlendMultiPathMonoThreshold() * setFmBlendMultiPathStereoThreshold() * setFmBLendRssiMonoThreshold() * setFmBlendRssiStereoThreshold() * setFmBLendSnrMonoThreshold() * setFmBlendSnrStereoThreshold() * setFmBlendStereoThreshold() * setFMDeEmphasis() * setFmNoiseBlank() * setFmNoiseBlank_IIR_Filter() * setFmNoiseBlankDelay() * setFmNoiseBlankInterval() * setFmNoiseBlankRate() * setFmNoiseBlankThreshold() * setFmSoftMuteMaxAttenuation() * setFmStereoOff() * setFmStereoOn() * setFrequency() * setFrequencyDown() * setFrequencyNBFM() * setFrequencyStep() * setFrequencyUp() * setGpio() * setGpioCtl() * setGpioIen() * setHardwareAudioMute() * setI2CFastMode() * setI2CFastModeCustom() * setI2CLowSpeedMode() * setI2CStandardMode() * setMaxDelayPowerUp() * setMaxDelaySetFrequency() * setMaxSeekTime() * setNBFM() * setPowerUp() * setProperty() * setRdsConfig() * setRdsIntSource() * setRefClock() * setRefClockPrescaler() * setSBBSidebandCutoffFilter() * setSeekAmLimits() * setSeekAmRssiThreshold() * setSeekAmSNRThreshold() * setSeekAmSpacing() * setSeekAmSrnThreshold() * setSeekFmLimits() * setSeekFmRssiThreshold() * setSeekFmSNRThreshold() * setSeekFmSpacing() * setSeekFmSrnThreshold() * setSSB() * setSsbAgcAttackRate() * setSsbAgcOverrite() * setSsbAgcReleaseRate() * setSSBAudioBandwidth() * setSSBAutomaticVolumeControl() * setSSBAvcDivider() * setSSBBfo() * setSSBConfig() * setSSBDspAfc() * setSsbIfAgcAttackRate() * setSsbIfAgcReleaseRate() * setSSBSidebandCutoffFilter() * setSSBSoftMute() * setSsbSoftMuteMaxAttenuation() * setTuneFrequencyAntennaCapacitor() * setTuneFrequencyFast() * setTuneFrequencyFreze() * setup() * setVolume() * setVolumeDown() * setVolumeUp() * SI4735() * ssbPowerUp() ``` -------------------------------- ### Set FM Function with Band and Step Source: https://pu2clr.github.io/SI4735/extras/apidoc/html/group__group08.html Sets the radio to FM function, defining the band range, initial frequency, and step. Example sets band from 64MHz to 108MHz, starting at 103.9MHz with a 100kHz step (step value 10). A step value of 100 corresponds to a 1MHz step. ```cpp void SI4735::setFM(uint16_t _fromFreq, uint16_t _toFreq, uint16_t _initialFreq, uint16_t _step) ``` ```cpp si4735.setFM(6400, 10800, 10390, 10); ``` -------------------------------- ### Example of Switching Between AM and FM Source: https://pu2clr.github.io/SI4735/extras/docbr Illustrates how to switch between AM and FM bands based on user input (key press), setting the appropriate band and frequency. ```cpp switch (key) { case 'A': si4735.setAM(); si4735.setFrequency(am_freq); break; case 'F': si4735.setFM(); si4735.setFrequency(fm_freq); break; . . . ``` -------------------------------- ### Example of Volume Up/Down Control Source: https://pu2clr.github.io/SI4735/extras/docbr Shows how to adjust the volume using volumeUp() and volumeDown() functions based on user input (key press). ```cpp switch (key) { case '+': si4735.volumeUp(); break; case '-': si4735.volumeDown(); break; . . . ``` -------------------------------- ### Get SI47XX Status Response Source: https://pu2clr.github.io/SI4735/extras/apidoc/html/group__group10.html Gets the first byte of the status response from the SI47XX device. ```cpp si47x_status SI4735::getStatusResponse () ``` -------------------------------- ### Loading Compressed SSB Patch Example Source: https://pu2clr.github.io/SI4735/extras/apidoc/html/patch__ssb__compressed_8h_source.html Demonstrates how to load a compressed SSB patch using the SI4735 Arduino library. Ensure the library is included and the necessary patch data arrays are defined. This function configures I2C, powers up the patch, and downloads the compressed patch data. ```cpp #include // SSB patch for whole SSBRX initialization string const uint16_t size_content = sizeof ssb_patch_content; // See ssb_patch_content array below const uint16_t cmd_0x15_size = sizeof cmd_0x15; // Array of lines where the 0x15 command occurs in the patch content. void loadSSB() { . . rx.setI2CFastModeCustom(500000); rx.queryLibraryId(); // Is it really necessary here? I will check it. rx.patchPowerUp(); delay(50); rx.downloadCompressedPatch(ssb_patch_content, size_content, cmd_0x15, cmd_0x15_size); rx.setSSBConfig(bandwidthSSB[bwIdxSSB].idx, 1, 0, 1, 0, 1); rx.setI2CStandardMode(); . . } ``` -------------------------------- ### Get Current SNR Metric Source: https://pu2clr.github.io/SI4735/extras/docbr Gets the current Signal-to-Noise Ratio (SNR) metric in dB. Applicable for AM and FM. ```c++ /* * Gets current SNR metric (0–127 dB). * AM and FM */ inline byte SI4735::getCurrentSNR() ``` -------------------------------- ### Get Current Receive Signal Strength Source: https://pu2clr.github.io/SI4735/extras/docbr Gets the current receive signal strength in dBμV. Applicable for AM and FM. ```c++ /* * Gets current receive signal strength (0–127 dBμV). * AM and FM */ inline byte SI4735::getCurrentRSSI() ``` -------------------------------- ### List All Available Boards Source: https://pu2clr.github.io/SI4735/examples Displays a comprehensive list of all supported Arduino boards, useful for obtaining FQBN information for compilation and uploading. ```bash $ arduino-cli board listall ``` -------------------------------- ### Example of Seeking Station Source: https://pu2clr.github.io/SI4735/extras/docbr Demonstrates how to initiate a station seek operation, searching upwards and wrapping around the band if the limit is reached. ```cpp si4735.seekStation(1,1); ``` -------------------------------- ### getFirmwareFWMAJOR Source: https://pu2clr.github.io/SI4735/extras/apidoc/html/group__group06.html Returns the Firmware F W M A J O R. ```APIDOC ## getFirmwareFWMAJOR() ### Description Returns the Firmware F W M A J O R. ### Method ``` uint8_t SI4735::getFirmwareFWMAJOR (void) ``` ### Returns - uint8_t: The Firmware F W M A J O R. ``` -------------------------------- ### Seek Station Progress Example Source: https://pu2clr.github.io/SI4735/extras/apidoc/html/group__group08.html Demonstrates how to use seekStationProgress to seek a station up or down and display the current frequency. Requires a user-defined showFrequency function. ```C++ void showFrequency( uint16_t freq ) { Serial.print(freq); Serial.println("MHz "); } void loop() { receiver.seekStationProgress(showFrequency,1); // Seek Up . . . receiver.seekStationProgress(showFrequency,0); // Seek Down } ``` -------------------------------- ### Global Functions Starting with 'g' Source: https://pu2clr.github.io/SI4735/extras/apidoc/html/functions_func_g.html This section details the global functions available in the SI4735 class that start with the letter 'g'. These functions allow users to query the state and retrieve data from the Si4735 chip. ```APIDOC ## Global Functions Starting with 'g' ### Description This section details the global functions available in the SI4735 class that start with the letter 'g'. These functions allow users to query the state and retrieve data from the Si4735 chip. ### Functions - **getACFIndicator()** : SI4735 - **getAgcGainIndex()** : SI4735 - **getAntennaTuningCapacitor()** : SI4735 - **getAutomaticGainControl()** : SI4735 - **getBandLimit()** : SI4735 - **getCommandResponse()** : SI4735 - **getCurrentAfcRailIndicator()** : SI4735 - **getCurrentAvcAmMaxGain()** : SI4735 - **getCurrentBlendDetectInterrupt()** : SI4735 - **getCurrentFrequency()** : SI4735 - **getCurrentMultipath()** : SI4735 - **getCurrentMultipathDetectHigh()** : SI4735 - **getCurrentMultipathDetectLow()** : SI4735 - **getCurrentPilot()** : SI4735 - **getCurrentReceivedSignalQuality()** : SI4735 - **getCurrentRSSI()** : SI4735 - **getCurrentRssiDetectHigh()** : SI4735 - **getCurrentRssiDetectLow()** : SI4735 - **getCurrentSignedFrequencyOffset()** : SI4735 - **getCurrentSNR()** : SI4735 - **getCurrentSnrDetectHigh()** : SI4735 - **getCurrentSnrDetectLow()** : SI4735 - **getCurrentSoftMuteIndicator()** : SI4735 - **getCurrentStereoBlend()** : SI4735 - **getCurrentValidChannel()** : SI4735 - **getCurrentVolume()** : SI4735 - **getDeviceI2CAddress()** : SI4735 - **getEndIndicatorGroupA()** : SI4735 - **getEndIndicatorGroupB()** : SI4735 - **getFirmware()** : SI4735 - **getFirmwareCHIPREV()** : SI4735 - **getFirmwareCMPMAJOR()** : SI4735 - **getFirmwareCMPMINOR()** : SI4735 - **getFirmwareFWMAJOR()** : SI4735 - **getFirmwareFWMINOR()** : SI4735 - **getFirmwarePATCHH()** : SI4735 - **getFirmwarePATCHL()** : SI4735 - **getFirmwarePN()** : SI4735 - **getFrequency()** : SI4735 - **getGroupLost()** : SI4735 - **getInterruptStatus()** : SI4735 - **getNext2Block()** : SI4735 - **getNext4Block()** : SI4735 - **getNumRdsFifoUsed()** : SI4735 - **getProperty()** : SI4735 - **getRadioDataSystemInterrupt()** : SI4735 - **getRdsAllData()** : SI4735 - **getRdsDateTime()** : SI4735 - **getRdsFlagAB()** : SI4735 - **getRdsGroupType()** : SI4735 - **getRdsNewBlockA()** : SI4735 - **getRdsNewBlockB()** : SI4735 - **getRdsPI()** : SI4735 - **getRdsProgramInformation()** : SI4735 - **getRdsProgramType()** : SI4735 - **getRdsReceived()** : SI4735 - **getRdsStationInformation()** : SI4735 - **getRdsStationName()** : SI4735 - **getRdsStatus()** : SI4735 - **getRdsSync()** : SI4735 - **getRdsSyncFound()** : SI4735 - **getRdsSyncLost()** : SI4735 - **getRdsText()** : SI4735 - **getRdsText0A()** : SI4735 - **getRdsText2A()** : SI4735 - **getRdsText2B()** : SI4735 - **getRdsTextSegmentAddress()** : SI4735 - **getRdsTime()** : SI4735 - **getRdsVersionCode()** : SI4735 - **getReceivedSignalStrengthIndicator()** : SI4735 - **getSignalQualityInterrupt()** : SI4735 - **getSsbAgcStatus()** : SI4735 - **getStatus()** : SI4735 - **getStatusCTS()** : SI4735 - **getStatusError()** : SI4735 - **getStatusMULT()** : SI4735 - **getStatusResponse()** : SI4735 - **getStatusSNR()** : SI4735 - **getStatusValid()** : SI4735 - **getTuneCompleteTriggered()** : SI4735 - **getTuneFrequecyFast()** : SI4735 - **getTuneFrequecyFreeze()** : SI4735 - **getVolume()** : SI4735 ``` -------------------------------- ### Prepare SI4735 for SSBRX Patch Source: https://pu2clr.github.io/SI4735/extras/apidoc/html/group__group17.html Prepares the device to apply an SSBRX patch by powering it up. Call queryLibraryId() before using this method. ```cpp void SI4735::patchPowerUp ( ); ``` -------------------------------- ### Set Frequency Step Example Source: https://pu2clr.github.io/SI4735/extras/apidoc/html/group__group08.html Demonstrates setting the frequency step for AM and FM modes. The step value's interpretation depends on the current band. For FM, 10 means 100kHz; for AM, 1 means 1kHz. ```cpp void setFrequencyStep(uint16_t step) Sets the current step value. **Definition:** SI4735.h:2743 ``` ```cpp void setFM() Sets the radio to FM function. **Definition:** SI4735.cpp:790 ``` ```cpp setFM(6400,10800,10390,10); setFrequencyStep(100); // the step will be 1MHz (you are using FM mode) . . . setAM(7000,7600,7100,5); setFrequencyStep(1); // the step will be 1kHz (you are usin AM or SSB mode) ``` -------------------------------- ### getStatusMULT Source: https://pu2clr.github.io/SI4735/extras/apidoc/html/class_s_i4735.html Gets the status of the MULT (Multipath) indicator. ```APIDOC ## getStatusMULT ### Description Get the Status the M U L T. ### Method uint8_t getStatusMULT() ### Returns The MULT status value. ``` -------------------------------- ### Volume Control Source: https://pu2clr.github.io/SI4735/extras/apidoc/html/class_s_i4735.html Functions for setting and getting the volume level. ```APIDOC ## setVolume ### Description Sets the volume level. The valid range is from 0 to 63. ### Method void ### Parameters - **volume** (uint8_t) - The desired volume level (0-63). ## getVolume ### Description Gets the current volume level. ### Method uint8_t ### Parameters None ## volumeDown ### Description Decreases the sound volume level by one step. ### Method void ### Parameters None ## volumeUp ### Description Increases the sound volume level by one step. ### Method void ### Parameters None ## getCurrentVolume ### Description Gets the current volume level. ### Method uint8_t ### Parameters None ## setVolumeUp ### Description Increases the volume level by one step. ### Method void ### Parameters None ## setVolumeDown ### Description Decreases the volume level by one step. ### Method void ### Parameters None ``` -------------------------------- ### getFirmwarePN Source: https://pu2clr.github.io/SI4735/extras/apidoc/html/group__group06.html Returns the Firmware Part Number. ```APIDOC ## getFirmwarePN() ### Description Returns the Firmware Part Number. ### Method ``` uint8_t SI4735::getFirmwarePN (void) ``` ### Returns - uint8_t: The Firmware Part Number. ``` -------------------------------- ### getFrequency Source: https://pu2clr.github.io/SI4735/extras/apidoc/html/class_s_i4735.html Gets the current operating frequency of the Si4735 for AM or FM. ```APIDOC ## getFrequency ### Description Gets the current frequency of the Si4735 (AM or FM) ### Method uint16_t getFrequency(void) ### Returns The current frequency. ``` -------------------------------- ### getFirmwareFWMINOR Source: https://pu2clr.github.io/SI4735/extras/apidoc/html/group__group06.html Returns the Firmware F W M I N O R. ```APIDOC ## getFirmwareFWMINOR() ### Description Returns the Firmware F W M I N O R. ### Method ``` uint8_t SI4735::getFirmwareFWMINOR (void) ``` ### Returns - uint8_t: The Firmware F W M I N O R. ``` -------------------------------- ### getStatusValid Source: https://pu2clr.github.io/SI4735/extras/apidoc/html/class_s_i4735.html Gets the channel status, indicating if the current channel is valid. ```APIDOC ## getStatusValid ### Description Gets the channel status. ### Method bool getStatusValid() ### Returns True if the channel status is valid, false otherwise. ``` -------------------------------- ### List Connected Arduino Boards Source: https://pu2clr.github.io/SI4735/examples Use the 'arduino-cli board list' command to see connected Arduino devices and their details. This example shows two devices connected simultaneously. ```bash $ arduino-cli board list Port Protocol Type Board Name FQBN Core /dev/cu.usbmodem14101 serial Serial Port (USB) Arduino Yún arduino:avr:yun arduino:avr /dev/cu.usbmodem14201 serial Serial Port (USB) Arduino Micro arduino:avr:micro arduino:avr ```