1+ module Fable.Python.MicroBit
2+
3+ open Fable.Core
4+
5+ /// Micro:Bit stubs for Fable Python
6+ type IDisplay =
7+ /// Clear the display.
8+ abstract clear : unit -> unit
9+
10+ /// Scrolls value horizontally on the display. If value is an integer or
11+ /// float it is first converted to a string using str(). The delay
12+ /// parameter controls how fast the text is scrolling. If wait is True,
13+ /// this function will block until the animation is finished, otherwise the
14+ /// animation will happen in the background. If loop is True, the animation
15+ /// will repeat forever. If monospace is True, the characters will all take
16+ /// up 5 pixel-columns in width, otherwise there will be exactly 1 blank
17+ /// pixel-column between each character as they scroll. Note that the wait,
18+ /// loop and monospace arguments must be specified using their keyword.
19+ abstract scroll : value : string -> unit
20+ abstract scroll : value : string * delay : int -> unit
21+
22+ /// Turn on the display.
23+ abstract on : unit -> unit
24+
25+ /// Turn off the display.
26+ abstract off : unit -> unit
27+
28+ /// Returns true if the display is on.
29+ abstract is_on : unit -> bool
30+
31+ [<Import( " display" , " microbit" ) >]
32+ let display : IDisplay = nativeOnly
0 commit comments