Slide 1

Slide 1 text

MicroPython × BLE × PyCon JP 2021 @puhitaku

Slide 2

Slide 2 text

TEPRA 2

Slide 3

Slide 3 text

https://twitter.com/ejo 090 /status/ 425 52 334 04 306 96 448 3

Slide 4

Slide 4 text

https://twitter.com/okayan 08 /status/ 7 972 55 664 46 460 10 89 4

Slide 5

Slide 5 text

https://twitter.com/okayan 08 /status/ 5 658 60 495 74 418 43 22 5

Slide 6

Slide 6 text

https://www.kingjim.co.jp/products/tepra/sr 37 0 .html 6

Slide 7

Slide 7 text

TEPRA Lite LR 30 TEPRA Lite LR 3 0 https://www.kingjim.co.jp/sp/lr 3 0 / 7

Slide 8

Slide 8 text

TEPRA Lite LR 30 https://www.kingjim.co.jp/sp/lr 3 0 / 8

Slide 9

Slide 9 text

TEPRA Lite LR 30 9

Slide 10

Slide 10 text

TEPRA Lite LR 30 
 https://www.kingjim.co.jp/products/tepra/sr 37 0 .html 10

Slide 11

Slide 11 text

TEPRA Lite LR 30 11

Slide 12

Slide 12 text

TEPRA Lite LR 30 12

Slide 13

Slide 13 text

13

Slide 14

Slide 14 text

Bluetooth Low Energy (BLE) https://www.kingjim.co.jp/sp/lr 3 0 /feature/index.html 14

Slide 15

Slide 15 text

Switch Science Bluefruit LE Sni ff er 15

Slide 16

Slide 16 text

Wireshark 16

Slide 17

Slide 17 text

BLE 17 💻 ⚡

Slide 18

Slide 18 text

PC Bluetooth 2 Bluetooth Bluez Linux BT Python BLE 18 😇

Slide 19

Slide 19 text

PC Bluetooth API 
 Wi-Fi BLE 🥰 BLE (ESP 3 2 ) 19 ESPr® Developer 32 https://www.switch-science.com/catalog/ 3 21 0 /

Slide 20

Slide 20 text

MicroPython × BLE × 20

Slide 21

Slide 21 text

MicroPython × BLE × Python json, time, asyncio (uasyncio), zlib batteries included CPython (REPL) 
 MicroPython machine 
 GPIO MicroPython 21

Slide 22

Slide 22 text

MicroPython × BLE × BLE bluetooth bluetooth.BLE IRQ API gattc_discover_services Service discovery prop_write_without_response Characteristic MicroPython BLE 22

Slide 23

Slide 23 text

MicroPython × BLE × 0x180f Battery Service … 0x2a19 Battery Level Characteristic 0xfff0 TEPRA Lite Service 0xfff1 TEPRA Lite Char. … Notify (RX) 0xfff2 TEPRA Lite Char. … Write Without Response (TX) ESP 3 2 Service Characteristic 23 Characteristic

Slide 24

Slide 24 text

MicroPython × BLE × 0xfff2 24 0 5

Slide 25

Slide 25 text

MicroPython × BLE × 25 f0 5c = 00 03 00 00 00 00 00 00 = 1 00 03 00 00 00 00 00 00 = 2

Slide 26

Slide 26 text

MicroPython × BLE × f0 5c 26

Slide 27

Slide 27 text

MicroPython × BLE × 1 27

Slide 28

Slide 28 text

MicroPython × BLE × 
 28

Slide 29

Slide 29 text

PC Wi-Fi ESP 3 2 29 💻 ⚡

Slide 30

Slide 30 text

MicroPython × BLE × 30 0 5 REST API zlib /prints POST

Slide 31

Slide 31 text

MicroPython × BLE × 31 0 5 CLI Pillow QR

Slide 32

Slide 32 text

REST API https://github.com/hugokernel/micropython- nanoweb asyncio Flask API Web API nanoweb 32

Slide 33

Slide 33 text

MicroPython × BLE × https://github.com/puhitaku/tepra-lite-esp32 33 GitHub

Slide 34

Slide 34 text

MicroPython 
 BLE 
 
 
 MicroPython 34

Slide 35

Slide 35 text

No content