SlideShare a Scribd company logo
1 of 10
2019年6月30日 PCN ひろしま
IchigoJam でんし こうさく
こえに はんのうする おもちゃ
はなしかけると すずをならす
2
おねがい
• とがった ぶひんが あります
• けがに ちゅうい!!
• ぶひんは ていねいに さわってください
3
サーボモーター SG90
4
おとセンサー
5
よてい
• サーボをつなぐ
• サーボをうごかす
• おとセンサーをつなぐ
• おとセンサーをうごかす
• おとセンサーでサーボをうごかす
6
7
OUT2
5V
GND
GNDIN4
VCCGNDOUT
+
VCCGNDOUT
リスト1
100 V=0
110 FOR I=1 TO 50
120 S=IN(4)
130 IF S THEN V=V+1
140 NEXT
150 ?V
160 GOTO 100
8
リスト2
100 V=0
110 FOR I=1 TO 50
120 S=IN(4)
130 IF S THEN V=V+1
140 NEXT
150 ?V
160 WAIT 1
170 IF V<5 GOTO 100
180 PWM 2,100
190 WAIT 15
200 PWM 2,180
210 WAIT 15
220 GOTO 100
9
リスト3
100 V=0
110 FOR I=1 TO 50
120 S=IN(4)
130 IF S THEN V=V+1
140 NEXT
150 IF V=0 GOTO 190
160 FOR I=1 TO V
170 ?"*";
180 NEXT
190 ?
10
200 WAIT 1
210 IF V<5 GOTO 100
220 PWM 2,100
230 WAIT 15
240 PWM 2,180
250 WAIT 15
260 GOTO 100

More Related Content

More from Takuya Nishimoto

More from Takuya Nishimoto (20)

210630 python
210630 python210630 python
210630 python
 
210526 Power Automate Desktop Python
210526 Power Automate Desktop Python210526 Power Automate Desktop Python
210526 Power Automate Desktop Python
 
210428 python
210428 python210428 python
210428 python
 
200918 hannari-python
200918 hannari-python200918 hannari-python
200918 hannari-python
 
200429 python
200429 python200429 python
200429 python
 
200325 flask
200325 flask200325 flask
200325 flask
 
200208 osh-nishimoto-v2
200208 osh-nishimoto-v2200208 osh-nishimoto-v2
200208 osh-nishimoto-v2
 
191208 python-kansai-nishimoto
191208 python-kansai-nishimoto191208 python-kansai-nishimoto
191208 python-kansai-nishimoto
 
191101 nvda-sightworld-nishimoto
191101 nvda-sightworld-nishimoto191101 nvda-sightworld-nishimoto
191101 nvda-sightworld-nishimoto
 
191114 iotlt-nishimoto
191114 iotlt-nishimoto191114 iotlt-nishimoto
191114 iotlt-nishimoto
 
191030 anna-with-python
191030 anna-with-python191030 anna-with-python
191030 anna-with-python
 
190916 nishimoto-nvda-pyconjp
190916 nishimoto-nvda-pyconjp190916 nishimoto-nvda-pyconjp
190916 nishimoto-nvda-pyconjp
 
190925 python-windows
190925 python-windows190925 python-windows
190925 python-windows
 
190731 chalice
190731 chalice190731 chalice
190731 chalice
 
190719 nishimoto nvda talk
190719 nishimoto nvda talk190719 nishimoto nvda talk
190719 nishimoto nvda talk
 
190516 nishimoto
190516 nishimoto190516 nishimoto
190516 nishimoto
 
Iotlt190202 v1
Iotlt190202 v1Iotlt190202 v1
Iotlt190202 v1
 
181226 txt2tags
181226 txt2tags181226 txt2tags
181226 txt2tags
 
181006 nishimoto-kaggle
181006 nishimoto-kaggle181006 nishimoto-kaggle
181006 nishimoto-kaggle
 
180923 osc18hi coderdojo nishimoto
180923 osc18hi coderdojo nishimoto180923 osc18hi coderdojo nishimoto
180923 osc18hi coderdojo nishimoto
 

Recently uploaded

Recently uploaded (10)

論文紹介: The Surprising Effectiveness of PPO in Cooperative Multi-Agent Games
論文紹介: The Surprising Effectiveness of PPO in Cooperative Multi-Agent Games論文紹介: The Surprising Effectiveness of PPO in Cooperative Multi-Agent Games
論文紹介: The Surprising Effectiveness of PPO in Cooperative Multi-Agent Games
 
新人研修 後半 2024/04/26の勉強会で発表されたものです。
新人研修 後半        2024/04/26の勉強会で発表されたものです。新人研修 後半        2024/04/26の勉強会で発表されたものです。
新人研修 後半 2024/04/26の勉強会で発表されたものです。
 
論文紹介:Selective Structured State-Spaces for Long-Form Video Understanding
論文紹介:Selective Structured State-Spaces for Long-Form Video Understanding論文紹介:Selective Structured State-Spaces for Long-Form Video Understanding
論文紹介:Selective Structured State-Spaces for Long-Form Video Understanding
 
Amazon SES を勉強してみる その22024/04/26の勉強会で発表されたものです。
Amazon SES を勉強してみる その22024/04/26の勉強会で発表されたものです。Amazon SES を勉強してみる その22024/04/26の勉強会で発表されたものです。
Amazon SES を勉強してみる その22024/04/26の勉強会で発表されたものです。
 
Utilizing Ballerina for Cloud Native Integrations
Utilizing Ballerina for Cloud Native IntegrationsUtilizing Ballerina for Cloud Native Integrations
Utilizing Ballerina for Cloud Native Integrations
 
LoRaWANスマート距離検出センサー DS20L カタログ LiDARデバイス
LoRaWANスマート距離検出センサー  DS20L  カタログ  LiDARデバイスLoRaWANスマート距離検出センサー  DS20L  カタログ  LiDARデバイス
LoRaWANスマート距離検出センサー DS20L カタログ LiDARデバイス
 
論文紹介:Video-GroundingDINO: Towards Open-Vocabulary Spatio-Temporal Video Groun...
論文紹介:Video-GroundingDINO: Towards Open-Vocabulary Spatio-Temporal Video Groun...論文紹介:Video-GroundingDINO: Towards Open-Vocabulary Spatio-Temporal Video Groun...
論文紹介:Video-GroundingDINO: Towards Open-Vocabulary Spatio-Temporal Video Groun...
 
Amazon SES を勉強してみる その32024/04/26の勉強会で発表されたものです。
Amazon SES を勉強してみる その32024/04/26の勉強会で発表されたものです。Amazon SES を勉強してみる その32024/04/26の勉強会で発表されたものです。
Amazon SES を勉強してみる その32024/04/26の勉強会で発表されたものです。
 
LoRaWAN スマート距離検出デバイスDS20L日本語マニュアル
LoRaWAN スマート距離検出デバイスDS20L日本語マニュアルLoRaWAN スマート距離検出デバイスDS20L日本語マニュアル
LoRaWAN スマート距離検出デバイスDS20L日本語マニュアル
 
知識ゼロの営業マンでもできた!超速で初心者を脱する、悪魔的学習ステップ3選.pptx
知識ゼロの営業マンでもできた!超速で初心者を脱する、悪魔的学習ステップ3選.pptx知識ゼロの営業マンでもできた!超速で初心者を脱する、悪魔的学習ステップ3選.pptx
知識ゼロの営業マンでもできた!超速で初心者を脱する、悪魔的学習ステップ3選.pptx
 

PCN 190630 v2