Comments (29)
What EPS32 board are you using?
What board are you selecting in the Arduino IDE?
What version of the ESP32 Board Support Package are you using?
What is an example sketch that demonstrates the issue?
from adafruit_vs1053_library.
- knockoff WeMos LOLIN32 Lite
- ESP32 Dev Module
- 2.0.5
- simple player
also i tried using the same actual pins but with manualy defining the same pins as stock and that still didnt work
from adafruit_vs1053_library.
if i change the board pin definitons for the spi pins then it works.
But it works with some changes? Where did you make these changes? In your sketch? Or to the actual library code?
from adafruit_vs1053_library.
i changed the pins in the arduino IDE board definitions, it changes what pins it tries to use for the hardware SPI functions
from adafruit_vs1053_library.
That sounds like files in the ESP32 Board Support Package?
from adafruit_vs1053_library.
yes, C:\Users\***\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.5\variants\esp32\pins_arduino.h
from adafruit_vs1053_library.
OK, if there is an issue with the board definition, please open an issue with espressif:
https://github.com/espressif/arduino-esp32/issues
from adafruit_vs1053_library.
it is not an issue with the board definitions, the existing pins are right. the issue is that when i ask this library to use diffrent pins (eg the second set of spi pins on the esp32) it dosnt work
from adafruit_vs1053_library.
How are you specifying different pins in your sketch?
from adafruit_vs1053_library.
#define CLK 18
#define MISO 19
#define MOSI 23
#define RESET -1
#define CS 10
#define XDCS 8
#define SDCS 4
#define DREQ 3
Adafruit_VS1053_FilePlayer musicPlayer = Adafruit_VS1053_FilePlayer(MOSI, MISO, CLK, RESET, CS, XDCS, DREQ, SDCS);
from adafruit_vs1053_library.
those are the same spi pins defined in the pins file
if i switch to Adafruit_VS1053_FilePlayer(RESET, CS, XDCS, DREQ, SDCS);
it works fine, basicaly the software spi isnt working on the esp32
from adafruit_vs1053_library.
Were you able to get software SPI to work at all?
from adafruit_vs1053_library.
not with this library but it works fine with the Adafruit library for the nokia Nokia 5110 display
from adafruit_vs1053_library.
It sounds like hardware SPI works as expected. But you could not get software SPI to work. So not sure what you were able to get working by updating the board definition file?
from adafruit_vs1053_library.
the esp32 boards can technicaly do hardware SPI on almost every pin, it works better on the standard ones but can be done on most. so changing the board definition made it use hardware SPI on the diffrent pins.
from adafruit_vs1053_library.
That would be required due to how Arduino works. That is not an issue with this library.
But your code snippet is setting up for software SPI:
Adafruit_VS1053_FilePlayer musicPlayer = Adafruit_VS1053_FilePlayer(MOSI, MISO, CLK, RESET, CS, XDCS, DREQ, SDCS);
And it sounds like that did not work?
It's still not clear what worked / did not work here.
from adafruit_vs1053_library.
so i was running the player_simple example sketch, when i use the hardware mode (dont specify spi pins) it works fine, but when i use the software mode (using the same pins but this time specifying them in the opject constructor) it says it cant find the player
from adafruit_vs1053_library.
OK, I think I've nominally recreated this. Not using the exact same hardware, but at least ESP32. Using a Feather ESP32 V2 with a Music Maker FeatherWing (which uses same VS1053) and running the feather_player
example sketch.
This works (HW SPI):
Adafruit_VS1053_FilePlayer musicPlayer =
Adafruit_VS1053_FilePlayer(VS1053_RESET, VS1053_CS, VS1053_DCS, VS1053_DREQ, CARDCS);
This does not work (SW SPI):
Adafruit_VS1053_FilePlayer musicPlayer =
Adafruit_VS1053_FilePlayer(MOSI, MISO, SCK, VS1053_RESET, VS1053_CS, VS1053_DCS, VS1053_DREQ, CARDCS);
results in player not found:
Couldn't find VS1053, do you have the right pins defined?
from adafruit_vs1053_library.
For now, can use the HW SPI pins that work, or the work around you've come up with for modifying the BSP files.
Keep an eye on this issue thread:
#81
It'll be worth simply updating this library to use BusIO first and see if that fixes this issue.
from adafruit_vs1053_library.
great thanks
from adafruit_vs1053_library.
@TomW1605 I've done some work on this but have some follow up questions.
What SD storage are you using and how is it being attached? This library uses the SD library which is hardware SPI only - on whatever default pins have been defined in a board's BSP config. So using the same pins for software can cause a potential conflict. That's actually why my test above with the Feather setup did not work.
What is driving the need for software SPI / alternate SPI pins?
from adafruit_vs1053_library.
thanks for looking into this
What SD storage are you using and how is it being attached? This library uses the SD library which is hardware SPI only - on whatever default pins have been defined in a board's BSP config. So using the same pins for software can cause a potential conflict. That's actually why my test above with the Feather setup did not work.
i am using the SD card slot on the adafruit board. i had a look at the SD card library and it can be passed a pre made SPI object that would allow the pins it uses to be changed. however based ont he examples this would be outside the perview of this library as it is done in the main ino code.
What is driving the need for software SPI / alternate SPI pins?
my use case is a bit odd, i am working with a chip that does not have a pre defined breakout board in the esp32 board library. i have tried making one but without much luck. this chip (ESP32-PICO-V3) works the same as the standard dev board with 1 exception, the normal SPI pins are not avalable (used for the internal flash and not connected outside the chip) so i need to use a custom set of pins.
from adafruit_vs1053_library.
i had a look at the SD card library and it can be passed a pre made SPI object that would allow the pins it uses to be changed
Can you link to where you are seeing this. That would help, but wonder how universal that is? vs. limited to a specific BSP.
from adafruit_vs1053_library.
sorry for the delay, unfortunatly it looks like it is specific to the esp32 SD library
from adafruit_vs1053_library.
@TomW1605 Unfortunately, for now, software SPI will likely remain unsupported. The current way in which this library is using the SD library makes refactoring it difficult. Took a look at what it would take for that as part of #82, and it essentially requires a rewrite. So the SD aspects remain hardware SPI based.
Your approach of changing the pin definitions in the BSP is probably your best solution. In general, using hardware SPI is preferred. So hacking your local copy of the BSP to mod it for your actual board is an OK hack.
from adafruit_vs1053_library.
SD lib usage is kind of an issue anyway because it colides with SDFat. Maybe a little rewrite would be able to tackle both issues at once 🤔
from adafruit_vs1053_library.
Moving to SDFat was what was being investigated. But it starts pulling a thread. :(
from adafruit_vs1053_library.
ok thats fare. shame its not practical with the way the SD library works. but in that case, i think it is best to remove the options constructor from the library completly. if the full SPI pin constructor dosnt and wont work then it is just confusing to have it there at all.
from adafruit_vs1053_library.
Related Issues (20)
- "Adafruit_VS1053.cpp" problem with "feather_player" exemple HOT 2
- record_ogg example does not support multiple recordings without reset HOT 2
- setVolume ranges? HOT 1
- Travis Build Broken HOT 1
- Error in compilation for Arduino Uno WiFi Rev2 HOT 2
- Compiler error when using a Arduino Nano Every (ATMega4809) HOT 4
- Problem with begin() HOT 1
- how to use the applyPatch() function? HOT 4
- Not really a issue but.. HOT 7
- Convert to BusIO HOT 1
- Strange error occurs once and again while using Music Maker
- Increase SPI clock? HOT 1
- Please fix sdfat HOT 4
- Does not work on ESP32 HOT 7
- Using SDfat on RP2040 (earlephilhower core) HOT 1
- Issue with Ogg Recording Example on VS1053 Breakout Board
- Playback stops (but not fully) when changing volume too quickly
- Possible Code Modifications for Adafruit_VS1053 Files
- Doesn't work with all memory cards
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from adafruit_vs1053_library.