ユーザ用ツール

サイト用ツール


dsair2_basic

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

両方とも前のリビジョン前のリビジョン
次のリビジョン
前のリビジョン
次のリビジョン両方とも次のリビジョン
dsair2_basic [2019/03/08 20:19]
– [DSair BASIC (DSbasic)] yaasan
dsair2_basic [2019/05/04 07:16]
– [活用例] yaasan
行 1: 行 1:
 ====== DSair BASIC (DSbasic) ====== ====== DSair BASIC (DSbasic) ======
  
-Keywords: BASIC, Programming, 教育, Education, Maker, DIY, interpreter,+Keywords: BASIC, Programming, プログラミング, 教育, Education, Maker, DIY, interpreter,
  
 [[DSair2_ukeng]] ([[DSair2|JPN]]) [[DSair2_ukeng]] ([[DSair2|JPN]])
行 22: 行 22:
   * Support Locomotive and Turnouts control via BASIC language   * Support Locomotive and Turnouts control via BASIC language
   * MP3 Play suported in MP3 files of FlashAir SD card.   * MP3 Play suported in MP3 files of FlashAir SD card.
-===== Function =====+===== BASIC Function ===== 
 + 
 +==== DSair2 Unique Functions ====
  
 LocAddr is Locomotive address. Default protocol is DCC. If you want to control Marklin's, configure protocol on web app. LocAddr is Locomotive address. Default protocol is DCC. If you want to control Marklin's, configure protocol on web app.
行 42: 行 44:
 |getslotfnc| SlotNo(0-3), FuncNo(0-28) | 4つのユーザー指定アドレススロットからファンクション状態(0=OFF,1=ON)を返します。 | |getslotfnc| SlotNo(0-3), FuncNo(0-28) | 4つのユーザー指定アドレススロットからファンクション状態(0=OFF,1=ON)を返します。 |
 |getslotfncw| SlotNo(0-3) | 4つのユーザー指定アドレススロットからファンクション状態を29bit分返します。 | |getslotfncw| SlotNo(0-3) | 4つのユーザー指定アドレススロットからファンクション状態を29bit分返します。 |
-|S88START| - | S88機能を有効にします。S88の関数を使う場合は必ずBASICプログラムの最初に記述して下さい。 |+|S88START| - | S88機能を有効にします。S88の関数を使う場合は必ずBASICプログラムの最初に記述して下さい。括弧はつけないでください。 |
 |S88GET,GETS88| S88Sensor address(1-16) | S88センサーの値(0=OFF,1=ON)を返します。 | |S88GET,GETS88| S88Sensor address(1-16) | S88センサーの値(0=OFF,1=ON)を返します。 |
 |GETS88W| S88Sensor address(1-16) | S88センサーの値を16bit分返します。 | |GETS88W| S88Sensor address(1-16) | S88センサーの値を16bit分返します。 |
-|DCPWM| PWMDuty(0-1203) | |+|DCPWM| PWMDuty(0-1023) | |
 |DCDIR| Direction| FWD=1, REV=2 | |DCDIR| Direction| FWD=1, REV=2 |
  
行 59: 行 61:
 BASIC functions are described in [[https://github.com/google/wwwbasic|wwwbasic]] user manual. BASIC functions are described in [[https://github.com/google/wwwbasic|wwwbasic]] user manual.
  
-==== BASIC functions ====+==== Main functions ====
  
-FOR,NEXT,IF,GOTO,END IF,ELSE,WHILE,WEND, +  * FOR 
-PRINT,COLOR,LOCATE,LINE,PAINT +  * NEXT 
-RND,INT,SLEEP+  * IF 
 +  * GOTO 
 +  * END IF 
 +  * ELSE 
 +  * WHILE 
 +  * WEND 
 +  * CALL 
 +  
  
 +==== Drawing functions ====
 +
 +  * PRINT
 +  * COLOR
 +  * LOCATE
 +  * LINE
 +  * PAINT
 +  * CIRCLE
 +  * PUT
 +  * SCREEN
 +  * CLS
 +  * WIDTH
 +  * PALETTE
 +  * 
 +
 +==== Math functions ====
 +
 +asc, sqr, int, cint
 +abs, cos, sin, tan
 +atn, exp, log, rnd, atan2
 +
 +==== Text functions ====
 +
 +  * val 文字を数値に変換
 +  * str$  数値を文字列に変換
 +  * ltrim$ 左側文字列を抜き出す
 +  * rtrim$ 右側文字列を抜き出す
 +  * left$
 +  * right$
 +  * mid$
 +  * string$
 +  * space$ スペースを抜き出す
 +  * tab
 +  * ucase$ 英字を大文字にする
 +  * lcase$ 英字を小文字にする
 +  * mid$
 +  * 
 +
 +
 +
 +==== Key Input functions ====
 +
 +  * inkey$
 +  * input
 +
 +==== Mouse Input functions ====
 +
 +  * getmouse
 +  * 
 +
 +==== Etc functions ====
 +
 +  * timer
 +  * SLEEP
 +  * swap
 +  * 
 ===== Examples ===== ===== Examples =====
  
行 302: 行 367:
 NEXT i NEXT i
 </code> </code>
 +
 +
 +
 +===== 活用例 =====
 +
 +皆様のDSbasicの活用例、サンプル、解説などお待ちしております。
 +
 +  * [[http://powerele.sblo.jp/article/185725380.html|DSbasicでポイントを使った自動運転をしてみた]] (DesktopStation公式ブログ)
 +  * [[https://tsujiru.hatenablog.com/entry/2019/04/30/195231|DSbasic 入門してみる(1)]],[[https://tsujiru.hatenablog.com/entry/2019/04/30/211900|(2)]],[[https://tsujiru.hatenablog.com/entry/2019/05/01/195229|(3)]],[[https://tsujiru.hatenablog.com/entry/2019/05/01/195229|(4)]],[[https://tsujiru.hatenablog.com/entry/2019/05/02/123319|(5)]],[[https://tsujiru.hatenablog.com/entry/2019/05/02/192817|(6)]],[[https://tsujiru.hatenablog.com/entry/2019/05/03/193437|(7)]] (つじるの忘れんぼ鉄道)
 +  * [[http://powerele.sblo.jp/article/185561119.html|DSbasicで運転支援機能]]  (DesktopStation公式ブログ)
 +  * [[http://powerele.sblo.jp/article/185548716.html|DSair2で自動運転をしてみる]]   (DesktopStation公式ブログ)
 +  * [[https://desktopstation.net/bb/showthread.php?tid=126|DSbasic (DSair用BASIC) 相談室]] デジタル鉄道模型フォーラム
  
  
dsair2_basic.txt · 最終更新: 2023/09/02 11:01 by yaasan

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki