Skip to content

Commit

Permalink
更新 maqueenPlusV2.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
LinDong88 committed Dec 19, 2024
1 parent 0920fe7 commit cf12cfe
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion maqueenPlusV2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -920,7 +920,10 @@ namespace maqueenPlusV2 {
let allBuffer = pins.createBuffer(2);
allBuffer[0] = 67;
if (angle>=0)allBuffer[1] = 1;
else allBuffer[1] = 2;
else{
allBuffer[1] = 2;
angle = -angle;
}
pins.i2cWriteBuffer(I2CADDR, allBuffer)
allBuffer[0] = 86; allBuffer[1] = speed;
pins.i2cWriteBuffer(I2CADDR, allBuffer)
Expand Down

0 comments on commit cf12cfe

Please sign in to comment.