the spider's web is so spontaneously woven.... and with the rest you laugh but most importantly it works!!! And thanks to you colleagues @Majster XXL and @robgold!
Thanks to you, I discovered that when doing a card read, I did not set the action when the station and bank file were missing.
As a result, the variable bank_nr took the value 0 and such a bank does not exist on the server and therefore you did not want to download it.
On the other hand, when you turned the encoder, you set the bank_nr variable to a range of 1-15 and it worked.
@robgold. I uploaded the sketch from your GitHub, everything was fine, uploaded to esp but I have a problem with connecting to wifi manager, ESP Internet Radio network appears, it seems to connect but I can not display the wifi manager configuration page, maybe you have an idea how to solve this, or maybe where to hardcode the SSID and password of my network. Unless, in fact, these plates of mine from China are defective only that earlier on the original sketch from a colleague MAJSTER XXL configuration page appeared.
Greetings super job you are doing.
I have this one case with the ESP. When inserted into the contact board it loses WiFi completely. I have to lift the metal cover off it and see with a microscope what is happening there. Putting a finger to the antenna helps but this is not a solution .
find the line in the code:
wifiManager.setConfigPortalBlocking(false); and markup-> //wifiManager.setConfigPortalBlocking(false);
On this code, however, I was testing a lot of things...eh.
Fantastic project ! Respect for your passion and great coding.
As a potential follower of the project..... I struggled a lot of time and failed to compile this sketch.... Arduino ide kept finding some problems mainly with libraries and then with variables.....But I think it's the libraries after all. I can't seem to clean them up and upload the ones I need..... Instead, I managed to compile the ESP32-MiniWebRadio project by schreibfaul1.
My heart is beating for this project - but I would really like to know - would it be possible to add an SPDIF output to this project ? Is this difficult and doable ?
https://github.com/Edzelf/ESP32Radio-V2/tree/main - here is spdif - but here I cannot get my TFT (3.5'' ST7796S) to display anything. Through a browser everything works but without a screen it's so-so.....
Thanks in advance for your answer and maybe also for help with the compilation.....
PS - I uploaded the .bin of my colleague @hevet - but without a display (I have a 480x320 tft) nothing was displayed to me....
gangliu2018 - after your advice with the libraries (on the 7th page of this thread), I received the same error when compiling !
Compilation error
In the file attached with \ESP32_radio_player-main\ESP32_radio_player.ino:7:
c:c:\nDocumentsArduino_braries/Adafruit_SH110X/Adafruit_SH110X.h:27:10: fatal error: Adafruit_GrayOLED.h: No such file or directory
27 | #include <Adafruit_GrayOLED.h>
| ^~~~~~~~~~~~~~~~~~~~~~
compilation complete.
exit status 1
After updating the libraries - mainly Adafriut GXF - the errors have already rained so many that I just give up. What am I doing wrong?
Would it be possible to include on Github all the libraries at which this can be compiled ? My request is to the Founder of the thread or other users of this project. Thanks in advance.
As I understand, you are trying to run the v1 version. And do you have the Ada library installed for the SH110x ?
Alternatively, drop the library into the folder where Arduino keeps the libraries.
C:YOUR USER NAME IN WINDOWSAppDataLocalArduino15 libraries_radio_playerAdafruit_SH110X
For version v2 you don't need support for the SH110x display at all because it's not there. It has been replaced by the u8g2 library for the SSD controller.
I tried compiling all versions. Yours, Author's first and second. 3 hours ago all the libraries for V2 appeared on Author's Github.
Did not help either....
Least of the bugs are from version 1 no grey oled driver.
2 versions of Arduino IDE 1.8.19 and 2.3.4
and just now in the Arduino WEB Cloud.
this compiler gave very few errors (I think.....)
In file included from /var/run/arduino/directories-user/libraries/Audio_-_Adafruit_Fork/analyze_fft256.h:31,
from /var/run/arduino/directories-user/libraries/Audio_-_Adafruit_Fork/Audio.h:66,
from /run/arduino/sketches/ESP32_radio_v2/ESP32_radio_v2.ino:2:
/var/run/arduino/directories-user/libraries/Audio_-_Adafruit_Fork/AudioStream.h:71:10: fatal error: kinetis.h: No such file or directory
#include "kinetis.h"
^~~~~~~~~~~
compilation terminated.
I have a request to @robgold I have a problem with the SPI library it throws up that there is no VSPI declared.
Could you please upload the bin file?
Greetings
It looks like I'll have to work out the instructions from scratch, starting with a new installation of the Arduino IDE, installing the necessary libraries in various ways (either directly from the Arduino IDE or externally downloaded from zip files), installing tools from Espressif to support modules from that manufacturer in the Arduino IDE environment, etc.....
Yesterday I uploaded a bill of materials with a rough estimate of parts to build the v2 version.
I've also added a new ESP32_radio_v2.ino file for testing, which brings some minor fixes to earlier bugs.
I'm thinking of removing the Wifi Manager in exchange for just typing the network name and password in the code, then each user would have to watch this before uploading the software to the ESP32 module. The question is what do you think of this?
As for the Toslink or Coaxial digital outputs, you could try installing a suitable I2S --> SPDIF converter instead of the PCM5102A DAC, e.g. according to google a WM8805 type module will handle this. I can't 100% guarantee that it will work correctly, but I think it will work without changing the software.
@robgold The radio works, I dealt with the SPI library.
Then I had trouble with the SD card, but.... I did some reading and scrolled through githab (sarunia) where I came across a breakdown of connecting the card under ESP.
The card writes as well as plays.
.
Thanks again for the great contribution on your part to this work.
@and32jar great, may it serve! With me in the program since a few days came joystick support, because I don't have anything cool for quick directional switching with the middle button. I have updated the schematic, so that it is clear how to connect this joystick, the file is attached below, it is also swapped on my github profile:
https://github.com/sarunia/ESP32_radio_player_v2
I also have the bulk without the case everything for now:
@Andrzej Ch. agrees, the joystick works on an analogue input, which complicates the operating code to act like a simulator for such a regular directional switch. I've seen that button from your photo but its mounting on the front panel of the case will be a hassle, hard to find something sensible that isn't also the size of a regular tact switch, I was still looking at a membrane keyboard like that, it has an interesting button layout and all of them could actually be used but it's horribly expensive:
I don't think mounting this type of pushbutton on the front panel from the post #21383807 would be troublesome. This is a boardless version, just make holes in the case for the microswitches and solder them inside the case. The panel should cover the microswitches so it should be aesthetically pleasing at the same time. It seems to me that it will be worse with the implementation of the joystick on the front panel. I have such a joystick somewhere, so I'll see what I can do with it.
For those who don't need a file player but just want a radio. I made a version "ESP32 Radio evo3JustRadio" .
- operating everything with one encoder
turning -> changing the station
press -> adjust volume
long press -> change of bank
extra long pressing -> now switching on VU indicators - information about the selected bank and station at the bottom of the screen (between "mp3" and clock)
- scrolling function for station descriptions
If the song title, the so-called "stream title", fits within 42 characters (one line) it remains stationary, if it does not, it starts scrolling pixel by pixel.
This required a lot of rebuilding of the functions and how the clock reading, displayRadio, displayRadioScroller(), vuMeter() functions are implemented.
- I improved the operation of the WiFi manager. Now we get correct information on the display when there is no connection and the ESP Radio portal works CORRECTLY.
For the "v3 Just Radio" version you basically only need one encoder, power switch, SD/microSD card reader and display to have a radio.
If you want a player you have to add a second encoder. The player code is still there although I don't know how long I will keep it there. Or maybe I can keep one version. We'll see. Everything is basically up and running now, I'm cleaning up and putting in the code functions. In a few days the ino file on GitHub.
@Majster XXL I wouldn't remove that WiFi Manager, because that way the device can be taken anywhere and connected to the network without compiling the code. Alternatively, you could make a wifi file on the card where ESP reads the SSID and Passwd, but this is not very safe, but at home it should not be dangerous.
In development:
- Keypad for direct switching of previously saved stations/banks (P1 - P10).
Needed when adapting a radio module to an existing radio case.
- Equaliser
- Control via web
I can't decide which screen "layout" to leave. I currently keep the one without the "Net Radio" inscription at the top because the VU indicators look nice and it's a shame to throw them away .
As for the enclosure, a Hammond 1455R1601 enclosure freshly imported from Germany arrived today.
Yes this is no joke. On TME is or in local shops is much more expensive than to buy in a mail order shop in Germany.
In addition, I am already finishing the design of the housing for printing. I am waiting for the packages with a few small details to measure.
The up-down-right-left arrow buttons I also ordered on Ali for 12zl - will be for testing.
https://pl.aliexpress.com/item/1005001594194930.html @Majster XXL in terms of assembly, hole-punch the cheapest and gently and you have a perfect cut-out for such a navigation button.
Anything round is easiest to mount.
>>21384185 Interesting choc requires a phone on the same network and installation on the phone of something. Will definitely test on one ESP and see how it "lives" with it
The most important thing for me personally is to make the project accessible to everyone, easy to use, cheap to maintain. Or maybe one of us will give such a radio to an aunt, grandmother, family. I would like normal people without a compiler to be able to "grasp" it.
>>21382796 Failed - I have a mac. It's also lime on windows. But is it really necessary - almost 2 GB of data. Isn't the tile library from Espressif enough? Still a complete failure - another 2 computers not previously contaminated with Arduino..... and red after trying to compile. Same with the Yoradio project. Only under PlatformIO did I manage to compile 2 proeject radios.... Evidently no luck for me.
I've seen this button from your photo, but mounting it on the front panel of the case will be cumbersome
.
And why would that be?
Honestly, I would prefer such combined buttons instead of this membrane keyboard.
robgold wrote:
@Majster XXL I wouldn't remove that WiFi Manager, because that way the device can be taken anywhere and connected to the network without compiling code.
Personally, I have a similar opinion. I would go more in the direction of being able to save several networks so that the device can be used in several places.
wirbud wrote:
The same with the Yoradio project.
The yoRadio project will not compile on Arduino 2.x, it requires the older version 1.8.x. Also, you need to add something there, as stated in the project description.
(Personally, I have even done some customisation of this project.)
@tytka - Project compiles and on version 2.3.2 . Version 1.8.x only needed to upload "data" files.
Heard something there, but.
I mean the version of the esp32 board (board manager ) not higher than 3.x.x
I have made several versions of yoradio, on ESP32A1, s3 N16R8, with LCD 4002 as well as ili9488.
Edit: what they write is not always valid, read on githab what others write.
This project is awesome, but from what I've read it will be even cooler with 4x3 keyboard control - then I'm sure I'll incorporate such a wonder into an old radio.
@and32jar I took the information about the Arduino version supported by the yoRadio project from the project website:
.
I have also fired up this project, not only on the ESP32-C3, but also on the ESP32-S3 N16R8 and with various displays. (LCD1602, SH1106, SSD1306, ILI9341, ST7789). I even added support for the LCD2002, which the project does not normally support.
@robgold What do you think about inserting a function in the menu of our radio to find WiFi networks with an indication of the signal level and throw this into a scrolling list like a list of radio stations, you could sort WiFi networks by signal strength, select the correct network, enter its password using the direction button with all characters scrolled, save the network and its password to the SD card. Then you could free up some resources for the ESP32 module by removing WiFi Manager, and you could have many WiFi networks saved on the SD card. Searching for a network and saving it with a password only on first radio start-up or if a previously saved network is not found. All this to avoid using the phone to do the initial network configuration.
Regarding the security of the saved password for each network, the mac address of the ESP32 module can be added to the password as an encryption method.
@MAJSTER XXL When you save data on an SD card (station list / potentially wifi list), when this card is inserted into the PC, can these files be viewed normally?
If so, it would be better not to save the wifi password there, but whatever you want.
Maybe it would be possible to save the password in the eeprom (if there is one), or in the flash (if it is possible to save something there in run-time).
@Majster XXL and @robgold Any hints on how you write your list?
I made my list today i.e. replaced one bank and it is ok, but......
in the station name further down you see the letters Ba(nk ...) - the Bank comes in.
Likewise the ordering is not nice when selecting a station from the list . (SSD1322 display)
The second question, the banks and stations are captured from the githab and then saved to the SD where, when switched on again, it already sucks from the SD.
Is it possible to bypass this so that, for example, it is still sucking from githaba?
How do I disable the reading of stations from SD?
@Damian_Max all files stored on the SD card are normally visible on the PC.
@and32jar show some picture of what you mean, because I don't really understand. Some time ago I limited the size of the array where I originally kept the entire contents of one bank, then I did a write every bank change of the entire contents of that bank to the SD card. If you care about stations not being read from the SD card, then you would have to go back to my earlier version, which still had quite a few shortcomings, the radio should work fine:
https://github.com/sarunia/ESP32_radio_player...mmit/5ab371885e9373241dd3a8c6ad0f2ecd7505c6db
The construction of the TXT file or as in the case of MajstraXXL without extension with Banks assumes the format:
Station name [26 characters] - no matter how long the station name is there must be 26 characters ie: RMF FM + 20 spaces
Next comes the name of the Bank and the Station. This is completely unnecessary in the playback process and only allows the Bank and Station to be displayed in the station list.
This is all in a FIXED font width.
If for any reason the length of this line changes, the system will read out the next character and e.g. "RMF FM B" will appear.
@MAJSTER XXL assumes, in its code, that the display always shows only 42 characters per line and does not limit its length.
In my case, because I use a large font and in addition I wanted to be independent of the font width, the station name can be 26 characters long (now even 23 in evo3). In order to avoid the situation of the name "Bank" being dragged into the station name, I introduced trimming of this string:
u8g2.setFont(u8g2_font_fub14_tf);
stationName = stationName.substring(0, 22); // the value 22 represents how many letters we cut from 0 to 22 letters from the station name.
u8g2.drawStr(0, 16, stationName.c_str()); .
The file on my GitHub contains 26 more characters:
Example line from the Station Bank: RMF FM____________________Bank_1_Stacja_3___http://195.150.20.7/rmf_fm
I have replaced the spaces with "_" because otherwise Elektroda will truncate the spaces and you won't be able to see what's going on.
Whichever version of the software you are using you can enter this.
The whole operation takes place at the beginning of the function: void displayRadio() .
When it comes to updating the banks:
I've introduced such a feature so that whenever a file exists on a card it doesn't get overwritten - that way in the future everyone can have e.g.: Bank1 with their favourite stations and read the rest from any GitHub or other server. If you want to disable the SD card read function completely then find and lock the line:
readSDStations(); -> // readSDStations(); .
Eventually there will be an option in the menu which bank to update and which to only read from the SD card.
@Damian_Max All files are kept in the FAT standard that is normally visible on the PC.
Currently the WiFi manager, when given the SSID and PASSWD, saves them to the internal flash memory.
The safest thing would be to have the access file on the SD card, if the system finds such a file, it saves them in the ESP flash and deletes such a file.
This is an option for the future to get rid of the WiFi manager. I run it in such a way that if there is no connection, it writes on the display what needs to be done and the server works correctly in access point mode.. (This revised version is not yet on GitHub)
The discussion revolves around building an internet radio and audio file player using the ESP32-S3 microcontroller. The project includes features such as an OLED display, Wi-Fi connectivity, and audio playback capabilities. Users share their experiences with hardware setup, including issues with pin configurations, library compatibility, and troubleshooting compilation errors in the Arduino IDE. Suggestions for libraries, such as ESP32-audioI2S and WiFiManager, are provided to enhance functionality. Participants also discuss the importance of proper wiring, capacitor usage for encoders, and the potential for adding features like DLNA support and a web management interface for radio station management. Several users report on their progress, share code snippets, and offer solutions to common problems encountered during development. Summary generated by the language model.