| Copyright | (c) Levent Erkok |
|---|---|
| License | BSD3 |
| Maintainer | erkokl@gmail.com |
| Stability | experimental |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
System.Hardware.Arduino.Parts.Servo
Description
Abstractions for servo motors. See System.Hardware.Arduino.SamplePrograms.Servo for example uses.
Attaching a servo motor on a pin
A servo motor. Note that this type is abstract, use attach to
create an instance.
Arguments
| :: Pin | Pin controlling the servo. Should be a pin that supports SERVO mode. |
| -> Maybe Int | Pulse-width (in microseconds) for the minumum 0-degree angle. Default: |
| -> Maybe Int | Pulse-width (in microseconds) for the maximum, typically 180-degree, angle. Default: |
| -> Arduino Servo |
Create a servo motor instance. The default values for the min/max angle pulse-widths, while typical,
may need to be adjusted based on the specs of the actual servo motor. Check the data-sheet for your
servo to find the proper values. The default values of 544 and 2400 microseconds are typical, so you might
want to start by passing Nothing for both parameters and adjusting as necessary.