Build IoT solutions with IoT Button!
Seeed ReButton is a developer device for simple trigger actions, supporting multiple clicks and long press.
In addition, you can connect Seeed Grove sensors to add more data points.
- When you push ReButton, it will power up and connect to Internet via pre-configured Wi-Fi.
- ReButton will receive Device Twin changes from pre-configured Azure IoT Central or Azure IoT Hub.
- ReButton will send Device to Cloud Message to pre-configured Azure IoT Central or Azure IoT Hub.
- After D2C message is sent, ReButton will shutdown.
- Single click
- Double click
- Triple click
- Long press (>3sec.)
- Super long press (>6sec.)
Connect I2C or GPIO Grove sensors to the bottom of ReButton.
NOTE:
Software development/update is required.
Supports Azure IoT Central and Azure IoT Hub.
You can update ReButton firmware over-the-air.
ReButton runs with 2x AAA Alkarine battery.
Use AP Mode (Access Point Mode) to configure ReButton. To avoid battery drain, ReButton will automatically shutdown in 10 minutes, at AP mode. So that we recommend you to setup IoT Hub or IoT Central, first.
-
Hold button until RGB LED turns into White.
RGB LED will start with Blue, Yellow, Cyan, then White. This will take about 10 seconds. -
Release button and confirm ReButton is in AP mode.
When ReButton successfully boots into AP Mode, RGB LED will blink in White. -
Connect to AP
Look for Wi-Fi Access PointAZB-xxxxxxxxxxxx
and connect to it from your PC.
(xxxxxxxxxxxx
is MAC address of your ReButton Wi-Fi.)
- Use a Web Browser to access ReButton - Home at
http://192.168.0.1
.
Configure Wi-Fi settings to connect to Internet.
- Click
Wi-Fi
at ReButton - Home.
-
Select your Wi-Fi Access Point from
Wi-Fi SSID
list.
If you do not see your Access Point, refresh browser. -
Enter
Wi-Fi Passphrase
for your Wi-Fi AP. -
In case you would like to use specific Internet Time Server, enter FQDN to
Time Server
.
Default Internet Time Server is pool.ntp.org -> cn.pool.ntp.org -> europe.pool.ntp.org -> asia.pool.ntp.org -> oceania.pool.ntp.org . -
Click
Save
.
NOTE: Skip to next section if you would like to connct to Azure IoT Central.
In order to send Device to Cloud (D2C) message to Azure IoT Hub, save Connection String in ReButton.
To get the connection string, This page could be helpful.
- Browse to ReButton - Home page then click
Azure IoT Hub
. - Paste Connection String to
Azure IoT Hub connection string
. - Click
Save
.
NOTE: Skip this section if you already configured IoT Hub at section 3-1.
In order to send Device to Cloud (D2C) message to Azure IoT Central, save device provisioning information in ReButton.
In order to connect ReButton to Azure IoT Central, the device template for ReButton needs to be defined in you Azure IoT Central Application. Please refer Azure IoT Central Document for more information.
- Create a device template for ReButton in Azure IoT Central.
Type | Field Name | Values |
---|---|---|
Telemetry | batteryVoltage | Battery Voltage Level (Volt) |
State | actionNum | 1:Single click, 2:Double click, 3:Triple click, 10:Long press, 11:Super long press |
Event | message |
-
Create a device in Azure IoT Central.
-
Click
Connect
on Top Right corner of Azure IoT Central page.
-
Copy 3 values.
-
Browse to ReButton - Home page then click
Azure IoT Central
. -
Enter
Scope ID
,Device ID
,SAS Key
from Azure IoT Central.
Exit AP Mode and power off ReButton.
- Click
Shutdown
button.
Button push will trigger D2C message to the cloud.
ReButton supports 5 types of button triggers and default D2C message strings are following.
Clicks | RGB led | actionNum | message |
---|---|---|---|
Single click | Blue | 1 | "Single click" |
Double click | Lime | 2 | "Double click" |
Triple click | Magenta | 3 | "Triple click" |
Long press (> 3sec.) | Yellow | 10 | "Long press" |
Super long press (> 6sec.) | Cyan | 11 | "Super long press" |
Examples of D2C message:
{
"actionNum": "1",
"message": "Single click",
"batteryVoltage": 2.59
}
{
"actionNum": "2",
"message": "Double click",
"batteryVoltage": 2.59
}
{
"actionNum": "3",
"message": "Triple click",
"batteryVoltage": 2.59
}
{
"actionNum": "10",
"message": "Long press",
"batteryVoltage": 2.59
}
{
"actionNum": "11",
"message": "Super long press",
"batteryVoltage": 2.59
}
ReButton supports Firmware OTA.
Browse to Firmware Update
page to see the current vesrion of firmware and update to new firmware.
Browse to ReButton - Home then click Firmware Update
to see current firmware version of ReButton.
ReButton Firmware can be updated from firmware image saved in cloud (or any location ReButton can access).
- Enter AP mode.
- Browse to ReButton - Home page then click
Firmware Update
. - Enter following information.
Package URI
Package CRC
Package Size
- While holding Button, click
Update
. - Hold button until RGB LED starts blinking. ReButton is downloading the firmware image, checking CRC, and flashing new image. This will take about 30 seconds.
- Release button when RGB LED blinks.
- Enter AP Mode, browse to ReButton - Home page then click
Firmware Update
. So, you can verify current Firmware version.
ReButton has SWD pads for MCU development. Please do this on your own risk, it is easy to make your ReButton brick.
Following picture show the SWD signals of the PAD. You can connect this PADs to debug adapters by using TC2030-CTX 6-Pin Cable or solder directly to the PADs.
We are preparing for providing software development informations and affordable debug adapter. For your recovering purpose, you can download ReButton default firmware binary from here. You need to flash this binary for target STM32F412RG
and flash address 0x0800 0000
.
example:
openocd -f /usr/local/share/openocd/scripts/interface/cmsis-dap.cfg -c 'transport select swd' -f /usr/local/share/openocd/scripts/target/stm32f4x.cfg -c "program ReButton.1.0.bin verify reset 0x8000000"
Description | Value |
---|---|
MCU module | MXCHIP EMW3166 |
Input | 1x Push button |
Output | 1x RGB led |
Extension | 1x I2C Grove connector (3.3V I/O) |
Extras | 1x Jumper switch |
1x SWD pads | |
1x UART for debugging | |
Power supply | 2x AAA Alkarine batteries (LR03) |
Internal supply voltage | 3.3V |
Dimension | 70mm*70mm*25mm |
These files are licensed under CC-BY-SA.
Description | Value |
---|---|
IDE | Arduino IDE |
Visual Studio Code | |
Programming language | C / C++ |