I have a problem with my arduino DUE and my magnetic sensor with SPI communication. I used the arduino UNO before and everything worked fine, using the magnetic_sensor_spi_example. Now I am switching to the Arduino DUE and I only get 0 values. Everything is pluged in the same way as in arduino UNO. I can run the motor in open loop mode but SPI does not work. My setup is:
Maybe a hint: with my setup (STM32+GBM2804R+AS5048A), I couldn’t get the MagneticSensorSPI class to work. So I used the class MagneticSensorAS5048A from @runger’s SimpleFOCDriver library instead, and it worked perfectly.
Thank you for the hint! However, I got it to run without runger’s lirary: The Arduno DUO and UNO do not have the same PINS for SPI. Now I am using the SPI pins in the middle of the board. Unfortunately, the SimpleFOCShield covers the SPI pins of the Arduino DUE, so I had to solder the wires on the back of the Arduino DUEs SPI Pins and now it works fine!