Sha256: 67f08bbba953428a3474ccc75e23c8b4650325550c479ebb9f0b5389392c77f6
Contents?: true
Size: 1.37 KB
Versions: 3
Compression:
Stored size: 1.37 KB
Contents
# Commands ## roll(speed, direction) Starts the sphero rolling at the provided speed (value between `0` and `255`) and direction (value between `0` and `360`). ##### Params - **speed** - params - **direction** - params ##### Returns `true or nil` ## stop Stops the sphero. ##### Returns `true or nil` ## detect_collisions Sets the sphero to detect collisions and report them. ##### Returns `true or nil` ## messages → [sphero_event] Returns an array of sphero events, the messages reported by the sphero. ##### Returns `sphero_event` ## color(:color_symbol | [red, green, blue]) → [red_int, green_int, blue_int] You can pass a color as a symbol or an array containing RGB colors from 0 to 255 `([255, 0, 0] == red)`, if passed a symbol returns the array of RGB corresponding to the color, if passed an array of colors it returns the same array (used when setting colors to the sphero). ##### Params - **color_symbol** - params - **red** - params - **green** - params - **blue** - params ##### Returns `[red_int, green_int, blue_int]` ## set_color([red, green, blue]) → true | nil REVISION PENDING: You can either use it in tandem with color to set the color of the sphero or just pass an array containing RGB colors on the range `0` to `255` `([255, 0, 0] == red)`. ##### Params - **red** - params - **green** - params - **blue** - params ##### Returns `true or nil`
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
artoo-sphero-1.5.1 | docs/commands.md |
artoo-sphero-1.5.0 | docs/commands.md |
artoo-sphero-1.4.0 | docs/commands.md |