AI-Thinker A1S Audioboard

Recurrent H/W and software problems
RonS
Posts: 238
Joined: Thu Mar 02, 2023 10:15 pm
Location: germany
Has thanked: 111 times
Been thanked: 59 times

Re: AI-Thinker A1S Audioboard

Post by RonS »

hi,
the LyraT use an ES8311 -- Annex has implemented the ES8388 I don't know the differences, you have to try it out if you know the pin assignment - you can try to play an MP3 then you don't need a big code to test
Ron
Modules : 3xESP32-Cam MB (Chip"DM ESP32 S" ),AI-Thinker Audio Kit (ES8388), ESP32 Dev Kit with Display
User avatar
karlkloss
Posts: 327
Joined: Fri Aug 18, 2023 12:21 pm
Location: Local group
Has thanked: 55 times
Been thanked: 80 times

Re: AI-Thinker A1S Audioboard

Post by karlkloss »

If you just want to hear the LyraT playing, and don't mind installing a Lyrion Music Server https://de.wikipedia.org/wiki/Lyrion_Music_Server,
then the ESP32 squeezelite firmware is an option. https://github.com/sle118/squeezelite-esp32


There are several versions of the A1s, which all have different codecs and pin assignments, but the firmware comes with a web interface, where you can try them all, until you find the right configuration.

A web installer is here: https://sle118.github.io/squeezelite-esp32-installer/
User avatar
karlkloss
Posts: 327
Joined: Fri Aug 18, 2023 12:21 pm
Location: Local group
Has thanked: 55 times
Been thanked: 80 times

Re: AI-Thinker A1S Audioboard

Post by karlkloss »

BTW: I totally forgot to mention, that the ESP32 squeezelite firmware also supports Bluetooth.
So you don't necessarily need a LMS server. Just install the firmware, configure it via the web interface, and start streaming music to it via Bluetooth.

I have two of them, and use them as LMS clients and bluetooth receivers.
Michel Alexander
Posts: 43
Joined: Sun Aug 15, 2021 5:23 pm
Has thanked: 38 times
Been thanked: 12 times

Re: AI-Thinker A1S Audioboard

Post by Michel Alexander »

Hello, the Lyrat V4.3 uses the ES8388. Unfortunately, the pinout is fixed on Option.ES8388. The Lyrat is SCL IO 23 and SDA IO18 so it doesn't work. What a pity. Maybe the GPIO assignment can be adjusted in a later annex version.
You do not have the required permissions to view the files attached to this post.
Michel Alexander
Posts: 43
Joined: Sun Aug 15, 2021 5:23 pm
Has thanked: 38 times
Been thanked: 12 times

Re: AI-Thinker A1S Audioboard

Post by Michel Alexander »

[Local Link Removed for Guests] wrote: [Local Link Removed for Guests]Wed Mar 22, 2023 5:44 pm Ok what do you say when I tell you that the board works now !!!!!
Have doing the effect again-change from Arduino to Annex without the power off..?????!!!!!
now it runs is this possible? with your theory?

after power off and one again.. nothings to hear anymore
Hello could you publish your working program? My program does not initiate the ES properly. when I briefly call a VS1053 command it plays!
My program:

' Test Lyrat 04/2025

OPTION.ES8388

I2C.SETUP 18,23
Wlog "Lyrat Start"
PlAY.SETUP 1
PLAY.VOLUME 70
'VS1053.RESET
'VS1053.STOP
play.STREAM "http://icecast.ndr.de/ndr/ndr1niedersac ... stream.mp3"
'PLAY.STREAM "http://91.121.159.124:8000/eko-des-garrigues-128k.mp3"
wlog "play Stream"
wait
RonS
Posts: 238
Joined: Thu Mar 02, 2023 10:15 pm
Location: germany
Has thanked: 111 times
Been thanked: 59 times

Re: AI-Thinker A1S Audioboard

Post by RonS »

hello
here is the running program - it is a bit older, so you have to add the option.ESxxxx... I haven't changed anything for years because it's going well so far - It still runs with Annex version 1.5x

Code: [Local Link Removed for Guests]

DIM url$(6) ' internet broadcasting stations
url$(0) = "http://www.antennebrandenburg.de/prenzlau/livemp3_s" 'American Song
url$(1) = "http://www.radioeins.de/livemp3" ' Radio1
url$(2) = "http://mp3channels.webradio.antenne.de:80/oldies-but-goldies"
url$(3) = "http://23.106.34.27:24929/stream" ' The UK 1940s Radio Station Server
url$(4) = "https://f111.rndfnk.com/ard/rbb/antennebrandenburg/live/mp3/128/stream.mp3?"
url$(5) = "http://192.96.201.2:8000/;?icy=http" ' Italian 60_70
url$(6) = "https://f111.rndfnk.com/ard/rbb/antennebrandenburg/live/mp3/128/stream.mp3?" ' RAI Classica

emi$ = "AntenneBB,Radio1,Oldie-Antenne,Los_40,Beatles,Italian,Classica_RAI" ' for listBox options
pin.mode 21, output
pin(21)=1'speaker enable
sel$ = ""
info$ = "" ' for streaming metadata
vol = 15 : vol$ = str$(vol) + "%"
status$ = "OFF"
htmlEventVar$ = "Post"
pause 1000

onplay laut        ' when receiving streaming metadata
onHtmlReload web   ' when the web page reloads
onHtmlChange sel   ' when the web page changes

gosub web
sel$ = "Oldie-Antenne"
htmlEventVar$ = "sel$"
gosub sel
refresh
wait ' wait for some event
END

' ---------------------------------------------------------------------------------------------------
web:
cls
 cssexternal "/style.css"
 a$ = ""
 a$ = |<center><h2 style="margin-top:25px;font-family:Tahoma;font-size:1.8rem;">Streaming Radio</h2>|
 a$ = a$ + |Station:| + listBox$(sel$, emi$, "box")
 a$ = a$ + textArea$(info$,"info")
 a$ = a$ + |Volume: | + textBox$(vol$,"porcen")
 a$ = a$ + slider$(vol, 0, 100, 5, "vol")
 a$ = a$ + |Right now i'm: &nbsp; &nbsp;|
 if status$ = "ON" then a$ = a$ + button$("ON",btn,"btn") else a$ = a$ + button$("OFF",btn,"btn")
 a$ = replace$(a$, "Choose here", "Select:")
 html a$
return

' ---------------------------------------------------------------------------------------------------
laut:

pause 500
 info$ = play.message$
 wlog  str$(wifi.rssi)
 info$=replace$(info$,"SiteName=", "Station: ")
 info$=replace$(info$, "Genre=", "")
 info$=replace$(info$, "Bitrate=", "Kbps: ")
 info$=replace$(info$, "StreamTitle=", "")
 
 info$=replace$(info$, "Volume", "")

 'vol = 5: 
play.volume vol
a$ = a$ + slider$(vol, 0, 100, 5, "vol")
html a$
 wlog info$
 refresh
return

' ---------------------------------------------------------------------------------------------------
btn:

if status$ = "ON" then
  play.stop
  info$ = ""
  status$ = "OFF"
  gosub web
end if

return

' ---------------------------------------------------------------------------------------------------
sel:

if htmlEventVar$ = "vol" then
  vol$ = str$(vol) + "%"
  play.volume vol
  refresh
endif

if htmlEventVar$ = "sel$" then
  index = WORD.FIND(emi$, sel$, ",")
  play.setup 1, 64
  wlog url$(index-1)
  play.stream url$(index-1), 15000
  status$ = "ON"
  gosub web
endif

return
a nice day Ron
Modules : 3xESP32-Cam MB (Chip"DM ESP32 S" ),AI-Thinker Audio Kit (ES8388), ESP32 Dev Kit with Display
User avatar
cicciocb
Site Admin
Posts: 3135
Joined: Mon Feb 03, 2020 1:15 pm
Location: Toulouse
Has thanked: 635 times
Been thanked: 2234 times
Contact:

Re: AI-Thinker A1S Audioboard

Post by cicciocb »

I've implemented an additional option in the ESP32 version 2.00.6 for this codec.

I don't know if it works or not for your chip

Code: [Local Link Removed for Guests]

- Implemented the I2C pins choice for the ES8388 (ESP32 only)
    - OPTION.ES8388 sda_pin, scl_pin
    
In your case you shoud do

Code: [Local Link Removed for Guests]

OPTION.ES8388 18, 23
Michel Alexander
Posts: 43
Joined: Sun Aug 15, 2021 5:23 pm
Has thanked: 38 times
Been thanked: 12 times

Re: AI-Thinker A1S Audioboard

Post by Michel Alexander »

[Local Link Removed for Guests] wrote: [Local Link Removed for Guests]Fri May 02, 2025 7:45 am I've implemented an additional option in the ESP32 version 2.00.6 for this codec.

I don't know if it works or not for your chip

Code: [Local Link Removed for Guests]

- Implemented the I2C pins choice for the ES8388 (ESP32 only)
    - OPTION.ES8388 sda_pin, scl_pin
    
In your case you shoud do

Code: [Local Link Removed for Guests]

OPTION.ES8388 18, 23
Thank you, great work, so it's fun to work. Annex has another module that is supported and may make many happy!
Post Reply