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
86
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
97
The future of hearing device - 聽覺領域新的機會及挑戰
iamblue
2
230
20180918-Digitime 導入MCU設計 催熟智慧語音辨識應用市場
iamblue
0
210
Pixnet hackthon - workshop
iamblue
0
95
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
2025advance01
minamizaki
0
130
金融システムをモダナイズするためのAmazon Elastic Kubernetes Service(EKS)ノウハウ大全
daitak
0
120
ゴリラ.vim #36 ~ Vim x SNS ~ スポンサーセッション
yasunori0418
1
320
Node−RED で Ollama を使ったローカルLLM(node-red-contrib-ollamaを利用) / ビジュアルプログラミングIoTLT vol.20
you
PRO
0
140
Houtou.pm #1
papix
0
650
LT:組込み屋さんのオシロが壊れた!
windy_pon
0
330
TypeScript と歩む OpenAPI の discriminator / OpenAPI discriminator with TypeScript
kaminashi
1
150
面接を通過するためにやってて良かったこと3選
sansantech
PRO
0
130
[zh-TW] DevOpsDays Taipei 2025 -- Creating Awesome Change in SmartNews!(machine translation)
martin_lover
1
610
アプリケーションの中身が見える!Mackerel APMの全貌と展望 / Mackerel APMリリースパーティ
mackerelio
0
430
積み上げられた技術資産と向き合いながら、プロダクトの信頼性をどう守るか
plaidtech
PRO
0
780
Zero Data Loss Autonomous Recovery Service サービス概要
oracle4engineer
PRO
2
7.2k
Featured
See All Featured
How to Think Like a Performance Engineer
csswizardry
23
1.6k
Building Better People: How to give real-time feedback that sticks.
wjessup
368
19k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
A designer walks into a library…
pauljervisheath
205
24k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
42
2.3k
Making the Leap to Tech Lead
cromwellryan
133
9.3k
GraphQLとの向き合い方2022年版
quramy
46
14k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
48
5.4k
[RailsConf 2023] Rails as a piece of cake
palkan
55
5.6k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
VelocityConf: Rendering Performance Case Studies
addyosmani
329
24k
Gamification - CAS2011
davidbonilla
81
5.3k
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 專案的所有同仁