Sha256: d4bfdddc9a4a77236cda438b3e155879a83bd588500817d410201f5eef3e0f08
Contents?: true
Size: 652 Bytes
Versions: 20
Compression:
Stored size: 652 Bytes
Contents
# -*- coding: utf-8 -*- DESCRIPTION = <<EOS 2WD車のタイヤ(モーター)を操作します EOS # デジタルの2番・3番ピンに左のモーター、4番・5番ピンに右のモーターを接 # 続してください。 require 'smalruby' init_hardware stage1 = Stage.new(color: 'white') stage1.on(:start) do draw_font(string: DESCRIPTION, color: 'black') loop do two_wheel_drive_car('D2').forward sleep(3) two_wheel_drive_car('D2').backward sleep(3) two_wheel_drive_car('D2').turn_left sleep(3) two_wheel_drive_car('D2').turn_right sleep(3) two_wheel_drive_car('D2').stop sleep(3) end end
Version data entries
20 entries across 20 versions & 1 rubygems