Define GPIO pins for VS1053
dansity opened this issue · 2 comments
Hello! Thank you for your work. I have read the manual but stuck with the pin setup.
In the meantime I have found some references and the config for me is now like this:
pin_enc_clk = 25
pin_enc_dt = 26
pin_enc_sw = 27
pin_ir = 35
pin_sd_cs = 21
pin_spi_miso = 19
pin_spi_mosi = 23
pin_spi_sck = 18
pin_tft_scl = 22
pin_tft_sda = 21
pin_vs_cs = 5
pin_vs_dcs = 32
pin_vs_dreq = 4
I had the oled commented out in visual studio, rest commented. I don't have sound and I don't have image on the oled.
My original question:
The main.ccp file has an "example" wiring and mentiones that I will be able to change these once I'm up and running. Now the firmware is uploaded but the config has only a handful of pins defined.
For the VS1053 there are 3 pins defined while it has 7
pin_vs_cs = 5
pin_vs_dcs = 32
pin_vs_dreq = 4
I'm missing MOSI,MISO,SCK,XRST
Also I need the pin setup for the screen I will use (OLED, I need SCK and SDA pins).
How to define them?
Thank you
Some of the pins have a default assignment, see table progpin[] in main.cpp.
For example pins 18,19,21,22,23:
{ 18, false, false, "", false }, // Default for SPI CLK
{ 19, false, false, "", false }, // Default for SPI MISO
{ 21, false, false, "", false }, // Also Wire SDA
{ 22, false, false, "", false }, // Also Wire SCL
{ 23, false, false, "", false }, // Default for SPI MOSI
In the config page, you only have to specify pins that differ from the default.
Really thank you for your reply. As my upper table shows I have used the same pins (even if I have defined them again) but I'm not able to figure out what is the issue. I have the webpage showing the radio playing but I have no sound and I have no image on the oled. I have checked wiring and continuity at least 10 times now, everything is by the book.
If you have a few tips what to check it would be awsome