Hybrid Radio Project

Overview:

The Hybrid Radio Project is and advanced Colour LCD with Logo Download for the DAB Shield.  

Components:

The hardware components are:

WeMos D1 R32 ESP32 Processor Board

DAB Shield

ROWLOAND TECHNOLOGY 3.5" 480x320 Colour Capacitive Touch Screen

The software components are: 

DABShiled Library

TFT_eSPI

TAMC_GT911 (or FT6236 for alternative display)

Adruino Json

TinyXML2

SPIFFS

PNGDec

Roland Technology Display (supplied 2024 -)

The Roland Technogloy Screen using SPI serial communications for the graphics, and I2C for the touch screen.  The SPI Bus is shared with the DAB Shield but uses different Chip Select (CS) lines to communicate to each device.  There are also additional pins used for the Data/Command (DC), Backlight (BL) and Reset (RT) lines.   To avoid conflict with pins used by the DABShield the following pins are chosen:


Screen Wiring Harness

CAUTION:  -- The supplied ribbon cable may not have the same starting colour as the photo above --

Installing the Arduino Integrated Development Environment (IDE)

The Arduino IDE is the software where you write your code and upload it to the Arduino Board.

This Getting Started assumes that you will use the Windows Desktop Arduino IDE.  We recommend using v2.0 onwards.

The IDE software can be downloaded from https://www.arduino.cc/en/Main/Software

This page also contains a getting started link which shows you how to install the software.

There is also a good introduction to Using the IDE.

Installing the D1 R32 Board Support

In order to install the Espressif Arudino-ESP32 support package, the following URL should be added to the Arduino IDE Preferences "Additional boards manger URLs"

https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json

Once this is added, the esp32 by Espressif  Systems Board package can be installed from Board Manger (Tools | Board: | Board Manager) and Searching for "esp32"

Installing Libraries

The Hybrid-Radio Project uses Libraries for various functionality.   These can be installed from Library Manager  (Tools | Manage Libraries).

DABShield by Adrian Verity - Version 1.5.4 or above

TFT_eSPI by Bodmer - Version 2.5.0

TAMC_GT911  by TAMC - Version 1.0.2

ArduinoJson by Benoit Blanchon - Version 6.21.2 or above

PNGdec by Larry Bank - Version 1.0.1

the following libraries require manual installation:

TinyXML-2 - Source Files downloaded from here:  and added to a Folder TinyXML2 in your Arduino libraires directory (<Arduino Project Directory>/ libraries/TinyXML2).

FT6236  by Dustin Watts -  (Only required for alternative display). Requires downloading from here: and added to Folder in your Arduino libraries directory (<Arduino Project Directory>/ libraries/FT6236).

Installing the Project

The Hybrid Radio Project is part of the DAB Shield Examples.
File>Examples>DABShield>HybridRadio

Setting up Display

The example code has been written for various displays, ensure that the display type matches your hardware:


//#define DFROBOT_DISPLAY

//#define RESISTIVE_TOUCH

#define ROWLAND_DISPLAY

Setting up TFT_eSPI

The Display SPI settings have to be configured for the TFT_eSPI library.  This is done by editing the User_Setup.h file in the TFT_eSPI folder~: <Arduino Project Directory>/ libraries/TFT_eSPI).

Only one display driver should be enabled this is the ILI9488_DRIVER:

#define ILI9488_DRIVER     // WARNING: Do not connect ILI9488 display SDO to MISO if other devices share the SPI bus (TFT SDO does NOT tristate when CS is high)

The SPI pins should be  set up as follows:

#define TFT_MISO 19

#define TFT_MOSI 23

#define TFT_SCLK 18

#define TFT_CS   5  // Chip select control pin

#define TFT_DC   16  // Data Command control pin

#define TFT_RST  13  // Reset pin (could connect to RST pin)

The configured User_Setup.h file can be downloaded here.

Setting up WiFi

The WiFi settings of a 2.4 GHz WiFi connection should be configured by settup up the ssid and password strings:


const char *ssid = "WIFI_SSID";

const char *password = "WIFI_PASSWORD";

Creating Images


The images used in the example software are converted from Bitmaps to 16bit data arrays (RGB565 format) using the software: Image2Bitmap
The  image data is in the icons.h  header file.  Note that the  data is made  "const" so that is  is  rom data and not copied into RAM.
i.e. the Image2Bitmap generated  data is change from:
uint16_t image = {

to:
const uint16_t my_image[] = {

Roland Technologies Display Wiring

"Support for the alternative Roland Technologies Capacitive Display coming soon"