Closed sylque closed 7 months ago
Hi there,
I think you can already do this:
SPIClass mySPI(HSPI);
mySPI.begin(PIN_CLK, PIN_MISO, PIN_MOSI);
sensor.init(&mySPI);
Please let me know if this solves your problem?
Yes, this should work! I will post the result here.
It works perfectly, thank you very much.
Now I have 3 places with SPI settings instead of two :-) (sensor constructor, sensor.init(), spi.begin())
This is a duplicate of https://github.com/simplefoc/Arduino-FOC/issues/375
Is your feature request related to a problem? Please describe. On my ESP32, I can choose any GPIO pins for SPI. Unfortunately, it seems SimpleFOCDrivers only allows for the two sets of default SPI pins (HSPI and VSPI), like this:
Describe the solution you'd like Either:
or:
As a side note, is there any reason why half the SPI parameters (namely SPISettings and nCS) are passed in the sensor constructor whereas the other half (SPIClass) is passed in sensor.init()? This makes things hard to grasp.