Skip to content

kanestoboi/AS5600

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AS5600

Arduino library for the AS5600 12-bit Magnetic Encoder. This library was written for the NEMA-17 AS5600 Board.

Features

  • Read 12 bit value (0-4095)
  • Read angle value in degrees (0-360 degrees)
  • Get magnetic strength
  • Get gain

Example

The following example reads the angle (0-360) of the magnet relative to the AS5600 encoder in increments of 360/4096

#include <AS5600.h>

AS5600 encoder;
float output;

void setup() {
  Serial.begin(9600);
}

void loop() {
  // get the angle in degrees of the encoder
  output = encoder.getAngle();
  Serial.println(output);
}

More Examples

See examples directory in this repository for more examples including continuous rotation.

About

An Arduino library for the AS5600 magnetic encoder

Resources

License

Stars

38 stars

Watchers

5 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages