Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Arduino Lib for AMS AS5048B I2C - 14-bit magnetic rotary position sensor

License

NotificationsYou must be signed in to change notification settings

sosandroid/AMS_AS5048B

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 Osram page.

v1.0 - First releasev1.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 themv1.0.2 - ams_as5048b.cpp - fix setZeroReg() issue raised by @MechatronicsWorkmanv1.0.3 - Small bug fix and improvement by @DavidHowlettv1.0.4 - Implemented OTP register burning by @brentyiv1.0.5 - Optional parameters fix

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 officialadapter 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

About

Arduino Lib for AMS AS5048B I2C - 14-bit magnetic rotary position sensor

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors6

Languages


[8]ページ先頭

©2009-2025 Movatter.jp