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
JavaScript と Arduino でオリジナルデバイスを作ろう
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Yoshihiro Iwanaga
February 27, 2014
Technology
94
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
JavaScript と Arduino でオリジナルデバイスを作ろう
http://atnd.org/events/47308
Yoshihiro Iwanaga
February 27, 2014
More Decks by Yoshihiro Iwanaga
See All by Yoshihiro Iwanaga
HTTP2 最速実装v2
yoshi
0
140
Anomaly Detection by Mean and Standard Deviation
yoshi
0
180
WebComponents LT at AQ
yoshi
0
70
MHTML LT at AQ
yoshi
2
62
HOTATE (Developers Summit 2012)
yoshi
0
40
Anomaly detection using correlations of load
yoshi
0
62
Other Decks in Technology
See All in Technology
AI に書かせたその API、 “信頼” できますか?
nagix
0
110
range over func 2年間の軌跡 Issue #56413 はGoのエコシステムをどう変えたか
ryujicre8ive
0
190
あるけみー式LTスライド作成術
alchemy1115
1
210
俺の仕事は AIに奪われないし、たぶんその BIも要らない
hikaruri
0
490
LTのテーマ どうきめてる?〜5つの型と私のやり方〜
yama3133
1
110
アプリをもっと"iOSアプリっぽく"する小さな工夫 / Small Touches That Make Your App Feel More Like an iOS App
matsuji
1
900
AIネイティブプロダクトで顧客価値を最大化するプロダクトエンジニアとFDEの協働
righttouch
PRO
0
310
積み重なった技術負債への挑戦 〜初手としての全社ゴト化〜
techtekt
PRO
0
1.2k
Deployment の 先にある AI Agent 基盤 - kagent vNext、Agent Substrate、Hermes から読み解く Agent Runtime の現在地 / k8s-matsuri-2-ai-agent-platform-amsy810
masayaaoyama
3
580
バイブコーディング時代のWebアプリ開発入門~Cloud Runで学ぶセキュアなビルドとデプロイ
waiwai2111
1
130
銀行勘定系システムにおける開発プロセス刷新×AIによる環境モダナイゼーション / Development Process Transformation and AI-Driven Environment Modernization
muit
0
2.2k
研究開発部の紹介 / Sansan R&D Profile
sansan33
PRO
5
25k
Featured
See All Featured
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
50
10k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
500
What's in a price? How to price your products and services
michaelherold
247
13k
Being A Developer After 40
akosma
91
590k
Marketing to machines
jonoalderson
1
5.8k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
540
GitHub's CSS Performance
jonrohan
1033
470k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.6k
Typedesign – Prime Four
hannesfritz
42
3.2k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.7k
Context Engineering - Making Every Token Count
addyosmani
9
1.1k
Transcript
JavaScript と Arduino で オリジナルデバイスを作ろう html5j エンタメ技術部 第1回勉強会
話者 @y_iwanaga_ @quake_alert テレビより早い 地震速報
• ⾃自分で回路路を組み、 • ⾃自分のコードで操る 30分後: オリジナルデバイスを作れる状態
Arduino の役割:1. 出⼒力力 電流流を供給されて光る 電圧を発⽣生させる
センサーの 抵抗変化・電流流発⽣生 電圧を読み取る Arduino の役割:2. ⼊入⼒力力 0 V 〜~ 5V
→ 0 〜~ 1023 or 0, 1 に変換
必要な材料料 個別に買うのは⾯面倒くさい。キットを買えばいい。
(TechShare) 必要⼗十分なパーツ。安い。 Amazon で注⽂文し、2 ⽇日後に届いた。 Arduino エントリーキット オススメ
この後の流流れ • Arduino 基礎知識識 • 電⼦子回路路の組み⽅方 • ⾃自分のプログラムと連携させる⼿手順 • 応⽤用例例
この後の流流れ • Arduino 基礎知識識 • 電⼦子回路路の組み⽅方 • ⾃自分のプログラムと連携させる⼿手順 • 応⽤用例例
None
ここに USB ケーブルを挿して、PC とつなぐ
DIGITAL I/O 電圧をかける or 読み取る。
L, TX, RX インジケータ
GND 出⼒力力の終端をここにつなぐ。
Analog In 電圧値を細かく読み取りたいときはココに。
Power シールドに電源を供給するときはココから。
Reset ボタン 初期状態に戻したいときにプッシュ!
この後の流流れ • Arduino 基礎知識識 • 電⼦子回路路の組み⽅方 • ⾃自分のプログラムと連携させる⼿手順 • 応⽤用例例
Breadboard
Breadboard
例例
鉄の掟 パーツの 許容電流流 を守る。
過電流流が流流れて
こうなります。
使うべき抵抗値 [流流す電流流] [電源の電圧] − [パーツに加える電圧] = 電流流は抵抗で調節すればいい。 5 V 固定
パーツの仕様書で調べる ⇒ パーツが決まれば、⾃自動的に決まる。
この後の流流れ • Arduino 基礎知識識 • 電⼦子回路路の組み⽅方 • ⾃自分のプログラムと連携させる⼿手順 • 応⽤用例例
概要 Firmata protocol StandardFirmata
JavaScript ライブラリ johnny-five CylonJS
この後の流流れ • Arduino 基礎知識識 • 電⼦子回路路の組み⽅方 • ⾃自分のプログラムと連携させる⼿手順 • 応⽤用例例
回路路
コード var j5 = require('johnny-five'), arduino = new j5.Board(); arduino.on('ready',
function(){ var led = new j5.Led({ pin: 13 }); led.strobe(200); });
デモ
スイッチの ON/OFF を拾拾う
var j5 = require('johnny-five'), arduino = new j5.Board(); arduino.on('ready', function(){
var button = new j5.Button({ pin: 2, holdtime: 2000 }); button.on('down', function(){ console.log('button - on'); }); button.on('up', function(){ console.log('button - released'); }); button.on('hold', function(){ console.log('button - hold'); }); });
デモ
LEDとスイッチの組み合わせ
デモ
⾯面⽩白そうなネタ • IR レシーバ – リモコン操作 • ガスセンサー – おなら検知 ⇒
LED や Twitter で盛⼤大に通知 • ⼟土壌湿度度センサー – ⽔水やり時期を教えてもらう
良良い情報源 抵抗の⾒見見分け⽅方 http://part.freelab.jp/s_regi_list.html 回路路の作り⽅方 http://arduino.cc/en/Tutorial
今回の詳細 コード・回路路図はココからどうぞ。 github.com/ iwanaga/arduino-‐‑‒test