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
2017.01.16 Embedded system
Search
blue chen
January 16, 2017
Technology
0
83
2017.01.16 Embedded system
blue chen
January 16, 2017
Tweet
Share
More Decks by blue chen
See All by blue chen
RelaJet Caption
iamblue
0
94
The future of hearing device - 聽覺領域新的機會及挑戰
iamblue
2
230
20180918-Digitime 導入MCU設計 催熟智慧語音辨識應用市場
iamblue
0
200
Pixnet hackthon - workshop
iamblue
0
94
AI 人工智慧學校分享
iamblue
0
380
Javascript -Full stack 物聯網開發
iamblue
0
110
MCS Lite 私有雲物聯網開發
iamblue
0
280
Blockchain for IoT 應用
iamblue
1
200
microlattice.js ( World of tech 2016 )
iamblue
1
280
Other Decks in Technology
See All in Technology
Databricksで完全履修!オールインワンレイクハウスは実在した!
akuwano
0
150
SnowflakeとDatabricks両方でRAGを構築してみた
kameitomohiro
1
580
Simplify! 10 ways to reduce complexity in software development
ufried
1
230
Twelve-Factor-Appから学ぶECS設計プラクティス/ECS practice for Twelve-Factor-App
ozawa
3
160
C++26アップデート 2025-03
faithandbrave
0
1.2k
Part2 GitHub Copilotってなんだろう
tomokusaba
1
530
CodeRabbitと過ごした1ヶ月 ─ AIコードレビュー導入で実感したチーム開発の進化
mitohato14
1
240
データベース04: SQL (1/3) 単純質問 & 集約演算
trycycle
PRO
0
720
LINE 購物幕後推手
line_developers_tw
PRO
0
370
ビジネスとデザインとエンジニアリングを繋ぐために 一人のエンジニアは何ができるか / What can a single engineer do to connect business, design, and engineering?
kaminashi
2
880
Gateway H2 モジュールで スマートホーム入門
minoruinachi
0
130
続・やっぱり余白が大切だった話
kakehashi
PRO
2
240
Featured
See All Featured
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
179
53k
It's Worth the Effort
3n
184
28k
Mobile First: as difficult as doing things right
swwweet
223
9.6k
Side Projects
sachag
453
42k
What's in a price? How to price your products and services
michaelherold
245
12k
Git: the NoSQL Database
bkeepers
PRO
430
65k
Measuring & Analyzing Core Web Vitals
bluesmoon
7
410
jQuery: Nuts, Bolts and Bling
dougneiner
63
7.7k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
105
19k
Building Better People: How to give real-time feedback that sticks.
wjessup
368
19k
A designer walks into a library…
pauljervisheath
205
24k
A Tale of Four Properties
chriscoyier
159
23k
Transcript
Blue
None
None
None
None
IT# Hardware# device## # # # # 近年年來來應⽤用. 服務 .
價值在 這裡發光發熱
IT# Hardware# device## # # # # Javascript# 近年年來來應⽤用. 服務
. 價值在 這裡發光發熱
全端物聯聯網開發 Javascript (Node.js) 不在僅是跑在 server 上 希望他可以跑在你我周遭的任何事物上 javascript 現在可以來來做 native
phone app, native desktop app, browser app, server … etc (投資報酬率較⼤大的選擇)
LinkIt™ Smart 7688 與 Node.js 的邂逅
> npm install express …. ran out of memory …
npm install 耗⽤用極⼤大 memory npm install ⼤大約基礎會耗掉接近 60 mb 的 memory
> opkg install node …. no space … 硬碟只有 16
MB, 只剩 4 mb 可⽤用空間 nodejs 在各平台⼤大約基礎會耗掉 6~8 mb 的 space
• MT7688 • 128MB DDR2 • 32MB Flash • Chip
Antenna (default) • IPEX Ext Antenna • microSD • USB Host • JTAG LinkIt Smart 7688
• MT7688 + ATmega32U4 • 128MB DDR2 • 32MB Flash
• Chip Antenna (default) • IPEX Ext Antenna • microSD • USB Host • JTAG LinkIt Smart 7688 Duo
MT7688& ATMega32U4+ Sensor USB device LinkIt Smart 7688 Duo MT7688&
Sensor USB device LinkIt Smart 7688
MPU ( Microproccess Unit) MCU (MIcrocontroller Unit) 1. ⼯工作時脈幾百MHz 2.
MB 等級的 RAM 3. 含有 MMU 可以跑完整的 Linux 1. ⼯工作時脈 100MHz 以下 2. KB 等級的 RAM 3. Real-time OS : freeRTOS …etc
MT7688& ATMega32U4+ Sensor USB device LinkIt Smart 7688 Duo MT7688&
Sensor USB device LinkIt Smart 7688 MPU, 邏輯端運算 MCU, Real-time control
先從⼀一般基本跑得動 Node.js (javascript) 情境來來談 Nodejs OS Applicaton 想像⼀一下各位現有的 server 如何跑
Node.js(javascript) ? 規格 架構 Linux, openWRT…etc 硬碟⾄至少要 1X mb, RAM 建議⾄至少要 64 mb
MT7688& ATMega32U4+ Sensor USB device LinkIt Smart 7688 Duo MT7688&
Sensor USB device LinkIt Smart 7688 MPU, 邏輯端運算 MCU, Real-time control Node.js 跑在這
關於開發版的外型
總結硬體介⾯面上 7688 擁有三個領域的玩法 USB device Sensor Wifi, OS driver/pkg
Node.js需要有其他的軟體架構擴充 對嵌入式開發板⽽而⾔言 1.PWM, GPIO, I2C …. etc ( libmraa )
2.跟 MCU 端溝通 ( node-serialport, firmata ) 3.USB device ( node-hid )
NodeJS ( v0.12.7 ) node-serialport node-hid Firmata, cylonJS Your application
OpenWRT OS (Wifi, driver) (MCU 溝通) (MCU 溝通) mraa (USB)
7688 OpenWRT OS 完全開源 1. OpenWRT 創始⼈人之⼀一親⾃自操⼑刀使⽤用最新 15.05 架構製作 2.
全部開源在 github 上 3. Upgrade all lib/pkg version
OpenWRT 重點玩法 1. full stack wifi: AP mode, Station mode
2. wifi Router/gateway 玩法 3. 超級豐富的 package, driver community
1. full stack wifi: AP mode, Station mode 2. wifi
Router/gateway 玩法 3. 超級豐富的 package, driver community OpenWRT 重點玩法
7688 Duo 外網網路路孔 外部網路路(有線網路路) <-> 7688 Duo <-> 家⽤用裝置
1. full stack wifi: AP mode, Station mode 2. wifi
Router/gateway 玩法 3. 超級豐富的 package, driver community OpenWRT 重點玩法
OpenWRT package management > opkg update > opkg install 套件名
我們提供 opkg 清單: http://mirror2.openwrt.org/mt7688_v0.9/packages/
ruby, python, nodejs, lua, perl, php, erlang, javm, opencv, ffmpeg,
bluez … 找不到? 來來 contribute 吧!
Demo (mjpg-streamer)
Demo (CD-player) opkg update opkg install kmod-scsi-cdrom opkg install kmod-scsi-core
opkg install kmod-scsi-generic opkg install kmod-fs-isofs
NodeJS ( v0.10.27 ) node-serialport node-hid Firmata, cylonJS Your application
OpenWRT OS (Wifi, driver) (MCU 溝通) (MCU 溝通) mraa (USB)
USB device Sensor Wifi, OS driver/pkg 全部交給 OpenWRT mraa, node-serialport,
firmata node-hid
Demo (keyboard)
USB device Sensor Wifi, OS driver/pkg 全部交給 OpenWRT mraa, node-serialport,
firmata node-hid
MT7688& ATMega32U4+ Sensor ( mcu, mpu溝通) USB device LinkIt Smart
7688 Duo MT7688& Sensor ( libmraa ) USB device LinkIt Smart 7688
如何讓兩兩個晶片溝通? Duo 上玩 Arduino Sensor
node-serialport 接收對話 Firmata 把每個通道都打通 Digital 0~13 PWM i2C Arduino sensor
MT7688& ATMega32U4+ Linkit Smart 7688 Duo 相同的 baudrate下
MPU Atmega32U4 Application 101010000000 node-serialport framework Digital 0~13 PWM i2C
Arduino sensor Firmata 把每個通道都打通 LinkIt Smart 7688 Duo 相同的 baudrate下
Framework 的選擇
firmata 的效能及市場性問題 Duo 上玩 Arduino Sensor
firmata 的效能及市場性的問題 Firmata is not a good pattern MPU Atmega32U4
Application 101010000000 node-serialport framework Digital 0~13 PWM i2C Arduino sensor Firmata 把每個通道都打通 LinkIt Smart 7688 Duo 相同的 baudrate下
Firmata is not a good pattern MPU Atmega32U4 Application 101010000000
node-serialport framework Digital 0~13 PWM i2C Arduino sensor Firmata 把每個通道都打通 LinkIt Smart 7688 Duo 相同的 baudrate下 1 且所有運算都在 MPU 端 很多 sensor 只有 C 不提供 JS parser 2 firmata 的效能及市場性的問題
None
挑戰⼆二如何讓兩兩個晶片溝通 ? firmata ? Firmata is not a good pattern
MPU Atmega32U4 Application node-serialport framework Digital 0~13 PWM i2C Arduino sensor LinkIt Smart 7688 Duo 相同的 baudrate下 運算在 MCU 端處理理好
挑戰⼆二如何讓兩兩個晶片溝通 ? firmata ? Firmata is not a good pattern
MPU Atmega32U4 Application 這是 blue 的指紋 node-serialport framework Digital 0~13 PWM i2C Arduino sensor LinkIt Smart 7688 Duo 相同的 baudrate下 運算在 MCU 端處理理好
讓兩兩顆晶片各司其職
Demo (指紋辨識機)
USB device Sensor Wifi, OS driver/pkg 全部交給 OpenWRT mraa, node-serialport,
firmata node-hid (指紋辨識機) (web cam, CD-player) (keyboard)
mcs.mediatek.com labs.mediatek.com
mcs.mediatek.com
/PEFKTປᆜTVQQPSU 48)8ປಆῘჷ -FWFSBHFBMM"SEVJOPTFOTPS 䌉ࡄ֥≐ڛ↩ⅴ⇼ ൲ᾁӑьၒ ಸၞΆೆਈ㸗ᾲ؍
Make it big with something small
感謝所有參參與 LinkIt smart 7688 專案的所有同仁