package mindstorm

  1. Overview
  2. Docs
type port
val a : port
val b : port
val c : port
val all : port
type regulation = [
  1. | `Idle
  2. | `Motor_speed
  3. | `Motor_sync
]
type run_state = [
  1. | `Idle
  2. | `Ramp_down
  3. | `Ramp_up
  4. | `Running
]
type state = {
  1. speed : int;
  2. motor_on : bool;
  3. brake : bool;
  4. regulation : regulation;
  5. turn_ratio : int;
  6. run_state : run_state;
  7. tach_limit : int;
}
val speed : ?tach_limit:int -> ?brake:bool -> ?sync:bool -> ?turn_ratio:int -> int -> state
val set : ?check_status:bool -> 'a conn -> port -> state -> unit
val get : 'a conn -> port -> state * int * int * int
val reset_pos : ?check_status:bool -> 'a conn -> ?relative:bool -> port -> unit
OCaml

Innovation. Community. Security.