Skip to content

Conversation

@askuric
Copy link
Member

@askuric askuric commented Feb 10, 2026

At the moment we usually run the SPI sensors at 1MHz which is in many cases a lot under sensor capabilities.

Till now, we did allow changing it through the sensor.clock_speed variable or through the MagneticSensorSPIConfig_s.

But for the sake of simplicity this PR adds the posibility too.
It's backwards compatible, no changes in the API - the parameter is optional.

Example usage - running AS5048 at 5mHz

MagneticSensorSPI sensor = MagneticSensorSPI(AS5048_SPI, D4, 5000000);

Example usage - running AS5047 at 5mHz

MagneticSensorSPI sensor = MagneticSensorSPI(D4, 14, 0x3FFF, 5000000); // using default AS5047 config

@askuric askuric changed the base branch from master to dev February 10, 2026 09:05
@askuric askuric merged commit 823126b into dev Feb 10, 2026
61 checks passed
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

Successfully merging this pull request may close these issues.

1 participant