mindstorm-lwt

Drive Lego Mindstorms bricks from OCaml (LWT version)
IN THIS PACKAGE
Module Mindstorm_lwt . NXT . Sound
val play : ?check_status:bool -> 'a conn -> ?loop:bool -> string -> unit Lwt.t

play_soundfile conn file plays the sound file named file. The sound files extension, namely ".rso", must be part of file.

  • parameter loop

    if true repeat the play indefinitely. Default: false.

  • parameter check_status

    whether to check the status returned by the brick. Default: see Mindstorm_lwt.NXT.connect_bluetooth.

val stop : ?check_status:bool -> 'a conn -> unit Lwt.t

Stop the current playback. Does nothing if no sound file is playing.

  • parameter check_status

    whether to check the status returned by the brick. Default: see Mindstorm_lwt.NXT.connect_bluetooth.

val play_tone : ?check_status:bool -> 'a conn -> int -> int -> unit Lwt.t

play_tone conn freq duration play a tone with freq Hz lasting duration miliseconds.

  • parameter check_status

    whether to check the status returned by the brick. Default: see Mindstorm_lwt.NXT.connect_bluetooth.