Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
LチカCraft
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
suzakutakumi
June 19, 2021
Programming
320
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
LチカCraft
Minecraft内でブロックを設置すると、LEDがつく。
suzakutakumi
June 19, 2021
More Decks by suzakutakumi
See All by suzakutakumi
ピクロス作成の中間発表
suzakutakumi
0
110
しゅみろん
suzakutakumi
0
190
trap-search
suzakutakumi
1
66
Pyramid Makerの作成
suzakutakumi
0
52
マークダウンパーサーの自作
suzakutakumi
0
130
絵文字ジェネレータボットの作成
suzakutakumi
0
170
send_discord
suzakutakumi
0
73
独自ドメインについて
suzakutakumi
0
67
ESP32とAlexaを用いたエアコン制御
suzakutakumi
0
1.4k
Other Decks in Programming
See All in Programming
AgentCore CLI で進化した AWS での AI エージェントの作り方 : 必要な機能を必要な時に
icoxfog417
PRO
3
370
変化を抱擁するドキュメントの作り方 - ビジネスルール駆動開発がもたらす、コードとの新しい関係
ioki
2
220
Starting & Sustaining Code-Based E2E Testing for Non-Coding QA Teams( #jasstniigata )
teyamagu
PRO
1
500
AWS Step Functions 大規模並列の壁を越える / jaws-sonic-2026-niigata-step-functions
kasacchiful
PRO
1
520
Intent as Code
shoppingjaws
6
1.1k
TiDB Cloudのカスタムコントローラーによるオートスケール対応
takaidohigasi
0
130
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
280
Heart of Swift Concurrency
koher
0
960
Are APIs Still Relevant in the AI Era?
soyuka
0
300
iOSDC Japan 2026 - Swiftで作って学ぼう!データベース自作入門
kaseken
2
330
FreeBSDでZabbixを動かす
kenkino
0
320
AI が書く Go コードの品質を劇的に向上させる Linter: “declscope”
mpyw
0
390
Featured
See All Featured
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.2k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.8k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
250
Ethics towards AI in product and experience design
skipperchong
2
380
My Coaching Mixtape
mlcsv
0
320
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
A Soul's Torment
seathinner
8
3.6k
Color Theory Basics | Prateek | Gurzu
gurzu
1
470
Raft: Consensus for Rubyists
vanstee
142
7.7k
Into the Great Unknown - MozCon
thekraken
41
2.7k
Transcript
LチカCraft 2021/06/19 IoTLT
自己紹介 HN:朱雀 匠(本名:鈴木 拓眞) Twitter: @suzakutakumi3
None
None
経緯 IoTに関するネタがない
経緯
経緯 そうだ! MinecraftのMODを作って、ArduinoとSerial通信しよう! (ちょうどJavaを学んだばっかだし)
Minecraftとは Minecraft(マインクラフト)は、マルクス・ペルソンとMojang Studiosの社員がJavaを用いて開 発したサンドボックスビデオゲームである。 日本国内では「マイクラ」と略称され[8][9][10]、サバイバル生活を楽しんだり、自由にブロックを配 置し建築等を楽しめる[11]。2009年にパブリックアルファ版としてリリースされたこのゲームは、 2011年11月に正式リリースされ、その頃にJens Bergenstenが開発を引き継いだ。それ以来 Minecraftはさまざまなプラットフォームに移植され、2019年5月時点でそれまで売上1位だった テトリスを抜き世界で最も売れたゲームとなった[12]。
Minecraftはいくつかの賞を受賞しており、影響力のあるビデオゲームの1つとして挙げられてい る。2020年6月には世界のビデオゲームの殿堂入りを果たした[13]。 Wikipedia:https://ja.wikipedia.org/wiki/Minecraft
作ったもの Minecraft内で、ブロックを置くと、LEDが光る
余談 今回の製作は昨日の23:00から徹夜で作りました このスライドを作ってるのも7:00頃です 言い訳 - 初心者向けのハッカソンイベントの講師が忙しかった - 2学期が始まったばかりで生活リズムが整っていない
Mod作り 詳しくは省きます 参考サイト: https://qiita.com/koteko/items/8d32c8819e3f9e6a333a https://github.com/Flanks255/simplylight とにかく、資料が少なかった。
Mod作り ブロックに関するクラスのあるメソッド @Override public void onBlockPlacedBy(@Nonnull World worldIn, @Nonnull BlockPos
pos, @Nonnull BlockState state, @Nullable LivingEntity placer, @Nonnull ItemStack stack) { super.onBlockPlacedBy(worldIn, pos, state, placer, stack); boolean powered = worldIn.isBlockPowered(pos); write.Write(); // シリアル通信をする関数 }
Serial通信 jSerialCommというライブライを使用しました こちらについても資料が全然なかった (合ってもシンプルなものではなかった) 参考サイ ト:https://forum.arduino.cc/t/jserialcomm-serial-communicati on-with-arduino-uno-fails/589181
Serial通信 try { for (int j = 0; j <
1000; ++j) out.write(1); //何故か複数回送らないと反応しない inputStream.read(); out.close(); inputStream.close(); } catch (Exception e) { e.printStackTrace(); } commPort.closePort();
デモ動画
まとめ ・Modに関しても、Javaでのシリアル通信に関しても情報源が少なすぎた ・一晩で作るものじゃない ・今後は、タクトスイッチを押したら、Minecraft内のランプが光るという、今回と逆のLチカ を使ってみたい