Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define GPIO pins for VS1053 #509

Open
dansity opened this issue May 31, 2022 · 2 comments
Open

Define GPIO pins for VS1053 #509

dansity opened this issue May 31, 2022 · 2 comments

Comments

@dansity
Copy link

dansity commented May 31, 2022

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

@Edzelf
Copy link
Owner

Edzelf commented May 31, 2022

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.

@dansity
Copy link
Author

dansity commented Jun 7, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants