GithubHelp home page GithubHelp logo

ams_as5048b-i2c-t3's Introduction

Arduino library for AS5048B from AMS

v1.0 - First release
v1.0.1 - Typo to allow compiling on Codebender.cc (Math.h vs math.h) + Wind vane example modification to comply with the Timer.h lib used by them
v1.0.2 - ams_as5048b.cpp - fix setZeroReg() issue raised by @MechatronicsWorkman
v1.0.3 - Small bug fix and improvement by @DavidHowlett
v1.0.4 - Implemented OTP register burning by @brentyi
v1.0.5 - Optional parameters fix

AS5048B is a 14-bit magnetic rotary position sensor with digital angle (I2C) and PWM output. This library deals only with the I2C channel.

AS5048B's AMS page.

Features

  • Manage zero position
  • Counts CW or CCW
  • Reads Auto Gain & Diagnostics registers
  • Reads 14 bits magnitude
  • Reads 14 bits angle with various units output (raw, turn, degree, radian, grade, minute of arc, second of arc, Nato mil, Russian mil, Swedish mil)
  • Computes an angular exponential moving average
  • Reads exponential moving average angle and outputting with various units
  • Resets Exp moving Avg
  • OTP setting
  • OTP programming sequence

Code examples

  • Single angle reading, outputs 2 units
  • Angular exponential moving average reading, outputs read angle and average
  • Wind vane, outputs azimuth and compass direction - This one as a special #define for Codebender.cc support
  • Dial reading for X-Plane
  • Slave address programming

Not available yet features

  • PWM reading
  • Debug

Testing

  • Tested against AS5048B's official adapter board
  • Tested on Arduino Mega with Arduino IDE 1.0.5 && Codebender.cc
  • Tested on Arduino Uno with Arduino IDE 1.6.9
  • Tested on Arduino Nano with Arduino IDE 1.6.9
  • Tested on Teensy++ 2.0 with Arduino IDE 1.6.9
  • Please comment about other devices

ams_as5048b-i2c-t3's People

Contributors

trevorjtclarke avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.