Giter VIP home page Giter VIP logo

205-internet-radio's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

205-internet-radio's Issues

How to turn all led on on a stepper to run the stepper motor

Hi guys my issue on this project is when i run the below code. The stepper led lights up one by one and cant function the stepper motor. The load cell works well with the oled display. Izit the interruption between virtual pin that cause this issue?

#include <TFT_eSPI.h>

/* Comment this out to disable prints and save space */
#define BLYNK_PRINT Serial

#include <Stepper.h>
#include <HX711.h>
#include <Wire.h>
#include "soc/rtc.h"
#include <stdlib.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#include <SimpleTimer.h>
#include "esp32-hal-cpu.h"

#include <WiFi.h>
#include <WiFiClient.h>
const char ssid[] = "4G CPE FF5A"; // WiFi name
const char password[] = "yuankai00"; // WiFi password

const int LOADCELL1_DOUT_PIN = 19;
const int LOADCELL_SCK_PIN = 23;

#define SENSORCNT 1
HX711 scale[SENSORCNT];

// Define the pins for the OLED display
const int OLED_SDA_PIN = 21;
const int OLED_SCL_PIN = 22;

int rbutton = 18; // this button will be used to reset the scale to 0.
String myString;
String cmessage; // complete message
char buff[10];
float weight;
float calibration_factor = 410.45; // for me this vlaue works just perfect 206140

SimpleTimer timer;

// for the OLED display

#define SCREEN_WIDTH 128 // OLED display width, in pixels
#define SCREEN_HEIGHT 64 // OLED display height, in pixels

// Declaration for an SSD1306 display connected to I2C (SDA, SCL pins)
#define OLED_RESET -1 // Reset pin # (or -1 if sharing Arduino reset pin)
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);

#include <BlynkSimpleEsp32.h>
char auth[] = "lQkgSEGxVzm3SAfET_85JU7DE3tCP1v7"; // Blynk Authentication Token
WiFiServer server(80);

#include <SPI.h>
#include <TFT_eSPI.h>
TFT_eSPI tft = TFT_eSPI(); // Resolution 135 x 240
#define FF17 &FreeSans9pt7b
#define FF21 &FreeSansBold9pt7b
#define ROW1 0,16
#define ROW2 0,38
#define ROW3 0,60
#define ROW4 0,82
#define ROW5 0,104
#define ROW6 0,126

#define BUTTON1 35
#define BUTTON2 0

#define STEPPER_IN1 27
#define STEPPER_IN2 26
#define STEPPER_IN3 25
#define STEPPER_IN4 33

#define REVOLUTION_STEP 2048 // 1 revolution

boolean stepperDirection = false;
int stepperStep = 0;
int stepperStepCount = 0;
boolean stepperMove = false;
long prevMillisStepper = 0;
int intervalStepper = 4; // Minimum is 2

boolean button1Pressed = false;
boolean button2Pressed = false;

BLYNK_WRITE(V0) // Button Widget is writing to pin V0
{
stepperDirection = param.asInt();

tft.fillRect(120, 65, 120, 25, TFT_BLACK);
tft.setCursor(120, 82);
if (stepperDirection) {
tft.print("CCW");
}
else {
tft.print("CW");
}
}

BLYNK_WRITE(V1) // Button Widget is writing to pin V1
{
int stepperSpeed = param.asInt();

tft.fillRect(120, 87, 120, 25, TFT_BLACK);
tft.setCursor(120, 104);
if (stepperSpeed == 1) {
intervalStepper = 4;
tft.print("Low");
}
else if (stepperSpeed == 2) {
intervalStepper = 3;
tft.print("Medium");
}
else if (stepperSpeed == 3) {
intervalStepper = 2;
tft.print("High");
}
}

BLYNK_WRITE(V2) // Button Widget is writing to pin V2
{
stepperMove = true;
stepperStepCount = 2;
stepperStep = 4;

tft.fillRect(120, 109, 120, 25, TFT_BLACK);
tft.setCursor(120, 126);
tft.print("Run");
}

void setup()
{
pinMode(BUTTON1, INPUT_PULLUP);
pinMode(BUTTON2, INPUT_PULLUP);

pinMode(STEPPER_IN1, OUTPUT);
pinMode(STEPPER_IN2, OUTPUT);
pinMode(STEPPER_IN3, OUTPUT);
pinMode(STEPPER_IN4, OUTPUT);

Serial.begin(115200);
Serial.print("Initialize Blynk.");

tft.init();
tft.setRotation(3);
tft.fillScreen(TFT_BLACK);

tft.setFreeFont(FF21);
tft.setTextColor(TFT_BLUE);
tft.setCursor(ROW1);
tft.print("Blynk Status:");

tft.setFreeFont(FF17);
tft.setTextColor(TFT_WHITE);
tft.setCursor(120, 16);
tft.print("Initialize...");

WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}

Serial.println("");
Serial.println("WiFi connected.");
Serial.println("IP address: ");
Serial.println(WiFi.localIP());

Blynk.begin(auth, ssid, password);

tft.fillRect(120, 0, 120, 35, TFT_BLACK);
tft.setCursor(120, 16);
tft.print("Ready!");

tft.setFreeFont(FF21);
tft.setTextColor(TFT_RED);
tft.setCursor(ROW3);
tft.print("STEPPER");
tft.setTextColor(TFT_GREEN);
tft.setCursor(ROW4);
tft.print("Direction:");
tft.setCursor(ROW5);
tft.print("Speed:");
tft.setCursor(ROW6);
tft.print("Status:");

tft.setFreeFont(FF17);
tft.setTextColor(TFT_YELLOW);
tft.setCursor(120, 82);
tft.print("CW");
tft.setCursor(120, 104);
tft.print("Low");
tft.setCursor(120, 126);
tft.print("Stop");

Blynk.virtualWrite(0, 0);
Blynk.virtualWrite(1, 1);
Blynk.virtualWrite(2, 0);

Serial.begin(115200);
display.begin(SSD1306_SWITCHCAPVCC, 0x3C);
display.clearDisplay();

display.setTextSize(2);
display.setTextColor(WHITE);
display.setCursor(0, 0);
display.println("Load Cell");
display.display();

scale[0].begin(LOADCELL1_DOUT_PIN, LOADCELL_SCK_PIN);
//scale[1]->begin(LOADCELL2_DOUT_PIN, LOADCELL_SCK_PIN);
//scale[2]->begin(LOADCELL3_DOUT_PIN, LOADCELL_SCK_PIN);

scale[0].set_scale(410.45);
scale[0].tare();
scale[0].read();
scale[0].read_average(20);
scale[0].get_value(5);
scale[0].get_units(5), 1;

//setCpuFrequencyMhz(RTC_CPU_FREQ_80M);
//pinMode(rbutton, INPUT_PULLUP);
//scale.set_scale();
//scale.tare(); //Reset the scale to 0
//long zero_factor = scale.read_average(); //Get a baseline reading

//display.begin(SSD1306_SWITCHCAPVCC, 0x3C);
//timer.setInterval(1000L, getSendData);
//display.clearDisplay();
//display.setTextColor(WHITE);

}

void loop()
{
Blynk.run();
timer.run();

char str[12];
float units = 0.0;
display.setTextSize(1);
display.setTextColor(WHITE, BLACK);

display.setCursor(0, 16);
display.print("Weight : ");
units = scale[0].get_units();
display.println(units, 1);
display.display();

display.setCursor(0, 16);
display.print("Weight : ");
units = scale[0].get_units(10);
display.println(units, 1);
display.display();

scale[0].power_down();
delay(1000);
scale[0].power_up();

if (digitalRead(BUTTON1) == LOW &&
button1Pressed == false) {
button1Pressed = true;

stepperDirection = false;
stepperMove = true;
stepperStepCount = 0;
stepperStep = 1;

}
else if (digitalRead(BUTTON1) == HIGH &&
button1Pressed == true) {
button1Pressed = false;
}

if (digitalRead(BUTTON2) == LOW) {

stepperDirection = true;
stepperMove = true;
stepperStepCount = 0;
stepperStep = 1;

}
else if (digitalRead(BUTTON2) == HIGH &&
button2Pressed == true) {
button2Pressed = false;
}

if (millis() - prevMillisStepper > intervalStepper) {

if (stepperMove == true) {
  if (stepperDirection) {
    if (stepperStep++ >= 3) {
      stepperStep = 0;
    }
  }
  else {
    if (stepperStep-- == 0) {
      stepperStep = 3;
    }
  }

  if (stepperStepCount++ == REVOLUTION_STEP) {
    stepperMove = false;
    stepperStep = 4;

    Blynk.virtualWrite(2, 0);
    
    tft.fillRect(120, 109, 120, 25, TFT_BLACK);
    tft.setCursor(120, 126);
    tft.print("Stop");
  }

  switch (stepperStep) {
    case 0:
      digitalWrite(STEPPER_IN1, HIGH);
      digitalWrite(STEPPER_IN2, LOW);
      digitalWrite(STEPPER_IN3, LOW);
      digitalWrite(STEPPER_IN4, LOW);
      break;

    case 1:
      digitalWrite(STEPPER_IN1, LOW);
      digitalWrite(STEPPER_IN2, HIGH);
      digitalWrite(STEPPER_IN3, LOW);
      digitalWrite(STEPPER_IN4, LOW);
      break;

    case 2:
      digitalWrite(STEPPER_IN1, LOW);
      digitalWrite(STEPPER_IN2, LOW);
      digitalWrite(STEPPER_IN3, HIGH);
      digitalWrite(STEPPER_IN4, LOW);
      break;

    case 3:
      digitalWrite(STEPPER_IN1, LOW);
      digitalWrite(STEPPER_IN2, LOW);
      digitalWrite(STEPPER_IN3, LOW);
      digitalWrite(STEPPER_IN4, HIGH);
      break;

    default:
      digitalWrite(STEPPER_IN1, LOW);
      digitalWrite(STEPPER_IN2, LOW);
      digitalWrite(STEPPER_IN3, LOW);
      digitalWrite(STEPPER_IN4, LOW);
      break;
  }
}

prevMillisStepper = millis();

}
}

void getSendData()
{

//Blynk.virtualWrite(V3,"Weight:");
//Blynk.virtualWrite(V4,myString);

// Oled display
display.clearDisplay();
display.setTextSize(3);
display.setCursor(0,0); // column row
display.print("Weight:");

display.setTextSize(4);
display.setCursor(0,30);
display.print(myString);

display.display();
}

ESP32 ECO V3

Hi Ralph,

Was just watching your video and heard you say the latest version is V1 and that you were looking at using the PSRAM. Just wanted to show you this nfo from Expressif in case you hit these issues with the WROVER PSRAM on older V1 versions instead of the V3.

https://www.espressif.com/sites/default/files/documentation/ESP32_ECO_V3_User_Guide__EN.pdf

Earlier versions had bugs in the silicon which they have fixed in this revision.

Design Change in ECO V3

Espressif has recently released one wafer-level change on ESP32 Series of products (ECO
V3). This document describes differences between V3 and previous ESP32 silicon wafer
revisions. Below are the main design changes in ECO V3 Series of chips:

  1. PSRAM Cache Bug Fix: Fixed “When the CPU accesses the external SRAM in a certain
    sequence, read & write errors can occur.”. Details of the issue can be found in item 3.9
    in ESP32 ECO and Workarounds for Bugs.

  2. Fixed “When each CPU reads certain different address spaces simultaneously, a read
    error can occur.” Details of the issue can be found in item 3.10 in ESP32 ECO and
    Workarounds for Bugs.

  3. Optimized 32.768 KHz crystal oscillator stability, the issue was reported by client that
    there is a low probability that under ECO V1 hardware, the 32.768 KHz crystal oscillator
    couldn’t start properly.

  4. Fixed Fault injection issues regarding secure boot and flash encryption are fixed.
    Reference: Security Advisory concerning fault injection and eFuse protections
    (CVE-2019-17391) & Espressif Security Advisory Concerning Fault Injection and Secure
    Boot (CVE-2019-15894)

  5. Improvement: Changed the minimum baud rate supported by the CAN module from 25
    kHz to 12.5 kHz.

  6. Allowed Download Boot mode to be permanently disabled by programming new eFuse
    bit UART_DOWNLOAD_DIS. When this bit is programmed to 1, Download Boot mode
    cannot be used and booting will fail if the strapping pins are set for this mode. Software
    program this bit by writing to bit 27 of EFUSE_BLK0_WDATA0_REG, and read this bit by
    reading bit 27 of EFUSE_BLK0_RDATA0_REG. Write disable for this bit is shared with
    write disable for the flash_crypt_cnt eFuse field.

Great job with the webradio videos keep it up! Please keep deep-diving into how the code and ring buffers work!

I was playing with https://github.com/Edzelf/ESP32-Radio before and helped include iHeartRadio to it a long while ago. The thing I liked about this code base is you can use MQTT to control the radio for home automation.

https

I used the following changes and these changes allow me to listen to https stations and http stations that have mirrored https.

main.h
#include <WiFiClientSecure.h>
WiFiClientSecure client;

Unfortunately this does not work if the station is http only.
Also I tried to make such improvements, but unfortunately it does not work.
WiFiClient client does not switch to WiFiClientSecure client
Any ideas?

main.h

#include <WiFiClientSecure.h>
WiFiClientSecure client;
bool http_s = true;
struct radioStationLayout
{
char host[64];
char path[128];
int port;
bool https;       // http=0 | https=1 <-----------!
char friendlyName[64];
uint8_t useMetaData;
};

ESP32-WROVER_Web_Radio.ino

void setup
{
http_s = preferences.getUInt("http_s", 0);
}

bool stationConnect(int stationNo)
{
if (http_s) {
WiFiClientSecure client;
int redirectedPort = 443;
}
else {
WiFiClient client;
int redirectedPort = 80; 
}

http_s = radioStation[stationNo].https;
...
preferences.putUInt("http_s", http_s);
...
}

*These are not complete changes just to demonstrate the idea.

Need help to start, please

Please help me to run this project by any method.
ESP32 WROOM + 2.8"ili9341 w/touch + VS1053
TFT_eSPI-2.2.23\examples\320 x 240\TFT_Clock - work fine
ESP_VS1053_Library\examples\SimpleMp3Player - work fine

Arduino IDE: Compilation runs without errors. But after loading the program into ESP32, I see only a white screen and a cyclic restart in the serial port monitor.

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1044
load:0x40078000,len:8896
load:0x40080400,len:5816
entry 0x400806ac
abort() was called at PC 0x401578ef on core 0

Backtrace: 0x4008dc5c:0x3ffe3ab0 0x4008de8d:0x3ffe3ad0 0x401578ef:0x3ffe3af0 0x40157936:0x3ffe3b10 0x4013f85f:0x3ffe3b30 0x4013f94e:0x3ffe3b50 0x4013f905:0x3ffe3b70 0x400dd0b9:0x3ffe3b90 0x400d1ef4:0x3ffe3bb0 0x400e063b:0x3ffe3bd0 0x400820d9:0x3ffe3bf0 0x400822e8:0x3ffe3c20 0x40079053:0x3ffe3c40 0x400790b9:0x3ffe3c70 0x400790c4:0x3ffe3ca0 0x4007928d:0x3ffe3cc0 0x400806de:0x3ffe3df0 0x40007c31:0x3ffe3eb0 0x4000073d:0x3ffe3f20

Rebooting...`

PlatformIO: Unsuccessfully again.
I installed for the first time Visual Studio Code with PlatformIO Core: 5.0.4 in Python 3.9.1.

Library Manager: Installing git+https://github.com/lorol/LITTLEFS.git
FileNotFoundError: [WinError 2] 
  File "C:\users\alexander\.platformio\penv\lib\site-packages\platformio\builder\main.py", line 170:
    env.SConscript("$BUILD_SCRIPT")
  File "C:\Users\Alexander\.platformio\packages\tool-scons\scons-local-4.0.1\SCons\Script\SConscript.py", line 598:
    return _SConscript(self.fs, *files, **subst_kw)
  File "C:\Users\Alexander\.platformio\packages\tool-scons\scons-local-4.0.1\SCons\Script\SConscript.py", line 287:
    exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)
  File "C:\users\alexander\.platformio\platforms\espressif32\builder\main.py", line 224:
    target_elf = env.BuildProgram()
  File "C:\Users\Alexander\.platformio\packages\tool-scons\scons-local-4.0.1\SCons\Environment.py", line 219:
    return self.method(*nargs, **kwargs)
  File "C:\users\alexander\.platformio\penv\lib\site-packages\platformio\builder\tools\platformio.py", line 62:
    env.ProcessProjectDeps()
  File "C:\Users\Alexander\.platformio\packages\tool-scons\scons-local-4.0.1\SCons\Environment.py", line 219:
    return self.method(*nargs, **kwargs)
  File "C:\users\alexander\.platformio\penv\lib\site-packages\platformio\builder\tools\platformio.py", line 140:
    project_lib_builder = env.ConfigureProjectLibBuilder()
  File "C:\Users\Alexander\.platformio\packages\tool-scons\scons-local-4.0.1\SCons\Environment.py", line 219:
    return self.method(*nargs, **kwargs)
  File "C:\users\alexander\.platformio\penv\lib\site-packages\platformio\builder\tools\piolib.py", line 1062:
    project.install_dependencies()
  File "C:\users\alexander\.platformio\penv\lib\site-packages\platformio\builder\tools\piolib.py", line 898:
    lm.install(spec)
  File "c:\users\alexander\.platformio\penv\lib\site-packages\platformio\package\manager\_install.py", line 49:
    spec, silent=silent, skip_dependencies=skip_dependencies, force=force
  File "c:\users\alexander\.platformio\penv\lib\site-packages\platformio\package\manager\library.py", line 86:
    force=force,
  File "c:\users\alexander\.platformio\penv\lib\site-packages\platformio\package\manager\_install.py", line 97:
    pkg = self.install_from_url(spec.url, spec, silent=silent)
  File "c:\users\alexander\.platformio\penv\lib\site-packages\platformio\package\manager\_install.py", line 141:
    vcs = VCSClientFactory.new(tmp_dir, url)
  File "c:\users\alexander\.platformio\penv\lib\site-packages\platformio\package\vcsclient.py", line 55:
    src_dir, remote_url, tag, silent
  File "c:\users\alexander\.platformio\penv\lib\site-packages\platformio\package\vcsclient.py", line 137:
    self.configure()
  File "c:\users\alexander\.platformio\penv\lib\site-packages\platformio\package\vcsclient.py", line 146:
    result = proc.exec_command([cls.command, "--exec-path"])
  File "c:\users\alexander\.platformio\penv\lib\site-packages\platformio\proc.py", line 113:
    p = subprocess.Popen(*args, **kwargs)
  File "C:\Users\Alexander\.platformio\python3\lib\subprocess.py", line 800:
    restore_signals, start_new_session)
  File "C:\Users\Alexander\.platformio\python3\lib\subprocess.py", line 1207:
    startupinfo)

Arduino Version fails to compile

Hi Ralph, my building work has finally been finished, it seems like a long time since I last worked on the radio, good to see you back to your regular slot on YouTube after your move.

Thanks for compiling an Arduino Version of the Internet Radio. I updated the esp32 core to 1.0.6 and used your modified cbuf.cpp file, Version 1.5 now compiles fine until it hangs at line 126 with the message:

'class VS1053' has no member named 'setAudio'
Could not find boards.txt in C:\Users\Tadder\AppData\Local\Arduino15\packages\esp32\	hardware\esp32\1.0.2. Is it pre-1.5?

There are two versions 1.0.2 and 1.0.6; 1.0.2 does not contain ‘boards.txt’. so I tried removing 1.0.2 to force the use of 1.0.6 but no joy.

The ‘Adafruit VS1053 Library’ is at Version 1.2.0.

I suspect I am missing something basic, but wonder if you can point me in the right direction please?

Very choppy audio (without PSRAM) and some more questions

Hi! First of all thank you very much for this project and the corresponding youtube videos. I had a TFT display lying around, and always a couple of esp32's so I ordered the vs1053 since this seemed like it would be fun to make.

I think I have a working radio on a breadboard now, though I had a lot of trouble with the wiring. I should note I am not a hardware-guy, and it is all a bit new to me. But after going through the source code, the board schematics and some youtube comments, and realizing 3 of the four SPI connections can be shared (and that the touch devices' mosi and miso are labelled with other names) I think I have the wiring correct. The only one I'm not sure about is the vs1053's 'XRST' pin. I have it hooked up to the esp32's 'EN' pin (which I believe is the reset), but I read in a youtube comment that it should not be connected to the esp32 at all? I think I tested it unconnected, but then I get no audio. Could you help me with that?

Now, I only had WROOM modules around, so I was expecting a bit of a glitch in the audio once in a while, however, it is much worse. I think there is about as much glitching as there is playing even though I already increased the ring buffer to 50000 bytes. I also sometimes hear the audio 'catch up' (playing sped up) after having been cut out for a bit. I made a little video of it here: https://sendvid.com/nloezqcf. Is this expected? Is it just a matter of swapping in the WROVER (it is already underway) and enabling the PSRAM, or do you suspect something else is wrong. Maybe my wiring is bad, or am I missing some passive components? At the moment the project is just the esp32, tft, vs1053, a breadboard and dupont wires.

Lastly, I notice that the player.begin() loop almost always (but strangely enough not always) runs the full countdown without ever breaking early because player.begin() returns true. I notice no change in performance between the 'failed' initializing and the rare few times were true is returned and the countdown doesn't reach zero. Should player.begin() usually return true quickly? I notice, in the current upstream version, VS1053::begin() is a void function and the example code provided does no checking for success. Also, the next loop again has the structure for a countdown, but mp3StartCount is never actually decremented, not sure but that looks unintended.

Thanks again, sorry for the long post.

Bug during touch calibration data read

Whilst trying to figure out the format of the touch calibration data file I noticed a bug in file "tfthelpers.h" at line 40:

		uint16_t calData[5];
		if (f.readBytes((char *)calData, 14) == 14)

A 10 byte buffer (5 x 16-bit) is allocated, but then 14 bytes are being read into it. I'm not sure where the value 14 comes from as I assume 10 is the correct value.

Future Development

Hi Ralph,
I can see that you currently have a lot of ‘irons in the fire’ when it comes to subject matter for your channel, so I am wondering what plans (if any) you have for the WebRadio? Thanks to a lot of support from yourself I now have a working radio. I know that you have place holders within the project for possible tone controls and have mooted that maybe you would put some effort into handling http 1.1 and playlists (.pls). I can understand that you may have other priorities and if so would you consider publishing a few ‘notes’ that might allow those of us new to the code to pick up the mantle?

Simple Schematic Question

I would like to have a crack at building this web radio, but after having downloaded the latest repo I cant find the schematic diagram to work to. Have I missed it, or is it missing ? A link to it here would be great please. Thanks for your help (Ralph or anyone that has a copy of the schematic)

ESP32 log messages do not appear in Serial Monitor

Problem: ESP32 log messages from the log_n, log_d, etc., functions do not appear in the Serial Monitor
Environment: Arduino IDE
Hardware: ESP-WROOM-32 + ILI9341 + VS1053

I may be doing something wrong, but I could not get the logging messages from all the logging functions
(log_e, log_d, etc.) to appear in the Serial Monitor.

Is there something in the Arduino IDE to set to enable this logging by default? Perhaps the Platform.io environment sets something during the build process to enable logging.

I had to add the following to the very beginning of ESP32-WROVER_Web_Radio.ino file:

#ifdef CORE_DEBUG_LEVEL
#undef CORE_DEBUG_LEVEL
#endif

#define CORE_DEBUG_LEVEL 5
#define LOG_LOCAL_LEVEL ESP_LOG_DEBUG

After this, all the logging messages appeared on the Serial Monitor.

compile issue

hi
durring compilation had some errors how can I deal with it ?
Thanks indeed

In file included from C:\Users\user\AppData\Local\Temp\arduino_build_369445\sketch\main.h:40:0,
from C:\Users\user\Documents\Arduino\ESP32-WROVER_Web_Radio\ESP32-WROVER_Web_Radio.ino:2:
C:\Users\user\Documents\Arduino\libraries\TFT_eSPI/TFT_eSPI.h:368:25: error: 'TFT_WIDTH' was not declared in this scope
TFT_eSPI(int16_t _W = TFT_WIDTH, int16_t _H = TFT_HEIGHT);
^
C:\Users\user\Documents\Arduino\libraries\TFT_eSPI/TFT_eSPI.h:368:49: error: 'TFT_HEIGHT' was not declared in this scope
TFT_eSPI(int16_t _W = TFT_WIDTH, int16_t _H = TFT_HEIGHT);
^
In file included from C:\Users\user\Documents\Arduino\ESP32-WROVER_Web_Radio\ESP32-WROVER_Web_Radio.ino:2:0:
main.h:211:25: error: call to 'TFT_eSPI::TFT_eSPI(int16_t, int16_t)' uses the default argument for parameter 1, which is not yet defined
TFT_eSPI tft = TFT_eSPI();
^
main.h:211:25: error: call to 'TFT_eSPI::TFT_eSPI(int16_t, int16_t)' uses the default argument for parameter 2, which is not yet defined
In file included from C:\Users\user\Documents\Arduino\ESP32-WROVER_Web_Radio\ESP32-WROVER_Web_Radio.ino:3:0:
C:\Users\user\AppData\Local\Temp\arduino_build_369445\sketch\tftHelpers.h: In function 'void initDisplay()':
tftHelpers.h:78:9: error: 'class TFT_eSPI' has no member named 'setTouch'
tft.setTouch(calData);
^
C:\Users\user\AppData\Local\Temp\arduino_build_369445\sketch\tftHelpers.h: In function 'void setupDisplayModule(bool)':
tftHelpers.h:151:19: error: 'FreeSansBold12pt7b' was not declared in this scope
tft.setFreeFont(&FreeSansBold12pt7b);
^
C:\Users\user\AppData\Local\Temp\arduino_build_369445\sketch\tftHelpers.h: In function 'void drawStnChangeButton()':
tftHelpers.h:304:19: error: 'FreeSansBold12pt7b' was not declared in this scope
tft.setFreeFont(&FreeSansBold12pt7b);
^
C:\Users\user\AppData\Local\Temp\arduino_build_369445\sketch\tftHelpers.h: In function 'void drawPlusButton(bool)':
tftHelpers.h:351:19: error: 'FreeSansBold12pt7b' was not declared in this scope
tft.setFreeFont(&FreeSansBold12pt7b);
^
C:\Users\user\AppData\Local\Temp\arduino_build_369445\sketch\tftHelpers.h: In function 'void drawMinusButton(bool)':
tftHelpers.h:357:19: error: 'FreeSansBold12pt7b' was not declared in this scope
tft.setFreeFont(&FreeSansBold12pt7b);
^
C:\Users\user\AppData\Local\Temp\arduino_build_369445\sketch\tftHelpers.h: In function 'void drawBufferLevel(size_t, bool)':
tftHelpers.h:423:21: error: 'FreeSans9pt7b' was not declared in this scope
tft.setFreeFont(&FreeSans9pt7b);
^
C:\Users\user\AppData\Local\Temp\arduino_build_369445\sketch\tftHelpers.h: In function 'bool getStnChangeButtonPress()':
tftHelpers.h:436:24: error: 'class TFT_eSPI' has no member named 'getTouch'
boolean pressed = tft.getTouch(&t_x, &t_y, 50);
^
C:\Users\user\AppData\Local\Temp\arduino_build_369445\sketch\tftHelpers.h: In function 'void getPlusButtonPress()':
tftHelpers.h:472:25: error: 'class TFT_eSPI' has no member named 'getTouch'
boolean pressed = tft.getTouch(&t_x, &t_y);
^
C:\Users\user\AppData\Local\Temp\arduino_build_369445\sketch\tftHelpers.h: In function 'void getMinusButtonPress()':
tftHelpers.h:548:25: error: 'class TFT_eSPI' has no member named 'getTouch'
boolean pressed = tft.getTouch(&t_x, &t_y);
^
C:\Users\user\AppData\Local\Temp\arduino_build_369445\sketch\tftHelpers.h: In function 'void getSpkrButtonPress()':
tftHelpers.h:624:25: error: 'class TFT_eSPI' has no member named 'getTouch'
boolean pressed = tft.getTouch(&t_x, &t_y, 20);
^
C:\Users\user\AppData\Local\Temp\arduino_build_369445\sketch\tftHelpers.h: In function 'void getBulbButtonPress()':
tftHelpers.h:714:25: error: 'class TFT_eSPI' has no member named 'getTouch'
boolean pressed = tft.getTouch(&t_x, &t_y, 50);
^
C:\Users\user\AppData\Local\Temp\arduino_build_369445\sketch\tftHelpers.h: In function 'void displayStationName(std::__cxx11::string)':
tftHelpers.h:755:19: error: 'FreeSansOblique12pt7b' was not declared in this scope
tft.setFreeFont(&FreeSansOblique12pt7b);
^
C:\Users\user\AppData\Local\Temp\arduino_build_369445\sketch\tftHelpers.h: In function 'void displayTrackArtist(std::__cxx11::string)':
tftHelpers.h:819:19: error: 'FreeSans9pt7b' was not declared in this scope
tft.setFreeFont(&FreeSans9pt7b);
^
tftHelpers.h:830:20: error: 'FreeSans12pt7b' was not declared in this scope
tft.setFreeFont(&FreeSans12pt7b);
^
C:\Users\user\AppData\Local\Temp\arduino_build_369445\sketch\tftHelpers.h: In function 'void drawDummyPlusMinusButtons()':
tftHelpers.h:844:19: error: 'FreeSansBold12pt7b' was not declared in this scope
tft.setFreeFont(&FreeSansBold12pt7b);
^
In file included from C:\Users\user\Documents\Arduino\ESP32-WROVER_Web_Radio\ESP32-WROVER_Web_Radio.ino:6:0:
C:\Users\user\AppData\Local\Temp\arduino_build_369445\sketch\stationSelectHelper.h: In function 'void listStationsOnScreen(int)':
stationSelectHelper.h:147:20: error: 'FreeSans9pt7b' was not declared in this scope
tft.setFreeFont(&FreeSans9pt7b);
^
C:\Users\user\AppData\Local\Temp\arduino_build_369445\sketch\stationSelectHelper.h: In function 'void drawNextStationBtn(bool)':
stationSelectHelper.h:180:19: error: 'FreeSans9pt7b' was not declared in this scope
tft.setFreeFont(&FreeSans9pt7b);
^
C:\Users\user\AppData\Local\Temp\arduino_build_369445\sketch\stationSelectHelper.h: In function 'void drawPrevStationBtn(bool)':
stationSelectHelper.h:196:19: error: 'FreeSans9pt7b' was not declared in this scope
tft.setFreeFont(&FreeSans9pt7b);
^
C:\Users\user\AppData\Local\Temp\arduino_build_369445\sketch\stationSelectHelper.h: In function 'void drawStationCancelButton()':
stationSelectHelper.h:212:19: error: 'FreeSansBold9pt7b' was not declared in this scope
tft.setFreeFont(&FreeSansBold9pt7b);
^
C:\Users\user\AppData\Local\Temp\arduino_build_369445\sketch\stationSelectHelper.h: In function 'void stationNextPrevButtonPressed()':
stationSelectHelper.h:233:22: error: 'class TFT_eSPI' has no member named 'getTouch'
bool pressed = tft.getTouch(&x, &y, 30);
^
C:\Users\user\AppData\Local\Temp\arduino_build_369445\sketch\stationSelectHelper.h: In function 'int getStationListPress()':
stationSelectHelper.h:314:22: error: 'class TFT_eSPI' has no member named 'getTouch'
bool pressed = tft.getTouch(&x, &y, 30);
^
C:\Users\user\Documents\Arduino\ESP32-WROVER_Web_Radio\ESP32-WROVER_Web_Radio.ino: In function 'void setup()':
ESP32-WROVER_Web_Radio:80:24: error: could not convert 'player.VS1053::begin()' from 'void' to 'bool'
} while (!player.begin() && mp3StartCount > 0);
^
ESP32-WROVER_Web_Radio:80:25: error: in argument to unary !
} while (!player.begin() && mp3StartCount > 0);
^
ESP32-WROVER_Web_Radio:115:25: error: invalid conversion from 'uint16_t {aka short unsigned int}' to 'uint8_t* {aka unsigned char*}' [-fpermissive]
player.setTone(SCI_BASS);
^
In file included from C:\Users\user\AppData\Local\Temp\arduino_build_369445\sketch\main.h:29:0,
from C:\Users\user\Documents\Arduino\ESP32-WROVER_Web_Radio\ESP32-WROVER_Web_Radio.ino:2:
C:\Users\user\Documents\Arduino\libraries\ESP_VS1053_Library-master\src/VS1053.h:136:10: note: initializing argument 1 of 'void VS1053::setTone(uint8_t*)'
void setTone(uint8_t *rtone);
^
ESP32-WROVER_Web_Radio:208:16: error: 'TFT_BL' was not declared in this scope
ledcAttachPin(TFT_BL, 0);

Some stations give no sound

Hello Ralph,

Thank you for this great project. I already build an ESP32 radio but without touch screen and without buffer. I learned a lot from that project (originally I am a hardware guy) but your design is next level. It gave me a lot of learning moments the last weeks and now the radio is working and I am very happy. To learn even more I will modify things, like more than one AP to be selected automatically or on screen and truncating the music title because it now sometimes is printed over the buttons.
But one thing is very important and I don't know what to do: Some radio stations can be contacted, deliver meta data and I can see the bytes are streaming in. But no sound is heard and the buffer remains empty. Selecting the same station on my "old" radio produces music so the station is sending. The difference with working stations is that the logging of the stream is continuing endless and in portions of 2 to max 28 b, while the working stations after some time produce 32b continiously and stop logging because the buffer is full. Can you give me some direction how to get these stations working? The one I like most for the moment is: 208.92.53.98,3690,"/SRGSTR25AAC_SC","Classic FM Chill Out",1
Thank you in advance, Hans.

Programm too big; continiously rebooting

Hello Ralph,
Thank you for your swift action to convert version 1.35. Unfortunately it did not succeed here up till now.
Because I was working on some older programs I had to replace some files before the compilation id work (cbuf, VS1053)
I also changed the playlist and wifi secrets for my own data.
Then the compilation succeeded but a failure notice poped up the the program was too big for memory.
I put the debug mode to none and that helped somewhat but I had to remove the ToDo.h to get it small enough.
After the upload the processor continiously rebooted.
I have to prepair for tomorrow now and tomorrow I have no time at all so I will continue looking for a solution on Friday and the weekend. If you have a suggestion in the mean time that will be welcome.
Kind Regards, Hans

reboot data_V1.35- 20210721.txt
settings 1 35

Using PlatformIO with the Code from this github

I am attempting to get to grips with platformio. I have successfully compiled and loaded to a TTGO T8 a blink sketch. But so far no luck with the Web Radio Sketch.

In the Sketch folder you have a README.md file that states:

For PlatformIO

This is the complete project, you know what to do to include it into your workspace. (Note, you may need to edit your workspace folder at the same level as your Project's folder) to something like this:

"folders": [
		{
			"name": "ESP32 Better Internet Radio",
			"path": "Projects\\ESP32 Better Internet Radio"
		}
	],

It will then appear in PlatformIO's workspace list of projects.

When I attempt to compile it throws up a number of ‘include’ errors and I suspect it may be something to do with ‘levels’ Can you explain what you mean by the above please?
Maybe I need to get up to speed with vcpkg package manager?

Editing the Station List

I am attempting to edit the contents of stationList loaded in LittleFS. I have added an extra line at the end as follows:

internet-radio.com,80,/station/xrds,XRDS.fm Clarksdale,0

This is picked up on the screen but there is no sound only the message “Connected. Reading stream...”

The info comes from the internet-radio web page. I have guessed at the port number because so far I haven't found it specified anywhere.

Have others found a process for adding new stations that has better success?

"stream.antenne1.de",80,"/a1stg/livestream1.aac","Antenne1.de","1" "bbcmedia.ic.llnwd.net","80","/stream/bbcmedia_radio4fm_mf_q","BBC Radio 4",0 "stream.antenne1.de",80,"/a1stg/livestream2.mp3","Antenne1 128k",1 "listen.181fm.com",80,"/181-beatles_128k.mp3","Beatles 128k",1 "stream-mz.planetradio.co.uk",80,"/magicmellow.mp3","Mellow Magic (Redirected)",1 "edge-bauermz-03-gos2.sharp-stream.com",80,"/net2national.mp3","Greatest Hits 112k (National)",1 "airspectrum.cdnstream1.com",8024,"/1302_192","Mowtown Magic Oldies",1 "live-bauer-mz.sharp-stream.com",80,"/magicmellow.aac","Mellow Magic (48k AAC)",1 "stream.btsstream.com",8000,"/seaac","South East Radio (AAC 64k)",1 "uk2.internet-radio.com",8024,"/",UK Dance Radio,1 "us4.internet-radio.com",8197,"/stream?type=http&nocache=72","EZ Hits South FLA",0 s1.slotex.pl,7274,"/",Radio Kehlkopf,0 204.187.100.18,1485,"/",De Natchegaal,1 "live-bauer-mz.sharp-stream.com",80,"/net2lincoln.aac",Greatest Hits (Lincoln),1 ais-edge09-live365-dal02.cdnstream.com,80,/a52107?listenerId=esAdblock0650048,Heckington Community Radio,1 live-bauer-mz.sharp-stream.com,80,/net1lincoln.aac,Radio Lincs FM,1 internet-radio.com,80,/station/xrds,XRDS.fm Clarksdale,0

Static Issues

"At this point I'd suspect that you are zapping the devices with static electricity. If they are all connected up via the USB socket (but with the switch set to OFF, so the main unit is not powered via it) then they are grounded. If you then switch them on and off via a wall wart (mains switch, don't keep unplugging them) they should last. It's too easy to zap devices with static (thankfully rare, though) so try the above of keeping them connected to a GND point. And don't physically touch them!"

The first of my replacement ESP32 has arrived and has been flashed OK.
Exactly what switch are you referring to above?

In the future I shall treat the board with a little more respect and be less cavalier with my static precautions.

But, your suggestion has got me thinking (always dangerous). In my setup, power reaches the WebRadio by two routes:
1. Via USB connected to my PC, usually only when flashing, but sometimes concurrent with -
2. Bench PSU (Tenma 72-2690) to a barrel jack connected to the main PCB +5V.

However, I don’t currently strap the PSU negative to GND, so I wonder is it possible that allowing this to float combined with the USB derived power could result in excessive voltage?
I’m not very o fay with this subject, but my limited research would suggest that this is at least theoretically possible?

Station List Text File Format

Hi Ralph,
I am attempting to add extra stations to the ‘stationList.txt’ file. I have been trying unsuccessfully to ascertain the correct format for each line. I’m sure you have explained the technique somewhere in the past, but searching all the Web Radio videos and your github have so far yielded a blank. Can you offer a pointer please?

Incorporating PSRAM

I downloaded the latest version and straight off the bat it works fine. However when I attempt to incorporate PSRAM with the new cbuf.cpp code the following two results are manifest.

   With PSRAM enabled and the new version of cbuf.cpp
   Serial monitor output:

Rebooting...
ets Jun 8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1216
ho 0 tail 12 room 4
load:0x40078000,len:9720
ho 0 tail 12 room 4
load:0x40080400,len:6352
entry 0x400806b8
[E][ESP32-WROVER_Web_Radio.ino:27] setup(): Version v1.210126_29 - 2021-01-26 10:39:16.425885
Guru Meditation Error: Core 0 panic'ed (LoadProhibited). Exception was unhandled.
Core 0 register dump:
PC : 0x40165225 PS : 0x00060030 A0 : 0x80167e40 A1 : 0x3ffaf330
A2 : 0xfffffffd A3 : 0x0000001f A4 : 0x00000034 A5 : 0x00000000
A6 : 0x00000000 A7 : 0x00000000 A8 : 0x3f401670 A9 : 0x00000000
A10 : 0x00000000 A11 : 0x00000000 A12 : 0x00000000 A13 : 0x00000001
A14 : 0x00060420 A15 : 0x00000000 SAR : 0x00000010 EXCCAUSE: 0x0000001c
EXCVADDR: 0xfffffffd LBEG : 0x4000c2e0 LEND : 0x4000c2f6 LCOUNT : 0xffffffff

Backtrace: 0x40165225:0x3ffaf330 0x40167e3d:0x3ffaf350 0x40092047:0x3ffaf370 0x40093508:0x3ffaf3a0 0x400912ab:0x3ffaf3d0 0x4009331d:0x3ffaf470 0x4008c905:0x3ffaf4b0

       With PSRAM disabled and the new version of cbuf.cpp:

Arduino: 1.8.13 (Windows 10), Board: "ESP32 Dev Module, Disabled, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), 240MHz (WiFi/BT), QIO, 80MHz, 4MB (32Mb), 921600, None"

C:\Users\Tadder\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\cores\esp32\cbuf.cpp: In member function 'size_t cbuf::resize(size_t)':

C:\Users\Tadder\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\cores\esp32\cbuf.cpp:59:6: error: 'BOARD_HAS_PSRAM' was not declared in this scope

if (BOARD_HAS_PSRAM)

  ^

Multiple libraries were found for "User_Setup.h"

Used: C:\Users\Tadder\Documents\Arduino\libraries\TFTTFT_eSPI-2.2.23

Not used: C:\Users\Tadder\Documents\Arduino\libraries\TFT_eSPI-2.2.23

Multiple libraries were found for "ArduinoLog.h"

Used: C:\Users\Tadder\Documents\Arduino\libraries\ArduinoArduinoLog

Not used: C:\Users\Tadder\Documents\Arduino\libraries\Arduino-Log

Multiple libraries were found for "VS1053.h"

Used: C:\Users\Tadder\Documents\Arduino\libraries\ESP_VS1053_Library

Not used: C:\Users\Tadder\Documents\Arduino\libraries\ESPESP_VS1053_Library

exit status 1

Error compiling for board ESP32 Dev Module.

Touch screen problems

Hello Ralph
I have just built your excellent radio and most items are working well except for the touch screen. It is the same screen that you used only slightly smaller at 2.4".
The display is perfect but the touch positions don't match. The +,-, Bulb icons can be changed by touching a corresponding position at the top of the screen.
I tried rotating the screen which worked for the background but the button icons stayed in their original positions.
I reverted to original then I ran the touch screen calibration and got " uint16_t calData[5] = [374, 3538, 318, 3518, 3]".
I then substituted this in the folder "TouchCalData1.txt" but still no change.
I am now at a loss as to what to try next. Maybe you could advise

Mistake. What's wrong?

Arduino: 1.8.19 (Windows 10), Board:"ESP32 Wraver Module, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), QIO, 80MHz, 921600, None, Disabled"

C:\Users\Nestor\Documents\Arduino\libraries\LITTLEFS-master\src\LITTLEFS.cpp: In member function 'virtual bool LITTLEFSImpl::exists(const char*)':
C:\Users\Nestor\Documents\Arduino\libraries\LITTLEFS-master\src\LITTLEFS.cpp:44:28: error: no matching function for call to 'LITTLEFSImpl::open(const char*&, const char [2])'
File f = open(path, "r");
^
In file included from C:\Users\Nestor\Documents\Arduino\libraries\LITTLEFS-master\src\LITTLEFS.cpp:17:
C:\Users\Nestor\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.5\libraries\FS\src/vfs_api.h:38:17: note: candidate: 'virtual fs::FileImplPtr VFSImpl::open(const char*, const char*, bool)'
FileImplPtr open(const char* path, const char* mode, const bool create) override;
^~~~
C:\Users\Nestor\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.5\libraries\FS\src/vfs_api.h:38:17: note: candidate expects 3 arguments, 2 provided
Several libraries found for "Preferences.h"
Is used by: C:\Users\Nestor\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.5\libraries\Preferences
Not used: C:\Users\Nestor\Documents\Arduino\libraries\Preferences-2.0.0
Several libraries found for "WiFi.h"
Is used by: C:\Users\Nestor\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.5\libraries\WiFi
Not used: C:\Program Files (x86)\Arduino\libraries\WiFi
exit status 1
Compilation error for the ESP32 Wrover Module board.

Loop logging TFT Calibration Data

Problem: Infinite for loop while logging TFT Calibration Data

Environment: Arduino IDE
Hardware: ESP-WROOM-32 + ILI9341 + VS1053

See file tftHelpers.h, near line 47 and 72:

// There are 10 bytes (5 integers @ 2 bytes each) for TFT calibration
#define totCalibrationBytes 10
.
.
.
// Buffer (integer 2 bytes * 5) to hold calibration data
uint16_t calData[5];

// On calibration, 14 bytes were written. TODO: why?
//if (f.readBytes((char *)calData, 14) == 14)
if (f.readBytes((char *)calData, totCalibrationBytes) == totCalibrationBytes)
	tft.setTouch(calData);

log_v("TFT Calibration data:");
for (auto cnt = 0; cnt < totCalibrationBytes; cnt++)
{
	log_v("%04X, ", calData[cnt]);
}

f.close();
log_i("Touch Calibration completed");

Notice that calData[5] array only has 5 elements, but the for loop will
end after "totCalibrationBytes" (10+1 for 0 start) loops. The reference to calData[cnt]
refers to uint16_t (2 bytes), so the loop only needs to execute 5 times.

17:42:51.245 -> [E][ESP32-WROVER_Web_Radio.ino:34] setup(): Version v1.210123_19 - 2021-01-23 14:29:43.815057
17:42:51.292 -> [D][ESP32-WROVER_Web_Radio.ino:42] setup(): Total heap: 331196
17:42:51.292 -> [D][ESP32-WROVER_Web_Radio.ino:43] setup(): Free heap: 294856
17:42:51.292 -> [D][ESP32-WROVER_Web_Radio.ino:44] setup(): Total PSRAM: 0
17:42:51.292 -> [D][ESP32-WROVER_Web_Radio.ino:45] setup(): Free PSRAM: 0
17:42:51.292 -> [D][ESP32-WROVER_Web_Radio.ino:46] setup(): Used PSRAM: 0
17:42:51.292 -> [D][ESP32-WROVER_Web_Radio.ino:55] setup(): Starting SPI
17:42:51.292 -> [D][ESP32-WROVER_Web_Radio.ino:59] setup(): Free memory: 294732 bytes
17:42:51.292 -> [I][ESP32-WROVER_Web_Radio.ino:70] setup(): LITTLEFS system mounted SUCCESSFUL.
17:42:51.339 -> [V][tftHelpers.h:80] initDisplay(): TFT Calibration data:
17:42:51.339 -> [V][tftHelpers.h:84] initDisplay(): 0183, 
17:42:53.324 -> [V][tftHelpers.h:84] initDisplay(): 0D96, 
17:42:55.340 -> [V][tftHelpers.h:84] initDisplay(): 00FA, 
17:42:57.320 -> [V][tftHelpers.h:84] initDisplay(): 0D86, 
17:42:59.306 -> [V][tftHelpers.h:84] initDisplay(): 0007, 
17:43:01.307 -> [V][tftHelpers.h:84] initDisplay(): 7304, 
17:43:03.336 -> [V][tftHelpers.h:84] initDisplay(): 3F40, 
17:43:05.320 -> [V][tftHelpers.h:84] initDisplay(): 0000, 
17:43:07.337 -> [V][tftHelpers.h:84] initDisplay(): 0000, 
17:43:09.315 -> [V][tftHelpers.h:84] initDisplay(): 0000, 
17:43:11.298 -> [V][tftHelpers.h:84] initDisplay(): 0000, 
17:43:13.329 -> [V][tftHelpers.h:84] initDisplay(): 0000, 
17:43:15.313 -> [V][tftHelpers.h:84] initDisplay(): 0000, 
17:43:17.334 -> [V][tftHelpers.h:84] initDisplay(): 8CE4, 
17:43:19.305 -> [V][tftHelpers.h:84] initDisplay(): 3FFB, 
17:43:21.333 -> [V][tftHelpers.h:84] initDisplay(): 8C34, 
17:43:23.320 -> [V][tftHelpers.h:84] initDisplay(): 3FFB, 
17:43:25.343 -> [V][tftHelpers.h:84] initDisplay(): 1EE0, 
17:43:27.324 -> [V][tftHelpers.h:84] initDisplay(): 3FFB, 
17:43:29.339 -> [V][tftHelpers.h:84] initDisplay(): 1EC0, 
.
.
.
.

Changing the for loop code to:

for (int cnt = 0; cnt <= 4; cnt++)
{
   log_v("%04X, ", calData[cnt]);
}

results in:

17:46:27.370 -> [I][ESP32-WROVER_Web_Radio.ino:70] setup(): LITTLEFS system mounted SUCCESSFUL.
17:46:27.418 -> [V][tftHelpers.h:80] initDisplay(): TFT Calibration data:
17:46:27.418 -> [V][tftHelpers.h:91] initDisplay(): 0183, 
17:46:27.418 -> [V][tftHelpers.h:91] initDisplay(): 0D96, 
17:46:27.418 -> [V][tftHelpers.h:91] initDisplay(): 00FA, 
17:46:27.418 -> [V][tftHelpers.h:91] initDisplay(): 0D86, 
17:46:27.418 -> [V][tftHelpers.h:91] initDisplay(): 0007, 
17:46:27.418 -> [I][tftHelpers.h:95] initDisplay(): Touch Calibration completed

I have no idea why it loops, but certainly referring to elements beyond array
size is an error. Also, can't help with the 10 bytes vs 14 bytes question.

Also, I have the same problem with this code found in the utility program that
writes the /TouchCalData1.txt file to the LITTLEFS.

Serial.println("Calibration data (14 integers of two bytes each):");
for (int cnt = 0; cnt < 14; cnt++)
{
	Serial.printf("%d. ", cnt);
	Serial.printf("%04X\n", calData[cnt]);
}

Ralph, I don't remember where I got the utility code to write the
TouchCalData1.txt file, but I think I may have gotten it from your comments
somewhere. I couldn't find it on your Github (which would have helped with
may confusion as to how to create the file.)

The project is great. I have your PCBs ready and I'm just waiting for my
TTGO T8 v1.7 to arrive.

PSRAM

Circular (Ring) Buffer

As suggested before my ESP32 went to the PCB bin in the sky, I have carried out a new implementation of the Arduino IDE (1.8.13) on my laptop. I have downloaded the alternative version of “cbuf.cpp” from the Circular Buffer section in github (205-Internet-Radio) and this I have placed in:
C:\Users\Tadder\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\cores\esp32

I confirm that the CIRCULARBUFFERSIZE is set at 10,000

As can be seen from the following output PSRAM is enabled, but Used PSRAM still reports 0.
Any further thoughts?

ets Jun 8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1216
ho 0 tail 12 room 4
load:0x40078000,len:9720
ho 0 tail 12 room 4
load:0x40080400,len:6352
entry 0x400806b8
[D][esp32-hal-psram.c:47] psramInit(): PSRAM enabled
[E][ESP32-WROVER_Web_Radio.ino:27] setup(): Version v1.210126_29 - 2021-01-26 10:39:16.425885
[D][ESP32-WROVER_Web_Radio.ino:35] setup(): Total heap: 321172
[D][ESP32-WROVER_Web_Radio.ino:36] setup(): Free heap: 285232
[D][ESP32-WROVER_Web_Radio.ino:37] setup(): Total PSRAM: 4194252
[D][ESP32-WROVER_Web_Radio.ino:38] setup(): Free PSRAM: 4194252
[D][ESP32-WROVER_Web_Radio.ino:39] setup(): Used PSRAM: 0
[D][ESP32-WROVER_Web_Radio.ino:47] setup(): Starting SPI
[D][ESP32-WROVER_Web_Radio.ino:51] setup(): Free memory: 285108 bytes
[I][ESP32-WROVER_Web_Radio.ino:62] setup(): LITTLEFS system mounted SUCCESSFUL.
[V][tftHelpers.h:80] initDisplay(): TFT Calibration data:
[V][tftHelpers.h:83] initDisplay(): 0179,
[V][tftHelpers.h:83] initDisplay(): 0DD2,
[I][tftHelpers.h:87] initDisplay(): Touch Calibration completed
[V][bitmapHelper.h:74] drawBmp(): Loaded in 6l ms
[V][bitmapHelper.h:74] drawBmp(): Loaded in 9l ms
[V][bitmapHelper.h:74] drawBmp(): Loaded in 9l ms
[I][tftHelpers.h:206] setupDisplayModule(): TFT Initialised
[D][ESP32-WROVER_Web_Radio.ino:70] setup(): Starting player
[V][tftHelpers.h:809] displayTrackArtist(): No delimiter found - using default value
[D][ESP32-WROVER_Web_Radio.ino:86] setup(): Waiting for VS1053 initialisation to complete.
[V][tftHelpers.h:809] displayTrackArtist(): No delimiter found - using default value
[D][ESP32-WROVER_Web_Radio.ino:97] setup(): Switch player to MP3 mode
[V][tftHelpers.h:809] displayTrackArtist(): No delimiter found - using default value

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.