-
Notifications
You must be signed in to change notification settings - Fork 23
Returning correct units gyro #30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
ladyada
merged 2 commits into
adafruit:master
from
jposada202020:returning_correct_units_gyro
May 9, 2021
Merged
Returning correct units gyro #30
ladyada
merged 2 commits into
adafruit:master
from
jposada202020:returning_correct_units_gyro
May 9, 2021
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kk did you try this on hardware? |
Not this one, I test the L3GD20 and the MPU6050. I verify that the lambda function was working with this :) def gyro():
"""The gyroscope X, Y, Z axis values as a 3-tuple of
degrees/second values.
"""
raw = (1, 2, 3)
return map(lambda x: math.radians(x * gyro_dps_digit), raw)
# * 0.01745277777777778
a, b, c = gyro()
print(a,b,c)
# print(5*3.1415/180)
# print(10*3.1415/180)
# print(15*3.1415/180)
#
# print(math.radians(5))
# print(math.radians(10))
# print(math.radians(15))
# 0.08726646259971647
# 0.17453292519943295
# 0.2617993877991494 |
kk - what was the circuitpy board? |
tested in Adafruit CircuitPython 6.2.0 on 2021-04-05; Adafruit Feather RP2040 with rp2040 |
oki just makin sure its not just CPython :) |
:), no I was not sure that radians existed in CP so that I did all the granular tests... but one of the good gyro library uses radians, so it was not my idea I just copy from there. |
adafruit-adabot
added a commit
to adafruit/Adafruit_CircuitPython_Bundle
that referenced
this pull request
May 11, 2021
Updating https://github.com/adafruit/Adafruit_CircuitPython_AS7341 to 1.1.2 from 1.1.1: > Merge pull request adafruit/Adafruit_CircuitPython_AS7341#17 from jposada202020/replacing_named_tuple Updating https://github.com/adafruit/Adafruit_CircuitPython_BMP3XX to 1.3.6 from 1.3.5: > Merge pull request adafruit/Adafruit_CircuitPython_BMP3XX#17 from jposada202020/adding_waitingtime_as_option Updating https://github.com/adafruit/Adafruit_CircuitPython_DPS310 to 1.2.5 from 1.2.4: > Merge pull request adafruit/Adafruit_CircuitPython_DPS310#13 from jposada202020/adding_readme_note Updating https://github.com/adafruit/Adafruit_CircuitPython_LSM9DS1 to 2.1.9 from 2.1.8: > Merge pull request adafruit/Adafruit_CircuitPython_LSM9DS1#30 from jposada202020/returning_correct_units_gyro Updating https://github.com/adafruit/Adafruit_CircuitPython_MPU6050 to 1.1.8 from 1.1.7: > Merge pull request adafruit/Adafruit_CircuitPython_MPU6050#17 from jposada202020/correcting_returning_units_gyro Updating https://github.com/adafruit/Adafruit_CircuitPython_Wiznet5k to 1.10.0 from 1.9.3: > Merge pull request adafruit/Adafruit_CircuitPython_Wiznet5k#36 from xorbit/master Updating https://github.com/adafruit/Adafruit_CircuitPython_AdafruitIO to 5.3.0 from 5.2.5: > Merge pull request adafruit/Adafruit_CircuitPython_AdafruitIO#70 from rodrigoargumedo/create-multiple-records Updating https://github.com/adafruit/Adafruit_CircuitPython_MatrixPortal to 3.0.1 from 3.0.0: > Merge pull request adafruit/Adafruit_CircuitPython_MatrixPortal#78 from flavio-fernandes/fix.issue.77
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Correcting Gyro returning Units from DPS to rad/s