Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
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
310
0
Share
LチカCraft
Minecraft内でブロックを設置すると、LEDがつく。
suzakutakumi
June 19, 2021
More Decks by suzakutakumi
See All by suzakutakumi
ピクロス作成の中間発表
suzakutakumi
0
100
しゅみろん
suzakutakumi
0
170
trap-search
suzakutakumi
1
53
Pyramid Makerの作成
suzakutakumi
0
34
マークダウンパーサーの自作
suzakutakumi
0
120
絵文字ジェネレータボットの作成
suzakutakumi
0
170
send_discord
suzakutakumi
0
58
独自ドメインについて
suzakutakumi
0
53
ESP32とAlexaを用いたエアコン制御
suzakutakumi
0
1.4k
Other Decks in Programming
See All in Programming
ハーネスエンジニアリングにどう向き合うか 〜ルールファイルを超えて開発プロセスを設計する〜 / How to approach harness engineering
rkaga
28
19k
運転動画を検索可能にする〜Cosmos-Embed1とDatabricks Vector Searchで〜/cosmos-embed1-databricks-vector-search
studio_graph
1
680
20260514 - build with ai 2026 - build LINE Bot with Gemini CLI
line_developers_tw
PRO
0
380
PHPer、Cloudflare に引っ越す
suguruooki
1
140
Import assertionsが消えた日~ECMAScriptの仕様はどう決まり、なぜ覆るのか~
bicstone
2
180
🦞OpenClaw works with AWS
licux
1
350
cloudnative conference 2026 flyle
azihsoyn
0
150
書き換えて学ぶTemporal #fukts
pirosikick
2
360
Terraform言語の静的解析 / static analysis of Terraform language
wata727
1
140
Are We Really Coding 10× Faster with AI?
kohzas
0
140
AlarmKitで明後日起きれるアラームアプリを作る
trickart
0
130
t *testing.T は どこからやってくるの?
otakakot
1
920
Featured
See All Featured
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
500
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
350
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4k
Music & Morning Musume
bryan
47
7.2k
How to Ace a Technical Interview
jacobian
281
24k
Building Applications with DynamoDB
mza
96
7k
Darren the Foodie - Storyboard
khoart
PRO
3
3.3k
Embracing the Ebb and Flow
colly
88
5k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.5k
Accessibility Awareness
sabderemane
1
110
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.2k
WCS-LA-2024
lcolladotor
0
580
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チカ を使ってみたい