Class: Smalruby::Hardware::Led
- Inherits:
-
Dino::Components::Led
- Object
- Dino::Components::Led
- Smalruby::Hardware::Led
- Defined in:
- lib/smalruby/hardware/led.rb
Overview
LEDを表現するクラス
Instance Method Summary collapse
-
#initialize(options) ⇒ Led
constructor
A new instance of Led.
-
#off ⇒ Object
LEDをオフにする.
-
#on ⇒ Object
LEDをオンにする.
-
#stop ⇒ Object
LEDをオフにする.
Constructor Details
#initialize(options) ⇒ Led
Returns a new instance of Led.
8 9 10 |
# File 'lib/smalruby/hardware/led.rb', line 8 def initialize() super(board: world.board, pin: Pin.smalruby_to_dino([:pin])) end |
Instance Method Details
#off ⇒ Object
LEDをオフにする
18 19 20 |
# File 'lib/smalruby/hardware/led.rb', line 18 def stop off end |
#on ⇒ Object
LEDをオンにする
|
# File 'lib/smalruby/hardware/led.rb', line 12
|
#stop ⇒ Object
LEDをオフにする
18 19 20 |
# File 'lib/smalruby/hardware/led.rb', line 18 def stop off end |