Skip to content

Commit

Permalink
Adds MG90S servo trim, since I have a bunch.
Browse files Browse the repository at this point in the history
  • Loading branch information
EAGrahamJr committed Feb 20, 2024
1 parent 05176af commit 955cb4d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main/kotlin/crackers/kobots/devices/DeviceUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

package crackers.kobots.devices

import com.diozero.api.ServoTrim
import com.diozero.devices.sandpit.motor.StepperMotorInterface
import com.diozero.devices.sandpit.motor.StepperMotorInterface.Direction
import com.diozero.util.SleepUtil
Expand Down Expand Up @@ -89,3 +90,8 @@ fun StepperMotorInterface.rotate(
SleepUtil.busySleep(pause.toNanos())
}
}

/**
* Defines the servo trim for an MG90S servo.
*/
val MG90S_TRIM = ServoTrim(ServoTrim.DEFAULT_MID_US, 1_100)

0 comments on commit 955cb4d

Please sign in to comment.