Skip to content

Commit

Permalink
Merge pull request #2 from Mepherotus/patch-1
Browse files Browse the repository at this point in the history
Update the angle calculation, the 0x4 register starts with 2 empty bits
  • Loading branch information
noranraskin authored Feb 6, 2025
2 parents 6c4e3ad + 931442c commit 502fd45
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/MT6701.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ int MT6701::readCount()
int angle_h = Wire.read();
int angle_l = Wire.read();

return (angle_h << 6) | angle_l; // returns value from 0 to 16383
return (angle_h << 6) | (angle_l >> 2); // returns value from 0 to 16383
}

void MT6701::updateTask(void *pvParameters)
Expand Down

0 comments on commit 502fd45

Please sign in to comment.