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, | + | 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' | LocAddr is Locomotive address. Default protocol is DCC. If you want to control Marklin' | ||
行 42: | 行 44: | ||
|getslotfnc| SlotNo(0-3), | |getslotfnc| SlotNo(0-3), | ||
|getslotfncw| SlotNo(0-3) | 4つのユーザー指定アドレススロットからファンクション状態を29bit分返します。 | | |getslotfncw| SlotNo(0-3) | 4つのユーザー指定アドレススロットからファンクション状態を29bit分返します。 | | ||
- | |S88START| - | S88機能を有効にします。S88の関数を使う場合は必ずBASICプログラムの最初に記述して下さい。 | | + | |S88START| - | S88機能を有効にします。S88の関数を使う場合は必ずBASICプログラムの最初に記述して下さい。括弧はつけないでください。 | |
|S88GET, | |S88GET, | ||
|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:// | BASIC functions are described in [[https:// | ||
- | ==== BASIC functions ==== | + | ==== Main functions ==== |
- | FOR,NEXT,IF,GOTO,END IF,ELSE,WHILE,WEND, | + | * FOR |
- | PRINT, | + | * NEXT |
- | RND, | + | * IF |
+ | * GOTO | ||
+ | * END IF | ||
+ | * ELSE | ||
+ | * WHILE | ||
+ | * WEND | ||
+ | * CALL | ||
+ | | ||
+ | ==== Drawing functions ==== | ||
+ | |||
+ | |||
+ | * 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 | ||
</ | </ | ||
+ | |||
+ | |||
+ | |||
+ | ===== 活用例 ===== | ||
+ | |||
+ | 皆様のDSbasicの活用例、サンプル、解説などお待ちしております。 | ||
+ | |||
+ | * [[http:// | ||
+ | * [[https:// | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[https:// | ||
dsair2_basic.txt · 最終更新: 2023/09/02 11:01 by yaasan