Skip to content

Libraries

K7MDL edited this page Apr 20, 2024 · 16 revisions

Updated April 20, 2024

While each build's list of required libraries will vary over time, most are constant.

Here is a list of the required libraries and where to find them current as of the SDR_8875 build on Mar 8, 2021. Some of these come with the TeensyDuino install so are already present in the hardware/teensy library folder

Here is my end of the compile log (Output Windows in the IDE) for a successful compile for the 7" RA8876 display configuration. Not the summarized list of libraries used. At the start of compile it hunts for all libraries and list aletrfnate ones faound as well. Make sure the right one is used. You could have different libraries with the same name, or different versions scattered on your disk.

image

The source files will look like this:

#include <Arduino.h> // included with Arduino

#include <avr/pgmspace.h> // Included with Arduino/TeensyDuino for decoration FLASHMEM, PROGMEM, etc.

// T4_Powerbutton is obsoleted with Arduino IDE 1.8.19 with TeesnyDuino 1.56. Code updated Jan 2022. Was used for IDE 1.8.13 in early 2021. //#include <T4_PowerButton.h> // https://github.com/FrankBoesing/T4_PowerButton for the FlexInfo() and Hardfault reporting tools

#include <SPI.h> // included with Arduino

#include <Wire.h> // included with Arduino

#include <WireIMXRT.h> // gets installed with wire.h

#include <WireKinetis.h> // included with Arduino

#define ENCODER_OPTIMIZE_INTERRUPTS // leave this one here. Not normally user changed

#include <Encoder.h> // Internal Teensy library and at C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries

#include <Metro.h> // GitHub https://github.com/nusolar/Metro

#include <Audio.h> // Included with Teensy and at GitHub https://github.com/PaulStoffregen/Audio

#include <OpenAudio_ArduinoLibrary.h> // F32 library located on GitHub. https://github.com/chipaudette/OpenAudio_ArduinoLibrary

#include <InternalTemperature.h>// V2.1.0 @ Github https://github.com/LAtimes2/InternalTemperature

#include <TimeLib.h> // TODO - list where to find this

#include <ili9488_t3_font_Arial.h> // https://github.com/PaulStoffregen/ILI9341_t3

#include <ili9488_t3_font_ArialBold.h> // https://github.com/PaulStoffregen/ILI9341_t3

*** NOTE *** For each RA887x library below, if you get dupe GLCDFONT compile errors, you can rename the glcdfonts.c file in the library's \src folder to "hide" the file. That resolves the compile problem. Not sure what causes it yet.

#include <RA8875.h> // internal Teensy library with ft5206 cap touch enabled in user_setting.h

/* [CHOOSE YOUR TOUCH SCREEN TYPE] +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ This library supports the RA8875 internal resistive touch screen driver or a FT5206 based capacitive touch screen driver. Below, you have to choose one of them. The Resistive Touch screen it's driven directly by RA8875. The Capacitive Touch Screen use a I2C chip called FT5206 (hardwired to address 0x38). Please choose at list one (NOT both), if you comment both it's the same as _AVOID_TOUCHSCREEN*/

//#define USE_RA8875_TOUCH//resistive touch screen #define USE_FT5206_TOUCH//capacitive touch screen Like the RA8876 we use internal backlight, no external backlight wire required.

#include <RA8876_t3.h> // Github https://github.com/wwatson4506/Ra8876LiteTeensy Old Note (Not likely needed anymore): a small mod is made to comment out the tft.print(val); and tft.print(" "); statements for the ringMeter() function. This uses the external FT5206 touch library unlike the RA8875 where we use the built in driver. Like the RA8875 we use internal backlight, no external backlight wire required. Note that several RA8875 library functions do not exist in the RA8876 lib so I recreated them in the main code (typically display.cpp). The #ifdef USE_RA8875 will enable them appropriately.

#include <FT5206.h> Used with the RA8876 library and displays https://github.com/sumotoy/FT5206. For the RA8875 using the built-in touch driver as noted above.

Before May 7, 2022 : ** In RadioConfig.h and Spectrum_RA887x.h set #define USE_RA8875 to use RA8875 displays, comment it out for RA8876 displays

After May 7, 2022 : ** In RadioConfig.h (only) set #define USE_RA8875 to use RA8875 displays, comment it out for RA8876 displays

One of 2 PLL libraries uses depending on PLL board. None are required if using the RS-HFIQ SDR hardware. #include <si5351mcu.h> // Github https://github.com/pavelmc/Si5351mcu #include <si5351.h> // Using this etherkits library because it supports the B and C version PLLs with external ref clock https://github.com/etherkit/Si5351Arduino

#include <NativeEthernet.h> // Included with Teensy At the end of SDR_Network.cpp is a sample patch to replace the while(!=LinkStatus) {} located at the end of the end of Ethernet.begin() function in NativeEthernet which, unpatched, can result in an endless loop situation.

#include <NativeEthernetUdp.h>// Included with Teensy

#include <SVN1AFN_BandpassFilters.h> // Modified and redistributed in this build source folder The BandpassFilter library uses this MCP23017 I2C port expander library https://github.com/adafruit/Adafruit-MCP23017-Arduino-Library

#include <i2cEncoderLibV2.h> // GitHub https://github.com/Fattoresaimon/ArduinoDuPPaLib // Hardware verson 2.1, Arduino library version 1.40. #include <LiquidCrystal_I2C.h> // For 2x16 LCD text display, I2C connected. common library likely already installed.

Before May 7, 2022 : #include "Spectrum_RA887x.h" // custom spectrum library by K7MDL. Download from GitHub at https://github.com/K7MDL2/Spectrum_RA887x_Library
Place this library in your Arduino libraries folder. Usually located in C:/users//Documents/Arduino/libraries

May 7, 2022 and later. The Spectrum_RA887x library has been merged into the project and is no longer needed.

#include "AudioFilterConvolution_F32.h" // distributed with SDR program files

Only needed if you are using the RS-HFIQ SDR transceiver hardware. It connects via the Teensy 4 USB host port. #include <SDR_RS_HFIQ.h> // https://github.com/K7MDL2/Teensy4_USB_Host_RS-HFIQ_Library //Place this library in your Arduino libraries folder. Usually located in C:/users//Documents/Arduino/libraries/