---
title: SWEST21 s4b ReButton
tags: 
author: [MATSUOKA Takashi](https://www.docswell.com/user/matsujirushi)
site: [Docswell](https://www.docswell.com/)
thumbnail: https://bcdn.docswell.com/page/PER2V5GZ79.jpg?width=480
description: https://swest.toppers.jp/SWEST21/program/s4b.html#s4
published: September 06, 19
canonical: https://www.docswell.com/s/matsujirushi/KYWRXL-2024-01-17-212605
---
# Page. 1

![Page Image](https://bcdn.docswell.com/page/PER2V5GZ79.jpg)

SWEST21 s4b
ReButton
2019/9/6
Takashi Matsuoka


# Page. 2

![Page Image](https://bcdn.docswell.com/page/P7XDZKX1JX.jpg)

Takashi Matsuoka
(@matsujirushi12)
「e」3つ
2017～ MVP for Windows Development
Wio LTE
Wio 3G
Wio LTE M1/NB1(BG96)
MT3620
DevBoard
de:code 2019


# Page. 3

![Page Image](https://bcdn.docswell.com/page/37KX85WMJD.jpg)

Azure IoT Hub
- Cloud Gateway -
Cus tom Cloud
Ga teway
Device
Device
Custom Protocols
(Cl oud Service,
VM)
Management app
Device registry/Management
Monitoring
Send commands
AMQP, MQTT, HTTPS
Applications
- Companion apps
- Dashboards
- Controllers
- …
Device
Field bus / protocol
Field
Gateway
AMQP, MQTT, HTTPS
Device
Device
Field bus / protocol
Device
Field
Gateway
OPC, HTTP, CoAP,…
VPN/ExpressRoute
Custom Cloud
Gateway
(Cloud
Service, VM)
Management app
Device registry/Management
Monitoring
Send commands
Build 2018 – BRK3803 Azure IoT Platform services - The modern IoT developer toolbox


# Page. 4

![Page Image](https://bcdn.docswell.com/page/LJ352K1275.jpg)

Azure IoT Hub – クイックスタート
https://docs.microsoft.com/ja-jp/azure/iot-hub/quickstart-send-telemetry-c


# Page. 5

![Page Image](https://bcdn.docswell.com/page/8JDDZ3X6JG.jpg)

Azure IoT Hub – クイックスタート
https://github.com/Azure/azure-iot-sdk-c/blob/master/iothub_client/readme.md#mbed


# Page. 6

![Page Image](https://bcdn.docswell.com/page/VEPXD4KZJ8.jpg)

Azure IoT Central - ハウツーガイド
https://docs.microsoft.com/ja-jp/azure/iot-central/howto-connect-devkit


# Page. 7

![Page Image](https://bcdn.docswell.com/page/27VL1XVMEQ.jpg)

エッジ
クラウド
Internet
ReButton
✓ Azure IoT Hub/Azure IoT Central
✓ 最小限のセットアップ
✓ 低価格
✓ 電池駆動
✓ グローバル
✓ カスタマイズ


# Page. 8

![Page Image](https://bcdn.docswell.com/page/5JGX2VLX7L.jpg)

最小限のセットアップ
Azure IoT Central
Wi-Fi 2.4G
ReButton
Wi-Fi
Access Point
Internet
Azure IoT Hub
Button LED
✓ Wi-Fiアクセスポイント情報
User
✓ Azure接続情報


# Page. 9

![Page Image](https://bcdn.docswell.com/page/47Q8P6Y5EP.jpg)

グローバル
IoT in Action
Barcelona, Spain
Santa Clara, USA
Taipei, Taiwan
Shinzhen, China
New York, USA
Seoul, South Korea
Tokyo, Japan
Orlando, USA
Nuremberg, Germany
Sydney, Australia
Hanover, Germany
Taipei, Taiwan
https://twitter.com/SeeedJP/status/1051771382835634177


# Page. 10

![Page Image](https://bcdn.docswell.com/page/KE42Y4WV71.jpg)

グローバル


# Page. 11

![Page Image](https://bcdn.docswell.com/page/L71M64Y4JG.jpg)

グローバル


# Page. 12

![Page Image](https://bcdn.docswell.com/page/G7W3WXGZ72.jpg)

カスタマイズ – ハードウェア
I2C Grove connector
Jumper switch
RGB LED
JTAG pads
AAA batteries
UART for debug
PUSH BUTTON


# Page. 13

![Page Image](https://bcdn.docswell.com/page/4JZV56LL73.jpg)

カスタマイズ – ハードウェア
https://github.com/SeeedJP/ReButton/tree/master/mechanicals
https://github.com/SeeedJP/ReButton/tree/master/electronics


# Page. 14

![Page Image](https://bcdn.docswell.com/page/YE6592WMJV.jpg)

カスタマイズ – ソフトウェア
Image
ReButton
Image
Debug Adapter
Image
Azure Storage
PC


# Page. 15

![Page Image](https://bcdn.docswell.com/page/GE5YN2MQE4.jpg)

カスタマイズ – ソフトウェア
アプリケーション
ReButtonApp
https://github.com/SeeedJP/ReButtonApp
ライブラリ
ボード・プラットフォーム
Arduino IDE
SeeedJP ReButton by Seeed K.K.
https://github.com/SeeedJP/ReButtonArduinoPlatform


# Page. 16

![Page Image](https://bcdn.docswell.com/page/972G549W7R.jpg)

Communicate a Device and Azure IoT Hub
IoT Hub
Device-to-cloud messages
Physical Device
File uploads
C2D messages
Partition
~7days
Consumer
Group
Blob Storage
Partition
~2days
Direct methods
DeviceTwin
Desired properties
Reported properties
Desired
Reported


# Page. 17

![Page Image](https://bcdn.docswell.com/page/DJYVKM49JM.jpg)

Azure IoT SDK in ReButton
Application
Device
Client
Service
Client
Provisioning
Client
Provisioning
Service
C shared utility
https://github.com/Azure/
azure-iot-sdk-c
Adapter
Arduino API
Azure IoT C SDKs
Mbed API
WiFiInterface


# Page. 18

![Page Image](https://bcdn.docswell.com/page/V7NMRWYDE8.jpg)

Azure IoT Device Client API
IoT Hub接続先を指定：
IoTHubClient_LL_CreateFromConnectionString()
ConnectionStateCallbackFunc
D2Cメッセージを送信：
IoTHubMessage_CreateFromByteArray()
IoTHubClient_LL_SendEventAsync()
SendEventCallback
DeviceTwinのReportedを変更：
IoTHubClient_LL_SendReportedState()
DeviceTwinReportCallbackFunc
DeviceTwinのDesiredの変更通知を受ける：
IoTHubClient_LL_SetDeviceTwinCallback()
DeviceTwinCallbackFunc
https://github.com/SeeedJP/ReButtonApp/blob/master/ReButtonClient.cpp


# Page. 19

![Page Image](https://bcdn.docswell.com/page/YJ9NMXP8J3.jpg)

IoT Central
Measurements
Storage
Data Export
Physical Device
Telemetry
D2C
messages
State
Event Hub
Rules
Email
Event
DeviceTwin
Functions
Settings
Analytics
Desired
Reported
Logic Apps
Properties
Jobs
Flow
Commands
Dashboard
Webhook


# Page. 20

![Page Image](https://bcdn.docswell.com/page/GJ8KL2DZED.jpg)

ReButton and IoTC Configuration
ReButton Configuration:
Wi-Fi
✓ SSID / Passphrase
IoT Central
✓ Scope ID
✓ Device ID
✓ SAS Key
IoT Central Configuration:
✓ Create device template
✓ Add telemetry/state/event
✓ Add real device
✓ Copy Scope ID/Device ID/SAS Key


# Page. 21

![Page Image](https://bcdn.docswell.com/page/LJLZL2M17R.jpg)

Device
Cloud Services
IoT Plug and Play Overview
Device
Capability
Model
Interface


# Page. 22

![Page Image](https://bcdn.docswell.com/page/47MVM8Y57W.jpg)

IoT Plug and Play Contents
Cloud Services
Device
Properties
Telemetry
Commands
Device
Capability
Model
Interface


# Page. 23

![Page Image](https://bcdn.docswell.com/page/P7R2V59ZJ9.jpg)



# Page. 24

![Page Image](https://bcdn.docswell.com/page/PJXDZKQ1EX.jpg)

DEMO: IoT Plug and Play


# Page. 25

![Page Image](https://bcdn.docswell.com/page/3JKX859MED.jpg)

まとめ
ReButton:
✓ Azure IoTを体験する最も簡単なデバイス
✓ カスタマイズ可能
Azure IoT Central / Azure IoT Hub:
✓ 体験はIoT Central、デバイス開発はIoT Hub
デバイス開発:
✓ Azure IoT SDK
✓ IoT Plug and Play


