1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

概要

paiza.ioでelixirやってみた。
高位合成、やってみた。
練習問題やってみた。
構想編。

練習問題

俺言語で、serial送信を実現せよ。

俺言語拡張仕様

変数iとjを導入する。

変数iは、"hello"を、"h", "e", "l", "l", "o"で返す。
変数jは、0x55を、0, 0, 1, 0, 1, 0, 1, 0, 1, 1で返す。
変数0は、クロックにつながっている。115200ボーのパルス
変数xは、serial出力。

serial送信な、俺言語コード

helloを115200ボーで送信

10 x=0
20 i="hello"
30 j=i
40 #=j@0*200
50 #=o@1*70
60 #=50
70 a=j
80 #=a@1*110
90 x=0
100 #=120
110 x=1
120 #=o@0*30
130 #=120
200 #=200

以上。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?