Let’s make program. You can NOT use “vi” in UART console mode. Type “cat >.” and Enter, the lash will wait a program from UART RX.
Type such a program on your text editor, and copy.
Then paste the program and Enter.
The program will send to the lash. And send Ctrl+D to exit from “cat >.”.
Type “cat .” to confirm the program was sent.
Let’s start program by “ts .”. (Because this is FORTH version)
LED will blink, yeah!
But, you can NOT stop the endless program… So please reset the board by switch.
Please make such a program to stop running.
You can stop the program by pushing the button. Such a “Stdin/out: kbd, scr” message will appear when stopped. Please push button again, console will back to UART.
You can make such a program to keep UART console when stopped.
It is easy way to use when you don’t have NTSC TV and PS/2 Keyboard. Please try it!
VARIABLE age
42 age !
age @ .
: age_add age @ 1 + age ! ;
age_add
age @ .
こんな感じで使えます。なので、
cls
VARIABLE x 15 x !
BEGIN
x @ 5 lc 0 .
32 rnd 23 lc 1 .
x @ 5 scr 0 = WHILE
30 sleep
inkey
DUP 28 = IF x @ 1 - x ! THEN
DUP 29 = IF x @ 1 + x ! THEN
DROP
REPEAT
cls
15
BEGIN
DUP 5 lc 0 .
32 rnd 23 lc 1 .
0 scroll
DUP 5 scr 0 = WHILE
30 sleep
inkey
DUP 28 = IF SWAP 1 - SWAP THEN
DUP 29 = IF SWAP 1 + SWAP THEN
DROP
REPEAT
I made a game with IchigoLatte FORTH I’m creating. This is a source program of it.
The game is like this. Is it difficult?
BEGIN 33 out 1000 sleep 18 out 1000 sleep REPEAT
And I also made a robot control program. It is very simple. “33 out” is “Forward”, “18 out” is “Backward”, “17 out” is “Turn left” and “34 out” is “Turn right”.
The robot moves like this. Do you like it?
You can download this firmware from here. This firmware for IchigoJam board. Please reflash this firmware to your IchigoJam board.