Sha256: 0a71f90eff33342bf8ff95f2b1ad5e93c1dcc3fe6136ef7a5be744357117b01c

Contents?: true

Size: 444 Bytes

Versions: 2

Compression:

Stored size: 444 Bytes

Contents

# -*- coding: utf-8 -*-
require 'smalruby/hardware'

module Smalruby
  module Hardware
    # LEDを表現するクラス
    class Led < Smalrubot::Components::Led
      def initialize(options)
        super(board: world.board, pin: Pin.smalruby_to_smalrubot(options[:pin]))
      end

      # @!method on
      # LEDをオンにする

      # @!method off
      # LEDをオフにする

      def stop
        off
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
smalruby-0.1.0-x86-mingw32 lib/smalruby/hardware/led.rb
smalruby-0.1.0 lib/smalruby/hardware/led.rb