Sha256: f616692e39a487ff7bed3ff0e16353575dcfa4e23862c2067c97249af68b0d64

Contents?: true

Size: 383 Bytes

Versions: 22

Compression:

Stored size: 383 Bytes

Contents

# -*- coding: utf-8 -*-

DESCRIPTION = <<EOS
LEDを1秒間隔で点滅させます
EOS

# デジタルの13番ピンに接続してください。

require 'smalruby'

init_hardware

stage1 = Stage.new(color: 'white')

stage1.on(:start) do
  draw_font(string: DESCRIPTION, color: 'black')

  loop do
    led('D13').turn_on
    sleep(1)
    led('D13').turn_off
    sleep(1)
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
smalruby-0.1.11-x86-mingw32 samples/hardware_led.rb
smalruby-0.1.11 samples/hardware_led.rb
smalruby-0.1.10-x86-mingw32 samples/hardware_led.rb
smalruby-0.1.10 samples/hardware_led.rb
smalruby-0.1.9-x86-mingw32 samples/hardware_led.rb
smalruby-0.1.9 samples/hardware_led.rb
smalruby-0.1.8-x86-mingw32 samples/hardware_led.rb
smalruby-0.1.8 samples/hardware_led.rb
smalruby-0.1.7-x86-mingw32 samples/hardware_led.rb
smalruby-0.1.7 samples/hardware_led.rb
smalruby-0.1.6-x86-mingw32 samples/hardware_led.rb
smalruby-0.1.6 samples/hardware_led.rb
smalruby-0.1.5-x86-mingw32 samples/hardware_led.rb
smalruby-0.1.5 samples/hardware_led.rb
smalruby-0.1.4-x86-mingw32 samples/hardware_led.rb
smalruby-0.1.4 samples/hardware_led.rb
smalruby-0.1.3-x86-mingw32 samples/hardware_led.rb
smalruby-0.1.3 samples/hardware_led.rb
smalruby-0.1.2-x86-mingw32 samples/hardware_led.rb
smalruby-0.1.2 samples/hardware_led.rb