SlideShare a Scribd company logo
Micro Python 䛷 
⤌䜏㎸䜏 Python 
@hktechno 
Hirotaka Kawata
@hktechno 
ᕝ⏣ ⿱㈗ (䛛䜟䛯 䜂䜝䛯䛛) 
● PyCon JP 2013-2014 Staff (Program Team) 
● ⟃Ἴ኱Ꮫ 䝅䝇䝔䝮᝟ሗᕤᏛ◊✲⛉ 
䝁䞁䝢䝳䞊䝍䝃䜲䜶䞁䝇ᑓᨷ 
○ ಟኈ 1ᖺ 
● Open Design Computer Project 
○ 2011 ᮍ㋃IT䛺䜣䛸䛛 䝇䞊䝟䞊䜽䝸䜶䜲䝍䞊 
○ http://open-arch.org/
Micro Python 
● Python for microcontrollers 
○ 䝬䜲䝁䞁䛷౑䛘䜛 Python 
○ KICKSTARTER 䛷 97,803 GBP (⣙1500୓෇) ⋓ᚓ 
● The pyboard 
○ Micro Python ⏝䛾䝬䜲䝁䞁ᇶᯈ 
http://micropython.org/ 
㠃ⓑ䛭䛖
Micro Python 
● Python 3 ஫᥮䛾 Python ฎ⌮⣔ 
○ 䝬䜲䝁䞁ྥ䛡䛻෌ᐇ⿦ (CPython 䛷䛿䛺䛔) 
○ 䝷䜲䝤䝷䝸䜒ᇶᮏⓗ䛺䜒䛾䛿౑䛘䜛 
● 䝬䜲䝁䞁ୖ䛷 Python 䛜ື䛟 
○ Arduino 䛾䜘䛖䛺ᡭ㍍䛥 
○ 䛧䛛䜒 Python 䛷᭩䛡䜛 
○ Python ෆ䛷䜲䞁䝷䜲䞁䜰䝉䞁䝤䝷䛜౑䛘䛯䜚... (!!) 
● REPL 䜒౑䛘䜛 
○ 䝬䜲䝁䞁ୖ䛷䜲䞁䝍䝷䜽䝔䜱䝤䝅䜵䝹
The pyboard 
● Micro Python board 
○ STM32F4 (Cortex-M4) 
○ microSD slot 
○ microUSB 
○ Accelerometer 
○ 4 LED 
○ Switch… 
● KICKSTARTER 
○ $20 (early-bird price) 
○ $24
vs Raspberry Pi 
● GPIO 
○ Raspberry Pi 䛿䛱䜗䛳䛸ᑡ䛺䜑 
○ (Type B+ 䛷ᑡ䛧ቑ䛘䜎䛧䛯) 
● Price 
○ 3940෇... 
● 㛤Ⓨ䛜㠃ಽ䛟䛥䛔 
○ Raspberry Pi 䛾 Linux 䛷㛤Ⓨ䛩䜛 or SSH 
○ 䛭䜒䛭䜒䝬䜲䝁䞁䛷䛿䛺䛔...
vs mruby 
ᛮ᝿䛾㐪䛔 
● mruby 
○ ⤌䜏㎸䜏ᶵჾ䛷 C 䛛䜙 Ruby 䜢ᢅ䛖 
○ 䝋䝣䝖䜴䜵䜰䛻⤌䜏㎸䜏䜒䛷䛝䜛 (Lua 䛾䜘䛖䛺) 
○ ୺䛻䚸䝞䜲䝖䝁䞁䝟䜲䝹䛧䛯䝞䜲䝘䝸䜢ᢞධ 
● Micro Python 
○ Python 䛷ᇶᮏⓗ䛻᏶⤖䛩䜛 
○ 䝬䜲䝁䞁䚸䝩䝡䞊⏝㏵ྥ䛡 
○ Python 䝇䜽䝸䝥䝖䜢᭩䛝㎸䜐 
○ REPL 䛷䜲䞁䝍䝷䜽䝔䜱䝤䛻䜒᧯సྍ⬟
䛧䛛䛧... 
● pyboard 䛿⌧ᅾධᡭ୙ྍ⬟ 
○ KICKSTARTER 䛾㉎ධศ䛿Ⓨ㏦῭䜏 
○ ḟ䛾䝻䝑䝖䜢⏕⏘䛩䜛䜙䛧䛔䠛 
○ 䛹䛱䜙䛻䛧䛶䜒䛩䛠䛻䛿ධᡭ୙ྍ⬟... 
● ண䜑Ⓩ㘓䛧䛶䛒䛳䛯ே䛾ඛ⾜㈍኎䜒... 
○ ᡭඖ䛻౑䛘䜛䜹䞊䝗䛜䛺䛟䛶Ỵ῭ኻᩋ 
○ Out of stock! orz
ㅉ䜑䜛䛾䛿䜎䛰᪩䛔䟿
ᡭ㍍䛻 Micro Python 
● STM32F4 Discovery 
○ ST Micro ⣧ṇ䛾 STM32F407 ホ౯䝪䞊䝗 
○ ⛅᭶㟁Ꮚ㏻ၟ䛷 1,750 ෇ 
● ᶵ⬟ 
○ 192KB RAM 
○ 1MB Flash 
○ LED x 4 
○ Accelerometer 
○ D-class AMP 
○ Microphone 
○ USB (mini + micro)
STM32F4 Disvoery ‽ഛ 
● Micro Python 䝉䝑䝖䜰䝑䝥᪉ἲ 
○ https://github. 
com/micropython/micropython/wiki/Board- 
STM32F407-Discovery 
$ cd stmhal 
$ make BOARD=STM32F4DISC 
● 䝣䜯䞊䝮䜴䜵䜰䜢᭩䛝᥮䛘䜛ᚲせ䛜䛒䜛 
○ BOOT0 - Vdd 䜢䝅䝵䞊䝖 
■ ⿬ഃ䛾䝆䝱䞁䝟䜢౑䛖䛸䜘䛔 (JP2, JP3) 
○ DFU (dfu-util) 䛷 build/flash.dfu 䜢᭩䛝㎸䜏 
■ microUSB 䛾᪉䜢౑䛖䚹䛯䛰䛧㟁※౪⤥䛥䜜䛺䛔䛾䛷୧᪉่䛩䚹
᥋⥆䞉᭩䛝㎸䜏 
● USB 䝇䝖䝺䞊䝆䛸䛧䛶ㄆ㆑䛩䜛 
○ boot.py: ㉳ື᫬䛻ᐇ⾜䛥䜜䜛 
○ main.py: 䝯䜲䞁䝥䝻䜾䝷䝮 
○ 䝋䞊䝇 (main.py) 䜢䝁䝢䞊䛩䜛䛰䛡䛷Ⰻ䛔 
○ ⮬ศ䛷స䛳䛯䝰䝆䝳䞊䝹䜒᭩䛝㎸䜏䞉฼⏝䛷䛝䜛 
● REPL 䜢❧䛱ୖ䛢䜛 
○ USB ௬᝿䝅䝸䜰䝹䝫䞊䝖䜒స䜙䜜䜛 
■ Linux 䛾ሙྜ /dev/ttyACM0 
○ ᥋⥆䛩䜛䛸 Micro Python REPL 䝅䜵䝹䛜౑䛘䜛
pyb Module 
● pyboard 䜢᧯స䛩䜛䝰䝆䝳䞊䝹 
○ pyb.Pin 
○ pyb.LED 
○ pyb.Switch 
○ pyb.SPI 
○ pyb.I2C 
○ pyb.UART... 
○ http://micropython.org/doc/module/pyb/ 
● pyboard ྥ䛡䛰䛜... 
○ Discovery 䝪䞊䝗䛷䜒୍㒊䛿฼⏝ྍ⬟
Micro Python REPL 
● Python 䛾 REPL 䛸䜋䜌ྠ䛨 
○ 䜲䞁䝍䝷䜽䝔䜱䝤䛻䝬䜲䝁䞁䜢᧯స䛷䛝䜛 
○ 䝕䝞䝑䜾䛻౽฼ 
○ 䝰䝆䝳䞊䝹䜢᭩䛝㎸䜣䛷䛚䛡䜀䚸䛭䜜䜒౑䛘䜛 
● Ctrl-D 䛷 soft-reset 
○ main.py 䜔䝰䝆䝳䞊䝹䜢᭩䛝᥮䛘䛯᫬䛻౑䛖 
● Ctrl-C 䛷 interrupt 
○ main.py 䛾ᐇ⾜䜢Ṇ䜑䜛
LED ON / OFF 
● 䛸䜚䛒䛘䛪 L 䝏䜹 
led = pyb.LED(1) 
while True: 
led.off() 
pyb.delay(500) 
led.on() 
pyb.delay(500) 
䛣䜜䛷䜒䜘䛔 
led = pyb.LED(1) 
while True: 
led.toggle() 
pyb.delay(500)
Switch 
● Switch 䛷 Callback 䛜౑䛘䜛 
def toggle(): 
pyb.LED(1).toggle() 
pyb.delay(10) 
sw = pyb.Switch() 
sw.callback(toggle)
GPIO 
● pyb.Pin 䜢౑䛖 
pin = pyb.Pin(pyb.Pin.board.PD2, 
pyb.Pin.OUT_PP) 
pin.high() 
pin.low() 
pin_value = pin.value() 
pin.value(False) # => pin.low()
STM32F4DISC STAccel 
● 䠎✀㢮䛾ຍ㏿ᗘ䝉䞁䝃䞊 
○ 䝪䞊䝗䛾䝻䝑䝖䛻䜘䛳䛶㐪䛖 
○ LIS302DL (ྂ䛔) 
○ LIS3DSH (᪂䛧䛔, 㧗ᶵ⬟) 
● staccel.py : STAccel # pyb.Accel 䛿 pyboard ᑓ⏝ 
○ ᡭ㍍䛻ຍ㏿ᗘ䝉䞁䝃䜢ᢅ䛘䜛䝰䝆䝳䞊䝹 
○ stmhal/boards/STM32F4DISC/staccel.py 
○ LIS3DSH ᑐᛂ䝟䝑䝏䜢ᢞ䛢䛶 merge 䛥䜜䛯 
○ https://github.com/micropython/micropython/pull/852
LCD 
ᕷ㈍䛾 LCD 䜢౑䛖 # pyb.LCD 䛿䚸pyboard ᑓ⏝ 
● SC1602 䝅䝸䞊䝈 (ᐃ␒䛾䜰䝺) 
○ ⛅᭶㟁Ꮚ㏻ၟ䛷኎䛳䛶䜎䛩 
○ 䝞䝑䜽䝷䜲䝖䛺䛧䛷䛒䜜䜀 500 ෇䛛䜙 
● Python 䛷 LCD 䝗䝷䜲䝞䜢᭩䛔䛶䜏䜎䛧䛯 
○ https://github.com/techno/micropython_modules 
○ sc1602.py
䛔䜝䛔䜝 DEMO
Performance 
● (ᙜ䛯䜚๓䛰䛡䛹) ⤖ᵓ㐜䛔 
○ Teensy 3.1 (96MHz ARM) 
○ C++ (Arduino like) 䛸䛟䜙䜉䛶䚸⣙ 100 ಸ㐜䛔 
○ https://github. 
com/micropython/micropython/wiki/Performance 
● Arduino 䛷༑ศ䛺⏝㏵䛺䜙ၥ㢟䛻䛺䜙䛺䛔 
○ Arduino Pro Mini (C++) 䛛䜙ẚ䜉䛶4ಸ䛠䜙䛔 
○ 䛫䛳䛛䛟㏿䛔䜽䝻䝑䜽ᩘ䛿↓㥏䛻䛺䜛䛜...
Inline Assembly 
䜲䞁䝷䜲䞁䜰䝉䞁䝤䝷䛾౛ 
@micropython.asm_thumb 
def asm_add(r0, r1): 
add(r0, r0, r1)
Development Sprint 
● 14᪥ Development Sprint 䜔䜚䜎䛩 
○ http://pyconjp.connpass.com/event/8105/ 
● Micro Python Sprint 
○ ゐ䛳䛯䛣䛸䛺䛔ே䛷䜒 OK 
○ STM32F4 Discovery 䝪䞊䝗䜢ᣢ䛳䛶䛟䜛䛸 Better 
● 䜔䜚䛯䛔䛣䛸䛸䛛 
○ 䝪䞊䝗ᦚ㍕䛾D⣭䜰䞁䝥䞉䝬䜲䜽䛾䝗䝷䜲䝞 
○ ௚䛾䝪䞊䝗䜈⛣᳜
௚䛾䝬䜲䝁䞁䜈䛾⛣᳜ 
● GR-SAKURA 䜈⛣᳜䜢ヨ䜏䛯 
○ Renesas RX63N 
● 㐍ᤖ 
○ 䜲䞁䝍䝥䝸䝍䛿ື䛔䛯 
○ print 䛿䛷䛝䜛 
○ 䜎䛰: pyb 䝰䝆䝳䞊䝹 
○ 䜎䛰: REPL 
⤖ㄽ: 䜎䛰STM32௨እ䛻⛣᳜䛩䜛䛾䛿኱ኚ䛭䛖 
⯆࿡䛜䛒䛳䛯䜙 Sprint or Office hour 䛷...
䜎䛸䜑 
● Micro Python 䛺䛛䛺䛛䜘䛥䛭䛖 
○ 䛯䛰䛧䚸䜎䛰䜎䛰ᨵၿ䛾వᆅ䛜䛒䜚䛭䛖 
○ ௚䛾䝪䞊䝗䜈䛾⛣᳜䛻ᮇᚅ 
● Raspberry Pi ౑䛳䛯䜋䛖䛜Ⰻ䛥䛭䛖䛺⏝㏵ 
○ 䝛䝑䝖䝽䞊䜽 
○ Wi-Fi, Bluetooth 
○ USB… 
䝪䞊䝗䛰䛡䛷᏶⤖䛩䜛䛺䜙 Micro Python䟿
Micro Python で組み込み Python
Ad

More Related Content

What's hot (17)

Introduction to IPython & Notebook
Introduction to IPython & NotebookIntroduction to IPython & Notebook
Introduction to IPython & Notebook
Areski Belaid
 
IFB cloud: Integration of snakemake workflows in an appliance designed for Ch...
IFB cloud: Integration of snakemake workflows in an appliance designed for Ch...IFB cloud: Integration of snakemake workflows in an appliance designed for Ch...
IFB cloud: Integration of snakemake workflows in an appliance designed for Ch...
Claire Rioualen
 
機器學習應用於蔬果辨識
機器學習應用於蔬果辨識機器學習應用於蔬果辨識
機器學習應用於蔬果辨識
Kobe Yu
 
DIY GPS Logger 20130413 #mbed_fest_w
DIY GPS Logger 20130413 #mbed_fest_wDIY GPS Logger 20130413 #mbed_fest_w
DIY GPS Logger 20130413 #mbed_fest_w
Toshihisa Tanaka
 
BKK16-503 Undefined Behavior and Compiler Optimizations – Why Your Program St...
BKK16-503 Undefined Behavior and Compiler Optimizations – Why Your Program St...BKK16-503 Undefined Behavior and Compiler Optimizations – Why Your Program St...
BKK16-503 Undefined Behavior and Compiler Optimizations – Why Your Program St...
Linaro
 
Tools for FPGA Development
Tools for FPGA DevelopmentTools for FPGA Development
Tools for FPGA Development
Brahim HAMADICHAREF
 
Inside Buzztter
Inside BuzztterInside Buzztter
Inside Buzztter
Yoji Shidara
 
D1T3-Anto-Joseph-Droid-FF
D1T3-Anto-Joseph-Droid-FFD1T3-Anto-Joseph-Droid-FF
D1T3-Anto-Joseph-Droid-FF
Anthony Jose
 
Comparing On-The-Fly Accelerating Packages: Numba, TensorFlow, Dask, etc
Comparing On-The-Fly Accelerating Packages: Numba, TensorFlow, Dask, etcComparing On-The-Fly Accelerating Packages: Numba, TensorFlow, Dask, etc
Comparing On-The-Fly Accelerating Packages: Numba, TensorFlow, Dask, etc
Yukio Okuda
 
The str/bytes nightmare before python2 EOL
The str/bytes nightmare before python2 EOLThe str/bytes nightmare before python2 EOL
The str/bytes nightmare before python2 EOL
Kir Chou
 
自律移動ロボット向けハード・ソフト協調のためのコンポーネント設計支援ツール
自律移動ロボット向けハード・ソフト協調のためのコンポーネント設計支援ツール自律移動ロボット向けハード・ソフト協調のためのコンポーネント設計支援ツール
自律移動ロボット向けハード・ソフト協調のためのコンポーネント設計支援ツール
Kazushi Yamashina
 
Free Mobile - when Android is not enough
Free Mobile - when Android is not enoughFree Mobile - when Android is not enough
Free Mobile - when Android is not enough
Sebastian Krzyszkowiak
 
Republic of IoT - Hackathon Hardware Kits Hands-on Labs
Republic of IoT - Hackathon Hardware Kits Hands-on LabsRepublic of IoT - Hackathon Hardware Kits Hands-on Labs
Republic of IoT - Hackathon Hardware Kits Hands-on Labs
Alwin Arrasyid
 
uRock @ Jserv Course Final
uRock @ Jserv Course Final uRock @ Jserv Course Final
uRock @ Jserv Course Final
宗凡 楊
 
Raspberry Pi and Amateur Radio
Raspberry Pi and Amateur RadioRaspberry Pi and Amateur Radio
Raspberry Pi and Amateur Radio
Kevin Hooke
 
Oktavia Search Engine - pyconjp2014
Oktavia Search Engine - pyconjp2014Oktavia Search Engine - pyconjp2014
Oktavia Search Engine - pyconjp2014
Yoshiki Shibukawa
 
FPGA処理をROSコンポーネント化する自動設計環境
FPGA処理をROSコンポーネント化する自動設計環境FPGA処理をROSコンポーネント化する自動設計環境
FPGA処理をROSコンポーネント化する自動設計環境
Kazushi Yamashina
 
Introduction to IPython & Notebook
Introduction to IPython & NotebookIntroduction to IPython & Notebook
Introduction to IPython & Notebook
Areski Belaid
 
IFB cloud: Integration of snakemake workflows in an appliance designed for Ch...
IFB cloud: Integration of snakemake workflows in an appliance designed for Ch...IFB cloud: Integration of snakemake workflows in an appliance designed for Ch...
IFB cloud: Integration of snakemake workflows in an appliance designed for Ch...
Claire Rioualen
 
機器學習應用於蔬果辨識
機器學習應用於蔬果辨識機器學習應用於蔬果辨識
機器學習應用於蔬果辨識
Kobe Yu
 
DIY GPS Logger 20130413 #mbed_fest_w
DIY GPS Logger 20130413 #mbed_fest_wDIY GPS Logger 20130413 #mbed_fest_w
DIY GPS Logger 20130413 #mbed_fest_w
Toshihisa Tanaka
 
BKK16-503 Undefined Behavior and Compiler Optimizations – Why Your Program St...
BKK16-503 Undefined Behavior and Compiler Optimizations – Why Your Program St...BKK16-503 Undefined Behavior and Compiler Optimizations – Why Your Program St...
BKK16-503 Undefined Behavior and Compiler Optimizations – Why Your Program St...
Linaro
 
D1T3-Anto-Joseph-Droid-FF
D1T3-Anto-Joseph-Droid-FFD1T3-Anto-Joseph-Droid-FF
D1T3-Anto-Joseph-Droid-FF
Anthony Jose
 
Comparing On-The-Fly Accelerating Packages: Numba, TensorFlow, Dask, etc
Comparing On-The-Fly Accelerating Packages: Numba, TensorFlow, Dask, etcComparing On-The-Fly Accelerating Packages: Numba, TensorFlow, Dask, etc
Comparing On-The-Fly Accelerating Packages: Numba, TensorFlow, Dask, etc
Yukio Okuda
 
The str/bytes nightmare before python2 EOL
The str/bytes nightmare before python2 EOLThe str/bytes nightmare before python2 EOL
The str/bytes nightmare before python2 EOL
Kir Chou
 
自律移動ロボット向けハード・ソフト協調のためのコンポーネント設計支援ツール
自律移動ロボット向けハード・ソフト協調のためのコンポーネント設計支援ツール自律移動ロボット向けハード・ソフト協調のためのコンポーネント設計支援ツール
自律移動ロボット向けハード・ソフト協調のためのコンポーネント設計支援ツール
Kazushi Yamashina
 
Free Mobile - when Android is not enough
Free Mobile - when Android is not enoughFree Mobile - when Android is not enough
Free Mobile - when Android is not enough
Sebastian Krzyszkowiak
 
Republic of IoT - Hackathon Hardware Kits Hands-on Labs
Republic of IoT - Hackathon Hardware Kits Hands-on LabsRepublic of IoT - Hackathon Hardware Kits Hands-on Labs
Republic of IoT - Hackathon Hardware Kits Hands-on Labs
Alwin Arrasyid
 
uRock @ Jserv Course Final
uRock @ Jserv Course Final uRock @ Jserv Course Final
uRock @ Jserv Course Final
宗凡 楊
 
Raspberry Pi and Amateur Radio
Raspberry Pi and Amateur RadioRaspberry Pi and Amateur Radio
Raspberry Pi and Amateur Radio
Kevin Hooke
 
Oktavia Search Engine - pyconjp2014
Oktavia Search Engine - pyconjp2014Oktavia Search Engine - pyconjp2014
Oktavia Search Engine - pyconjp2014
Yoshiki Shibukawa
 
FPGA処理をROSコンポーネント化する自動設計環境
FPGA処理をROSコンポーネント化する自動設計環境FPGA処理をROSコンポーネント化する自動設計環境
FPGA処理をROSコンポーネント化する自動設計環境
Kazushi Yamashina
 

Similar to Micro Python で組み込み Python (20)

CEDEC2014 Live Coding in C++
CEDEC2014 Live Coding in C++CEDEC2014 Live Coding in C++
CEDEC2014 Live Coding in C++
Seiya Ishibashi
 
Espruino - JavaScript for Microcontrollers
Espruino - JavaScript for MicrocontrollersEspruino - JavaScript for Microcontrollers
Espruino - JavaScript for Microcontrollers
Drew Fustini
 
CentOS 7 入門
CentOS 7 入門CentOS 7 入門
CentOS 7 入門
Shiojiri Ohhara
 
Python-in-Embedded-systems.pptx
Python-in-Embedded-systems.pptxPython-in-Embedded-systems.pptx
Python-in-Embedded-systems.pptx
TuynLCh
 
SoC Python Discussion Group
SoC Python Discussion GroupSoC Python Discussion Group
SoC Python Discussion Group
krishna_dubba
 
micro:bit and JavaScript
micro:bit and JavaScriptmicro:bit and JavaScript
micro:bit and JavaScript
Kenneth Geisshirt
 
Rusty Python
Rusty PythonRusty Python
Rusty Python
RangHo Lee
 
Qemu上でlagopusを動かした話
Qemu上でlagopusを動かした話Qemu上でlagopusを動かした話
Qemu上でlagopusを動かした話
Masaru Oki
 
Exploring Raspberry Pi
Exploring Raspberry PiExploring Raspberry Pi
Exploring Raspberry Pi
Lentin Joseph
 
DIY Home Smart Lighting System with Micropython - PyCon MY 2018
DIY Home Smart Lighting System with Micropython - PyCon MY 2018DIY Home Smart Lighting System with Micropython - PyCon MY 2018
DIY Home Smart Lighting System with Micropython - PyCon MY 2018
Tegar Imansyah
 
Raspberry Pi GPIO Tutorial - Make Your Own Game Console
Raspberry Pi GPIO Tutorial - Make Your Own Game ConsoleRaspberry Pi GPIO Tutorial - Make Your Own Game Console
Raspberry Pi GPIO Tutorial - Make Your Own Game Console
RICELEEIO
 
Dfrws eu 2014 rekall workshop
Dfrws eu 2014 rekall workshopDfrws eu 2014 rekall workshop
Dfrws eu 2014 rekall workshop
Tamas K Lengyel
 
Types - slice, map, new, make, struct - Gopherlabs
Types - slice, map, new, make, struct - Gopherlabs Types - slice, map, new, make, struct - Gopherlabs
Types - slice, map, new, make, struct - Gopherlabs
sangam biradar
 
ScratchGPIO, Raspberry Pi & BerryClip
ScratchGPIO, Raspberry Pi & BerryClipScratchGPIO, Raspberry Pi & BerryClip
ScratchGPIO, Raspberry Pi & BerryClip
David Dryden
 
Python入門 : 4日間コース社内トレーニング
Python入門 : 4日間コース社内トレーニングPython入門 : 4日間コース社内トレーニング
Python入門 : 4日間コース社内トレーニング
Yuichi Ito
 
I made some more expansion board for M5Stack
I made some more expansion  board for M5StackI made some more expansion  board for M5Stack
I made some more expansion board for M5Stack
Masawo Yamazaki
 
910383538.pptxnnnnnnnnnnnnnnnnnnnnnnnnnnnn
910383538.pptxnnnnnnnnnnnnnnnnnnnnnnnnnnnn910383538.pptxnnnnnnnnnnnnnnnnnnnnnnnnnnnn
910383538.pptxnnnnnnnnnnnnnnnnnnnnnnnnnnnn
divijareddy0502
 
BKK16-304 The State of GDB on AArch64
BKK16-304 The State of GDB on AArch64BKK16-304 The State of GDB on AArch64
BKK16-304 The State of GDB on AArch64
Linaro
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
nkrafacyberclub
 
Introduction to ipython notebook
Introduction to ipython notebookIntroduction to ipython notebook
Introduction to ipython notebook
Go Asgard
 
CEDEC2014 Live Coding in C++
CEDEC2014 Live Coding in C++CEDEC2014 Live Coding in C++
CEDEC2014 Live Coding in C++
Seiya Ishibashi
 
Espruino - JavaScript for Microcontrollers
Espruino - JavaScript for MicrocontrollersEspruino - JavaScript for Microcontrollers
Espruino - JavaScript for Microcontrollers
Drew Fustini
 
Python-in-Embedded-systems.pptx
Python-in-Embedded-systems.pptxPython-in-Embedded-systems.pptx
Python-in-Embedded-systems.pptx
TuynLCh
 
SoC Python Discussion Group
SoC Python Discussion GroupSoC Python Discussion Group
SoC Python Discussion Group
krishna_dubba
 
Qemu上でlagopusを動かした話
Qemu上でlagopusを動かした話Qemu上でlagopusを動かした話
Qemu上でlagopusを動かした話
Masaru Oki
 
Exploring Raspberry Pi
Exploring Raspberry PiExploring Raspberry Pi
Exploring Raspberry Pi
Lentin Joseph
 
DIY Home Smart Lighting System with Micropython - PyCon MY 2018
DIY Home Smart Lighting System with Micropython - PyCon MY 2018DIY Home Smart Lighting System with Micropython - PyCon MY 2018
DIY Home Smart Lighting System with Micropython - PyCon MY 2018
Tegar Imansyah
 
Raspberry Pi GPIO Tutorial - Make Your Own Game Console
Raspberry Pi GPIO Tutorial - Make Your Own Game ConsoleRaspberry Pi GPIO Tutorial - Make Your Own Game Console
Raspberry Pi GPIO Tutorial - Make Your Own Game Console
RICELEEIO
 
Dfrws eu 2014 rekall workshop
Dfrws eu 2014 rekall workshopDfrws eu 2014 rekall workshop
Dfrws eu 2014 rekall workshop
Tamas K Lengyel
 
Types - slice, map, new, make, struct - Gopherlabs
Types - slice, map, new, make, struct - Gopherlabs Types - slice, map, new, make, struct - Gopherlabs
Types - slice, map, new, make, struct - Gopherlabs
sangam biradar
 
ScratchGPIO, Raspberry Pi & BerryClip
ScratchGPIO, Raspberry Pi & BerryClipScratchGPIO, Raspberry Pi & BerryClip
ScratchGPIO, Raspberry Pi & BerryClip
David Dryden
 
Python入門 : 4日間コース社内トレーニング
Python入門 : 4日間コース社内トレーニングPython入門 : 4日間コース社内トレーニング
Python入門 : 4日間コース社内トレーニング
Yuichi Ito
 
I made some more expansion board for M5Stack
I made some more expansion  board for M5StackI made some more expansion  board for M5Stack
I made some more expansion board for M5Stack
Masawo Yamazaki
 
910383538.pptxnnnnnnnnnnnnnnnnnnnnnnnnnnnn
910383538.pptxnnnnnnnnnnnnnnnnnnnnnnnnnnnn910383538.pptxnnnnnnnnnnnnnnnnnnnnnnnnnnnn
910383538.pptxnnnnnnnnnnnnnnnnnnnnnnnnnnnn
divijareddy0502
 
BKK16-304 The State of GDB on AArch64
BKK16-304 The State of GDB on AArch64BKK16-304 The State of GDB on AArch64
BKK16-304 The State of GDB on AArch64
Linaro
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
nkrafacyberclub
 
Introduction to ipython notebook
Introduction to ipython notebookIntroduction to ipython notebook
Introduction to ipython notebook
Go Asgard
 
Ad

More from Hirotaka Kawata (13)

Kotest を使って 快適にテストを書こう - KotlinFest 2024
Kotest を使って 快適にテストを書こう - KotlinFest 2024Kotest を使って 快適にテストを書こう - KotlinFest 2024
Kotest を使って 快適にテストを書こう - KotlinFest 2024
Hirotaka Kawata
 
KotlinConf 2018 から見る 最近の Kotlin サーバーサイド事情
KotlinConf 2018 から見る 最近の Kotlin サーバーサイド事情KotlinConf 2018 から見る 最近の Kotlin サーバーサイド事情
KotlinConf 2018 から見る 最近の Kotlin サーバーサイド事情
Hirotaka Kawata
 
本当にわかる Spectre と Meltdown
本当にわかる Spectre と Meltdown本当にわかる Spectre と Meltdown
本当にわかる Spectre と Meltdown
Hirotaka Kawata
 
ゼロから始める自作 CPU 入門
ゼロから始める自作 CPU 入門ゼロから始める自作 CPU 入門
ゼロから始める自作 CPU 入門
Hirotaka Kawata
 
バイナリより低レイヤな話 (プロセッサの心を読み解く) - カーネル/VM探検隊@北陸1
バイナリより低レイヤな話 (プロセッサの心を読み解く) - カーネル/VM探検隊@北陸1バイナリより低レイヤな話 (プロセッサの心を読み解く) - カーネル/VM探検隊@北陸1
バイナリより低レイヤな話 (プロセッサの心を読み解く) - カーネル/VM探検隊@北陸1
Hirotaka Kawata
 
Introduction of PyCon JP 2014 in PyCon SG
Introduction of PyCon JP 2014 in PyCon SGIntroduction of PyCon JP 2014 in PyCon SG
Introduction of PyCon JP 2014 in PyCon SG
Hirotaka Kawata
 
自作コンピューターでなんかする - 第八回 カーネル/VM探検隊&懇親会
自作コンピューターでなんかする - 第八回 カーネル/VM探検隊&懇親会自作コンピューターでなんかする - 第八回 カーネル/VM探検隊&懇親会
自作コンピューターでなんかする - 第八回 カーネル/VM探検隊&懇親会
Hirotaka Kawata
 
産学間連携推進室(AC部屋) 2012 成果報告会
産学間連携推進室(AC部屋) 2012 成果報告会産学間連携推進室(AC部屋) 2012 成果報告会
産学間連携推進室(AC部屋) 2012 成果報告会
Hirotaka Kawata
 
30日でできない!コンピューター自作入門 - カーネル/VM探検隊@つくば
30日でできない!コンピューター自作入門 - カーネル/VM探検隊@つくば30日でできない!コンピューター自作入門 - カーネル/VM探検隊@つくば
30日でできない!コンピューター自作入門 - カーネル/VM探検隊@つくば
Hirotaka Kawata
 
seccamp2012 チューター発表
seccamp2012 チューター発表seccamp2012 チューター発表
seccamp2012 チューター発表
Hirotaka Kawata
 
Open Design Computer Project - Tsukuba.pm
Open Design Computer Project - Tsukuba.pmOpen Design Computer Project - Tsukuba.pm
Open Design Computer Project - Tsukuba.pm
Hirotaka Kawata
 
About University of Tsukuba Linux User Group
About University of Tsukuba Linux User GroupAbout University of Tsukuba Linux User Group
About University of Tsukuba Linux User Group
Hirotaka Kawata
 
Kotest を使って 快適にテストを書こう - KotlinFest 2024
Kotest を使って 快適にテストを書こう - KotlinFest 2024Kotest を使って 快適にテストを書こう - KotlinFest 2024
Kotest を使って 快適にテストを書こう - KotlinFest 2024
Hirotaka Kawata
 
KotlinConf 2018 から見る 最近の Kotlin サーバーサイド事情
KotlinConf 2018 から見る 最近の Kotlin サーバーサイド事情KotlinConf 2018 から見る 最近の Kotlin サーバーサイド事情
KotlinConf 2018 から見る 最近の Kotlin サーバーサイド事情
Hirotaka Kawata
 
本当にわかる Spectre と Meltdown
本当にわかる Spectre と Meltdown本当にわかる Spectre と Meltdown
本当にわかる Spectre と Meltdown
Hirotaka Kawata
 
ゼロから始める自作 CPU 入門
ゼロから始める自作 CPU 入門ゼロから始める自作 CPU 入門
ゼロから始める自作 CPU 入門
Hirotaka Kawata
 
バイナリより低レイヤな話 (プロセッサの心を読み解く) - カーネル/VM探検隊@北陸1
バイナリより低レイヤな話 (プロセッサの心を読み解く) - カーネル/VM探検隊@北陸1バイナリより低レイヤな話 (プロセッサの心を読み解く) - カーネル/VM探検隊@北陸1
バイナリより低レイヤな話 (プロセッサの心を読み解く) - カーネル/VM探検隊@北陸1
Hirotaka Kawata
 
Introduction of PyCon JP 2014 in PyCon SG
Introduction of PyCon JP 2014 in PyCon SGIntroduction of PyCon JP 2014 in PyCon SG
Introduction of PyCon JP 2014 in PyCon SG
Hirotaka Kawata
 
自作コンピューターでなんかする - 第八回 カーネル/VM探検隊&懇親会
自作コンピューターでなんかする - 第八回 カーネル/VM探検隊&懇親会自作コンピューターでなんかする - 第八回 カーネル/VM探検隊&懇親会
自作コンピューターでなんかする - 第八回 カーネル/VM探検隊&懇親会
Hirotaka Kawata
 
産学間連携推進室(AC部屋) 2012 成果報告会
産学間連携推進室(AC部屋) 2012 成果報告会産学間連携推進室(AC部屋) 2012 成果報告会
産学間連携推進室(AC部屋) 2012 成果報告会
Hirotaka Kawata
 
30日でできない!コンピューター自作入門 - カーネル/VM探検隊@つくば
30日でできない!コンピューター自作入門 - カーネル/VM探検隊@つくば30日でできない!コンピューター自作入門 - カーネル/VM探検隊@つくば
30日でできない!コンピューター自作入門 - カーネル/VM探検隊@つくば
Hirotaka Kawata
 
seccamp2012 チューター発表
seccamp2012 チューター発表seccamp2012 チューター発表
seccamp2012 チューター発表
Hirotaka Kawata
 
Open Design Computer Project - Tsukuba.pm
Open Design Computer Project - Tsukuba.pmOpen Design Computer Project - Tsukuba.pm
Open Design Computer Project - Tsukuba.pm
Hirotaka Kawata
 
About University of Tsukuba Linux User Group
About University of Tsukuba Linux User GroupAbout University of Tsukuba Linux User Group
About University of Tsukuba Linux User Group
Hirotaka Kawata
 
Ad

Recently uploaded (20)

seninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjj
seninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjjseninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjj
seninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjj
AjijahamadKhaji
 
Surveying through global positioning system
Surveying through global positioning systemSurveying through global positioning system
Surveying through global positioning system
opneptune5
 
Design of Variable Depth Single-Span Post.pdf
Design of Variable Depth Single-Span Post.pdfDesign of Variable Depth Single-Span Post.pdf
Design of Variable Depth Single-Span Post.pdf
Kamel Farid
 
Compiler Design_Syntax Directed Translation.pptx
Compiler Design_Syntax Directed Translation.pptxCompiler Design_Syntax Directed Translation.pptx
Compiler Design_Syntax Directed Translation.pptx
RushaliDeshmukh2
 
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G..."Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
Infopitaara
 
MODULE 03 - CLOUD COMPUTING- [BIS 613D] 2022 scheme.pptx
MODULE 03 - CLOUD COMPUTING-  [BIS 613D] 2022 scheme.pptxMODULE 03 - CLOUD COMPUTING-  [BIS 613D] 2022 scheme.pptx
MODULE 03 - CLOUD COMPUTING- [BIS 613D] 2022 scheme.pptx
Alvas Institute of Engineering and technology, Moodabidri
 
COMPUTER GRAPHICS AND VISUALIZATION :MODULE-02 notes [BCG402-CG&V].pdf
COMPUTER GRAPHICS AND VISUALIZATION :MODULE-02 notes [BCG402-CG&V].pdfCOMPUTER GRAPHICS AND VISUALIZATION :MODULE-02 notes [BCG402-CG&V].pdf
COMPUTER GRAPHICS AND VISUALIZATION :MODULE-02 notes [BCG402-CG&V].pdf
Alvas Institute of Engineering and technology, Moodabidri
 
W1 WDM_Principle and basics to know.pptx
W1 WDM_Principle and basics to know.pptxW1 WDM_Principle and basics to know.pptx
W1 WDM_Principle and basics to know.pptx
muhhxx51
 
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E..."Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
Infopitaara
 
How to Buy Snapchat Account A Step-by-Step Guide.pdf
How to Buy Snapchat Account A Step-by-Step Guide.pdfHow to Buy Snapchat Account A Step-by-Step Guide.pdf
How to Buy Snapchat Account A Step-by-Step Guide.pdf
jamedlimmk
 
Efficient Algorithms for Isogeny Computation on Hyperelliptic Curves: Their A...
Efficient Algorithms for Isogeny Computation on Hyperelliptic Curves: Their A...Efficient Algorithms for Isogeny Computation on Hyperelliptic Curves: Their A...
Efficient Algorithms for Isogeny Computation on Hyperelliptic Curves: Their A...
IJCNCJournal
 
Interfacing PMW3901 Optical Flow Sensor with ESP32
Interfacing PMW3901 Optical Flow Sensor with ESP32Interfacing PMW3901 Optical Flow Sensor with ESP32
Interfacing PMW3901 Optical Flow Sensor with ESP32
CircuitDigest
 
Prediction of Flexural Strength of Concrete Produced by Using Pozzolanic Mate...
Prediction of Flexural Strength of Concrete Produced by Using Pozzolanic Mate...Prediction of Flexural Strength of Concrete Produced by Using Pozzolanic Mate...
Prediction of Flexural Strength of Concrete Produced by Using Pozzolanic Mate...
Journal of Soft Computing in Civil Engineering
 
Applications of Centroid in Structural Engineering
Applications of Centroid in Structural EngineeringApplications of Centroid in Structural Engineering
Applications of Centroid in Structural Engineering
suvrojyotihalder2006
 
SICPA: Fabien Keller - background introduction
SICPA: Fabien Keller - background introductionSICPA: Fabien Keller - background introduction
SICPA: Fabien Keller - background introduction
fabienklr
 
Compiler Design Unit1 PPT Phases of Compiler.pptx
Compiler Design Unit1 PPT Phases of Compiler.pptxCompiler Design Unit1 PPT Phases of Compiler.pptx
Compiler Design Unit1 PPT Phases of Compiler.pptx
RushaliDeshmukh2
 
2025 Apply BTech CEC .docx
2025 Apply BTech CEC                 .docx2025 Apply BTech CEC                 .docx
2025 Apply BTech CEC .docx
tusharmanagementquot
 
Introduction to FLUID MECHANICS & KINEMATICS
Introduction to FLUID MECHANICS &  KINEMATICSIntroduction to FLUID MECHANICS &  KINEMATICS
Introduction to FLUID MECHANICS & KINEMATICS
narayanaswamygdas
 
ZJIT: Building a Next Generation Ruby JIT
ZJIT: Building a Next Generation Ruby JITZJIT: Building a Next Generation Ruby JIT
ZJIT: Building a Next Generation Ruby JIT
maximechevalierboisv1
 
Comprehensive-Event-Management-System.pptx
Comprehensive-Event-Management-System.pptxComprehensive-Event-Management-System.pptx
Comprehensive-Event-Management-System.pptx
dd7devdilip
 
seninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjj
seninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjjseninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjj
seninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjj
AjijahamadKhaji
 
Surveying through global positioning system
Surveying through global positioning systemSurveying through global positioning system
Surveying through global positioning system
opneptune5
 
Design of Variable Depth Single-Span Post.pdf
Design of Variable Depth Single-Span Post.pdfDesign of Variable Depth Single-Span Post.pdf
Design of Variable Depth Single-Span Post.pdf
Kamel Farid
 
Compiler Design_Syntax Directed Translation.pptx
Compiler Design_Syntax Directed Translation.pptxCompiler Design_Syntax Directed Translation.pptx
Compiler Design_Syntax Directed Translation.pptx
RushaliDeshmukh2
 
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G..."Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
Infopitaara
 
W1 WDM_Principle and basics to know.pptx
W1 WDM_Principle and basics to know.pptxW1 WDM_Principle and basics to know.pptx
W1 WDM_Principle and basics to know.pptx
muhhxx51
 
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E..."Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
Infopitaara
 
How to Buy Snapchat Account A Step-by-Step Guide.pdf
How to Buy Snapchat Account A Step-by-Step Guide.pdfHow to Buy Snapchat Account A Step-by-Step Guide.pdf
How to Buy Snapchat Account A Step-by-Step Guide.pdf
jamedlimmk
 
Efficient Algorithms for Isogeny Computation on Hyperelliptic Curves: Their A...
Efficient Algorithms for Isogeny Computation on Hyperelliptic Curves: Their A...Efficient Algorithms for Isogeny Computation on Hyperelliptic Curves: Their A...
Efficient Algorithms for Isogeny Computation on Hyperelliptic Curves: Their A...
IJCNCJournal
 
Interfacing PMW3901 Optical Flow Sensor with ESP32
Interfacing PMW3901 Optical Flow Sensor with ESP32Interfacing PMW3901 Optical Flow Sensor with ESP32
Interfacing PMW3901 Optical Flow Sensor with ESP32
CircuitDigest
 
Applications of Centroid in Structural Engineering
Applications of Centroid in Structural EngineeringApplications of Centroid in Structural Engineering
Applications of Centroid in Structural Engineering
suvrojyotihalder2006
 
SICPA: Fabien Keller - background introduction
SICPA: Fabien Keller - background introductionSICPA: Fabien Keller - background introduction
SICPA: Fabien Keller - background introduction
fabienklr
 
Compiler Design Unit1 PPT Phases of Compiler.pptx
Compiler Design Unit1 PPT Phases of Compiler.pptxCompiler Design Unit1 PPT Phases of Compiler.pptx
Compiler Design Unit1 PPT Phases of Compiler.pptx
RushaliDeshmukh2
 
Introduction to FLUID MECHANICS & KINEMATICS
Introduction to FLUID MECHANICS &  KINEMATICSIntroduction to FLUID MECHANICS &  KINEMATICS
Introduction to FLUID MECHANICS & KINEMATICS
narayanaswamygdas
 
ZJIT: Building a Next Generation Ruby JIT
ZJIT: Building a Next Generation Ruby JITZJIT: Building a Next Generation Ruby JIT
ZJIT: Building a Next Generation Ruby JIT
maximechevalierboisv1
 
Comprehensive-Event-Management-System.pptx
Comprehensive-Event-Management-System.pptxComprehensive-Event-Management-System.pptx
Comprehensive-Event-Management-System.pptx
dd7devdilip
 

Micro Python で組み込み Python

  • 1. Micro Python 䛷 ⤌䜏㎸䜏 Python @hktechno Hirotaka Kawata
  • 2. @hktechno ᕝ⏣ ⿱㈗ (䛛䜟䛯 䜂䜝䛯䛛) ● PyCon JP 2013-2014 Staff (Program Team) ● ⟃Ἴ኱Ꮫ 䝅䝇䝔䝮᝟ሗᕤᏛ◊✲⛉ 䝁䞁䝢䝳䞊䝍䝃䜲䜶䞁䝇ᑓᨷ ○ ಟኈ 1ᖺ ● Open Design Computer Project ○ 2011 ᮍ㋃IT䛺䜣䛸䛛 䝇䞊䝟䞊䜽䝸䜶䜲䝍䞊 ○ http://open-arch.org/
  • 3. Micro Python ● Python for microcontrollers ○ 䝬䜲䝁䞁䛷౑䛘䜛 Python ○ KICKSTARTER 䛷 97,803 GBP (⣙1500୓෇) ⋓ᚓ ● The pyboard ○ Micro Python ⏝䛾䝬䜲䝁䞁ᇶᯈ http://micropython.org/ 㠃ⓑ䛭䛖
  • 4. Micro Python ● Python 3 ஫᥮䛾 Python ฎ⌮⣔ ○ 䝬䜲䝁䞁ྥ䛡䛻෌ᐇ⿦ (CPython 䛷䛿䛺䛔) ○ 䝷䜲䝤䝷䝸䜒ᇶᮏⓗ䛺䜒䛾䛿౑䛘䜛 ● 䝬䜲䝁䞁ୖ䛷 Python 䛜ື䛟 ○ Arduino 䛾䜘䛖䛺ᡭ㍍䛥 ○ 䛧䛛䜒 Python 䛷᭩䛡䜛 ○ Python ෆ䛷䜲䞁䝷䜲䞁䜰䝉䞁䝤䝷䛜౑䛘䛯䜚... (!!) ● REPL 䜒౑䛘䜛 ○ 䝬䜲䝁䞁ୖ䛷䜲䞁䝍䝷䜽䝔䜱䝤䝅䜵䝹
  • 5. The pyboard ● Micro Python board ○ STM32F4 (Cortex-M4) ○ microSD slot ○ microUSB ○ Accelerometer ○ 4 LED ○ Switch… ● KICKSTARTER ○ $20 (early-bird price) ○ $24
  • 6. vs Raspberry Pi ● GPIO ○ Raspberry Pi 䛿䛱䜗䛳䛸ᑡ䛺䜑 ○ (Type B+ 䛷ᑡ䛧ቑ䛘䜎䛧䛯) ● Price ○ 3940෇... ● 㛤Ⓨ䛜㠃ಽ䛟䛥䛔 ○ Raspberry Pi 䛾 Linux 䛷㛤Ⓨ䛩䜛 or SSH ○ 䛭䜒䛭䜒䝬䜲䝁䞁䛷䛿䛺䛔...
  • 7. vs mruby ᛮ᝿䛾㐪䛔 ● mruby ○ ⤌䜏㎸䜏ᶵჾ䛷 C 䛛䜙 Ruby 䜢ᢅ䛖 ○ 䝋䝣䝖䜴䜵䜰䛻⤌䜏㎸䜏䜒䛷䛝䜛 (Lua 䛾䜘䛖䛺) ○ ୺䛻䚸䝞䜲䝖䝁䞁䝟䜲䝹䛧䛯䝞䜲䝘䝸䜢ᢞධ ● Micro Python ○ Python 䛷ᇶᮏⓗ䛻᏶⤖䛩䜛 ○ 䝬䜲䝁䞁䚸䝩䝡䞊⏝㏵ྥ䛡 ○ Python 䝇䜽䝸䝥䝖䜢᭩䛝㎸䜐 ○ REPL 䛷䜲䞁䝍䝷䜽䝔䜱䝤䛻䜒᧯సྍ⬟
  • 8. 䛧䛛䛧... ● pyboard 䛿⌧ᅾධᡭ୙ྍ⬟ ○ KICKSTARTER 䛾㉎ධศ䛿Ⓨ㏦῭䜏 ○ ḟ䛾䝻䝑䝖䜢⏕⏘䛩䜛䜙䛧䛔䠛 ○ 䛹䛱䜙䛻䛧䛶䜒䛩䛠䛻䛿ධᡭ୙ྍ⬟... ● ண䜑Ⓩ㘓䛧䛶䛒䛳䛯ே䛾ඛ⾜㈍኎䜒... ○ ᡭඖ䛻౑䛘䜛䜹䞊䝗䛜䛺䛟䛶Ỵ῭ኻᩋ ○ Out of stock! orz
  • 10. ᡭ㍍䛻 Micro Python ● STM32F4 Discovery ○ ST Micro ⣧ṇ䛾 STM32F407 ホ౯䝪䞊䝗 ○ ⛅᭶㟁Ꮚ㏻ၟ䛷 1,750 ෇ ● ᶵ⬟ ○ 192KB RAM ○ 1MB Flash ○ LED x 4 ○ Accelerometer ○ D-class AMP ○ Microphone ○ USB (mini + micro)
  • 11. STM32F4 Disvoery ‽ഛ ● Micro Python 䝉䝑䝖䜰䝑䝥᪉ἲ ○ https://github. com/micropython/micropython/wiki/Board- STM32F407-Discovery $ cd stmhal $ make BOARD=STM32F4DISC ● 䝣䜯䞊䝮䜴䜵䜰䜢᭩䛝᥮䛘䜛ᚲせ䛜䛒䜛 ○ BOOT0 - Vdd 䜢䝅䝵䞊䝖 ■ ⿬ഃ䛾䝆䝱䞁䝟䜢౑䛖䛸䜘䛔 (JP2, JP3) ○ DFU (dfu-util) 䛷 build/flash.dfu 䜢᭩䛝㎸䜏 ■ microUSB 䛾᪉䜢౑䛖䚹䛯䛰䛧㟁※౪⤥䛥䜜䛺䛔䛾䛷୧᪉่䛩䚹
  • 12. ᥋⥆䞉᭩䛝㎸䜏 ● USB 䝇䝖䝺䞊䝆䛸䛧䛶ㄆ㆑䛩䜛 ○ boot.py: ㉳ື᫬䛻ᐇ⾜䛥䜜䜛 ○ main.py: 䝯䜲䞁䝥䝻䜾䝷䝮 ○ 䝋䞊䝇 (main.py) 䜢䝁䝢䞊䛩䜛䛰䛡䛷Ⰻ䛔 ○ ⮬ศ䛷స䛳䛯䝰䝆䝳䞊䝹䜒᭩䛝㎸䜏䞉฼⏝䛷䛝䜛 ● REPL 䜢❧䛱ୖ䛢䜛 ○ USB ௬᝿䝅䝸䜰䝹䝫䞊䝖䜒స䜙䜜䜛 ■ Linux 䛾ሙྜ /dev/ttyACM0 ○ ᥋⥆䛩䜛䛸 Micro Python REPL 䝅䜵䝹䛜౑䛘䜛
  • 13. pyb Module ● pyboard 䜢᧯స䛩䜛䝰䝆䝳䞊䝹 ○ pyb.Pin ○ pyb.LED ○ pyb.Switch ○ pyb.SPI ○ pyb.I2C ○ pyb.UART... ○ http://micropython.org/doc/module/pyb/ ● pyboard ྥ䛡䛰䛜... ○ Discovery 䝪䞊䝗䛷䜒୍㒊䛿฼⏝ྍ⬟
  • 14. Micro Python REPL ● Python 䛾 REPL 䛸䜋䜌ྠ䛨 ○ 䜲䞁䝍䝷䜽䝔䜱䝤䛻䝬䜲䝁䞁䜢᧯స䛷䛝䜛 ○ 䝕䝞䝑䜾䛻౽฼ ○ 䝰䝆䝳䞊䝹䜢᭩䛝㎸䜣䛷䛚䛡䜀䚸䛭䜜䜒౑䛘䜛 ● Ctrl-D 䛷 soft-reset ○ main.py 䜔䝰䝆䝳䞊䝹䜢᭩䛝᥮䛘䛯᫬䛻౑䛖 ● Ctrl-C 䛷 interrupt ○ main.py 䛾ᐇ⾜䜢Ṇ䜑䜛
  • 15. LED ON / OFF ● 䛸䜚䛒䛘䛪 L 䝏䜹 led = pyb.LED(1) while True: led.off() pyb.delay(500) led.on() pyb.delay(500) 䛣䜜䛷䜒䜘䛔 led = pyb.LED(1) while True: led.toggle() pyb.delay(500)
  • 16. Switch ● Switch 䛷 Callback 䛜౑䛘䜛 def toggle(): pyb.LED(1).toggle() pyb.delay(10) sw = pyb.Switch() sw.callback(toggle)
  • 17. GPIO ● pyb.Pin 䜢౑䛖 pin = pyb.Pin(pyb.Pin.board.PD2, pyb.Pin.OUT_PP) pin.high() pin.low() pin_value = pin.value() pin.value(False) # => pin.low()
  • 18. STM32F4DISC STAccel ● 䠎✀㢮䛾ຍ㏿ᗘ䝉䞁䝃䞊 ○ 䝪䞊䝗䛾䝻䝑䝖䛻䜘䛳䛶㐪䛖 ○ LIS302DL (ྂ䛔) ○ LIS3DSH (᪂䛧䛔, 㧗ᶵ⬟) ● staccel.py : STAccel # pyb.Accel 䛿 pyboard ᑓ⏝ ○ ᡭ㍍䛻ຍ㏿ᗘ䝉䞁䝃䜢ᢅ䛘䜛䝰䝆䝳䞊䝹 ○ stmhal/boards/STM32F4DISC/staccel.py ○ LIS3DSH ᑐᛂ䝟䝑䝏䜢ᢞ䛢䛶 merge 䛥䜜䛯 ○ https://github.com/micropython/micropython/pull/852
  • 19. LCD ᕷ㈍䛾 LCD 䜢౑䛖 # pyb.LCD 䛿䚸pyboard ᑓ⏝ ● SC1602 䝅䝸䞊䝈 (ᐃ␒䛾䜰䝺) ○ ⛅᭶㟁Ꮚ㏻ၟ䛷኎䛳䛶䜎䛩 ○ 䝞䝑䜽䝷䜲䝖䛺䛧䛷䛒䜜䜀 500 ෇䛛䜙 ● Python 䛷 LCD 䝗䝷䜲䝞䜢᭩䛔䛶䜏䜎䛧䛯 ○ https://github.com/techno/micropython_modules ○ sc1602.py
  • 21. Performance ● (ᙜ䛯䜚๓䛰䛡䛹) ⤖ᵓ㐜䛔 ○ Teensy 3.1 (96MHz ARM) ○ C++ (Arduino like) 䛸䛟䜙䜉䛶䚸⣙ 100 ಸ㐜䛔 ○ https://github. com/micropython/micropython/wiki/Performance ● Arduino 䛷༑ศ䛺⏝㏵䛺䜙ၥ㢟䛻䛺䜙䛺䛔 ○ Arduino Pro Mini (C++) 䛛䜙ẚ䜉䛶4ಸ䛠䜙䛔 ○ 䛫䛳䛛䛟㏿䛔䜽䝻䝑䜽ᩘ䛿↓㥏䛻䛺䜛䛜...
  • 22. Inline Assembly 䜲䞁䝷䜲䞁䜰䝉䞁䝤䝷䛾౛ @micropython.asm_thumb def asm_add(r0, r1): add(r0, r0, r1)
  • 23. Development Sprint ● 14᪥ Development Sprint 䜔䜚䜎䛩 ○ http://pyconjp.connpass.com/event/8105/ ● Micro Python Sprint ○ ゐ䛳䛯䛣䛸䛺䛔ே䛷䜒 OK ○ STM32F4 Discovery 䝪䞊䝗䜢ᣢ䛳䛶䛟䜛䛸 Better ● 䜔䜚䛯䛔䛣䛸䛸䛛 ○ 䝪䞊䝗ᦚ㍕䛾D⣭䜰䞁䝥䞉䝬䜲䜽䛾䝗䝷䜲䝞 ○ ௚䛾䝪䞊䝗䜈⛣᳜
  • 24. ௚䛾䝬䜲䝁䞁䜈䛾⛣᳜ ● GR-SAKURA 䜈⛣᳜䜢ヨ䜏䛯 ○ Renesas RX63N ● 㐍ᤖ ○ 䜲䞁䝍䝥䝸䝍䛿ື䛔䛯 ○ print 䛿䛷䛝䜛 ○ 䜎䛰: pyb 䝰䝆䝳䞊䝹 ○ 䜎䛰: REPL ⤖ㄽ: 䜎䛰STM32௨እ䛻⛣᳜䛩䜛䛾䛿኱ኚ䛭䛖 ⯆࿡䛜䛒䛳䛯䜙 Sprint or Office hour 䛷...
  • 25. 䜎䛸䜑 ● Micro Python 䛺䛛䛺䛛䜘䛥䛭䛖 ○ 䛯䛰䛧䚸䜎䛰䜎䛰ᨵၿ䛾వᆅ䛜䛒䜚䛭䛖 ○ ௚䛾䝪䞊䝗䜈䛾⛣᳜䛻ᮇᚅ ● Raspberry Pi ౑䛳䛯䜋䛖䛜Ⰻ䛥䛭䛖䛺⏝㏵ ○ 䝛䝑䝖䝽䞊䜽 ○ Wi-Fi, Bluetooth ○ USB… 䝪䞊䝗䛰䛡䛷᏶⤖䛩䜛䛺䜙 Micro Python䟿