dwm_pico_as5600 is a C i2c library for Raspberry Pi Pico. It's compatible with offical pico c/c++ sdk.
Contents:
Using library is self explanatory. There is no documentation, but all the functions have descriptions for ease of use.
Any modern IDE should be capable of displaying them. For full list of functions study header file.

The code also comes with example file showing how to set up as5600 and use some of the functions.
You can find prebuilt example in "Releases" section under this repo if you just want to test the sensor.
To build example:
- Edit
PICO_SDK_PATHinCMakeLists.txt. - Create
builddirectory and access it. - From inside the directory run
cmake ..to configure and thenmaketo compile.
If compilation was successful as5600_example.uf2 binary file should be present in build directory.
Pi Pico can now be connected in flash mode and said file copied into it.
To test the example as5600 should be connected to default I2C pins. Those are GP4 for SDA and GP5 for SCL.
Image source: https://www.raspberrypi.com/documentation/microcontrollers/images/pico-pinout.svg
To test as5600 a test rig can be used. Testing by holding magnet directly in hand is discouraged.
Example prints messages via USB or UART. To receive messages a serial monitor like Minicom might be needed, but Arduino IDE's or VS Code's build ins should also do. Monitor should respect carriage return (in VS Code this is called terminal mode) for messages to display properly.
To embed library into a project, one can simply copy "dwm_pico_as5600" directory from root of the repository.
CMakeLists.txt of target project needs to be modified to make use of the library.
For convenience, important lines were highlighted in local CMakeLists.txt file.
To test as5600 sensor, test rig can be downloaded and printed.
All necessary files can be found here: https://www.thingiverse.com/thing:6514317
To learn more about as5600 itself check product document: https://ams.com/documents/20143/36005/AS5600_DS000365_5-00.pdf
This source code is released under BSD-3 license.
Check LICENSE file for full license agreement.
Check COPYING for 3rd party licenses.
