-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathetc.html
More file actions
155 lines (153 loc) · 5.53 KB
/
etc.html
File metadata and controls
155 lines (153 loc) · 5.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
<!DOCTYPE html>
<html lang="ja">
<head>
<title>その他サンプル - RBoardDocument</title>
<link rel="shortcut icon" href="./image/bug.ico">
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-176702602-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-176702602-1');
</script>
<link rel="stylesheet" type="text/css" href="main.css" />
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.2/styles/a11y-dark.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.2/highlight.min.js"></script>
<script type="text/javascript" src="./style.js"></script>
<link href="https://use.fontawesome.com/releases/v5.11.0/css/all.css" rel="stylesheet">
</head>
<body>
<div id="header"><h1> その他サンプル </h1></div>
<div id="main">
<h3>Lチカ(オンボードLED)</h3>
<pre><code class="ruby">
while true
leds_write(1)
sleep(1)
leds_write(0)
sleep(1)
end
</code></pre>
<pre><code class="ruby">
pinMode(0,0)
while true
digitalWrite(0,1)
sleep 1
digitalWrite(0,0)
sleep 1
end
</code></pre>
<hr id="first_boader">
<h3 class="link" id="etc_output">Lチカ(外部LED)</h3>
<pre><code class="ruby">
pinMode(20,0)
while true
digitalWrite(20,1)
sleep 1
digitalWrite(20,0)
sleep 1
end
</code></pre>
<hr id="first_boader">
<h3 class="link" id="etc_button">外部入力(DigitalGROVE)</h3>
http://wiki.seeedstudio.com/Grove-Button/
<pre><code class="ruby">
pinMode(0,0)
pinMode(16,1)
while true
leds_write(digitalRead(16))
end
</code></pre>
<hr id="first_boader">
<h3>7セグメントLED</h3>
74HC4511を使用するとleds_write(0,1,5,6pin)から簡単に出力できる。
<pre><code class="ruby">
j = 0
while true
leds_write(j)
j = j + 1
if(j==10)
j = 0
end
sleep(1)
end
</code></pre>
<hr id="first_boader">
<h3 class="link" id="etc_out">外部出力(DigitalGROVE)</h3>
リレー:<a href="https://www.switch-science.com/catalog/807/">https://www.switch-science.com/catalog/807/</a>
<pre><code class="ruby">
pinMode(0,0)
pinMode(16,1)
while true
digitalWrite(16,1)
sleep(1)
digitalWrite(16,0)
sleep(1)
end
</code></pre>
</div>
<div id="submenu">
<div id="submenu_header">もくじ</div>
<ul id="submenu_body">
<i class="fas fa-home"></i><a href="./index.html">HOME</a>
<li><details>
<summary>プログラム書き込み</summary>
<ul id="subuul">
<li><a href="./ide_install.html">mruby/c IDEインストール</a></li>
<li><a href="./write_program.html">PG書き込み</a></li>
</ul>
</details></li>
<li><details>
<summary>ファームウェアアップデート</summary>
<ul id="subuul">
<li><a href="./update.html">アップデート手順</a></li>
</ul>
</details></li>
<li><details>
<summary>ボード一覧</summary>
<ul id="subuul">
<li><a href="./board_list.html">ボード一覧</a></li>
</ul>
</details></li>
<li><details>
<summary>RBoardにおける各クラス</summary>
<ul id="subuul">
<li><a href="./class.html">各クラス</a></li>
<li><a href="./mrubyc_class.html">mruby/c IO 各クラス</a></li>
<li><a href="./class_common.html">mruby/cIO標準化準拠クラス</a></li>
</ul>
</details></li>
<li><details>
<summary>サンプルプログラム</summary>
<ul id="subuul">
<li><a href="./adc.html">ADCサンプル</a> / <a href="./sample_adc.html">ver2</a></li>
<li><a href="./i2c.html">I2Cサンプル</a> / <a href="./sample_i2c.html">ver2</a></li>
<li><a href="./pwm.html">PWMサンプル</a> / <a href="./sample_pwm.html">ver2</a></li>
<li><a href="./uart.html">UARTサンプル</a> / <a href="./sample_uart.html">ver2</a></li>
<li><a href="./etc.html">その他サンプル</a> / <a href="./sample_etc.html">ver2</a></li>
</ul>
</details></li>
<li><details>
<summary>その他</summary>
<ul id="subuul">
<li><a href="./sensor_module.html">対応センサーモジュール</a></li>
<li><a href="./console.html">ターミナルソフトの設定</a></li>
</ul>
</details></li>
<li><details>
<summary>チュートリアル</summary>
<ol id="subuol">
<li><a href="./tutorial_mrubyc.html">mruby/cとは?</a></li>
<li><a href="./tutorial_led.html">LEDを制御する</a></li>
<li><a href="./tutorial_rgb_led.html">フルカラーLED</a></li>
<li><a href="./tutorial_reed_switch.html">ドア開閉センサ</a></li>
<li><a href="./tutorial_buzzer.html">圧電ブザー</a></li>
<li><a href="./tutorial_cds.html">光センサ</a></li>
<li><a href="./tutorial_temp.html">温度センサ</a></li>
</ol>
</details></li>
</ul>
</div>
</body>
</html>