Cat-M1 Kit Start Guide
Use this page with AI
Set up with your favorite AI
Gemini & other AI
Copy the setup prompt into your AI. Work through each step together, from checking your kit to getting it running.
Copy the prompt, then paste it into Gemini’s message box.
View prompt
Cellular LPWA Cat-M1 Kit is a compact, low-power development kit that sends sensor data directly to the cloud over a cellular network. You can record temperature and humidity in remote locations without setting up Wi-Fi.
Play video (1:49, Japanese) 1. Kit contents
The leaves arrive individually packed in bags. First, check that you have all the following leaves and accessories.

Leaves
| Leaf | Role |
|---|---|
| AC09 Cat-M1 TY | Cellular LPWA Cat-M1 communication over a cellular network. |
| AX04 Spacer | Adds space between stacked leaves. |
| AI05 Env Sensors | Measures temperature, humidity, pressure and 3-axis acceleration. The standard configuration uses BME280 and LIS2DW12. |
| AP03B STM32 MCU | Runs programs to read sensors and control communication leaves. A redesigned version of AP03. |
| AZ01C USB-C | Connects to a computer over USB Type-C for serial communication and 3.3V power. Check the connections and settings specified by the matching firmware before uploading to AP03B. |
| AV06 1.8V~5.5V | Supplies 3.3V to the leaves from batteries. The battery holder connects through a PH connector. |
| AX02B 29-pin | Routes all 29 Leafony Bus pins to 2.54mm-pitch through-hole pads for prototyping external circuits and checking signals. |
Accessories
| Accessory | Purpose |
|---|---|
| AZ63 Nut Plate | Secures leaves with screws. |
| 1NCE SIM (nanoSIM-compatible) | Used for AC09 cellular communication. Check the SIM's service status and communication settings before use. |
| M2×18 mm screws | Secure the stacked leaves. |
| PH-connector holder for two AA cells | Connects to AV06 for battery power. |
2. What you will build
The goal of this guide is to run the sample program and record the temperature and humidity measured by the kit in Google Sheets every 10 minutes.
The data follows this path:
Measure temperature and humidity with AI05 → Send over a cellular network with AC09 → Record in Google Sheets
Each row in the spreadsheet contains the reception timestamp, temperature, and humidity. You can also chart the recorded data to see how the values change over time.
3. What you need
Prepare the following items in addition to the kit.
| Item | Purpose |
|---|---|
| Computer with internet access | Install the development tools, upload the program, and set up the spreadsheet. |
| USB-C cable that supports data transfer | Connect the computer to the included AZ01C USB-C leaf. A charging-only cable will not work. |
| Two AA batteries | Put these in the included battery holder when you try battery power at the end of the guide. |
| Screwdriver that fits the screws | Tighten the screws that secure the leaves. |
| Google account | Create the Google spreadsheet that will store the data. |
Complete these preparations on your computer:
- Follow Development environment setup to install VS Code, PlatformIO, and STM32CubeProgrammer.
- Check that the included 1NCE SIM is ready to use and confirm its assigned APN (the setting for connecting to the cellular network). Refer to the kit's sales information for activation instructions.
- Follow Prepare Google Sheets to set up the destination spreadsheet and the Apps Script that receives data. Note the issued endpoint URL and the authentication token you configured.
4. Assemble the kit
Disconnect the USB cable and batteries before assembly.
Watch the assembly from SIM installation (Japanese)- Prepare the included 1NCE SIM in nanoSIM size and insert it into the AC09 SIM holder. Check the card's notch and the shape of the holder.
- Align the bus contacts and screw holes, then stack the leaves in the order shown below.
- Check the connector orientation and make sure components do not touch each other, then secure the stack with the included M2×18 mm screws and AZ63 Nut Plate.
The assembled stack must have the following order from top to bottom:
| Position | Leaf |
|---|---|
| 1 (top) | AI05 Env Sensors leaf |
| 2 | AZ01C USB-C leaf |
| 3 | AP03B STM32 leaf |
| 4 | AX04 Spacer leaf |
| 5 | AC09 Cat-M1 leaf |
| 6 (bottom) | AV06 power leaf |
Place the Spacer leaf between the STM32 and Cat-M1 leaves. The included AX02B 29-pin leaf is for connecting external circuits, so leave it out of this stack.
See Assembly and reconfiguration basics for guidance on stacking leaves and tightening the screws.
5. Upload the sample code
Open and configure the sample
- Obtain the sample from the AC09 development repository and open the
platformio/google_sheetsfolder in VS Code. If you cannot access the repository, see Obtain the source. - Copy
include/config.example.htoconfig.local.hin the same folder. - Update the following entries in
config.local.hwith your settings.
| Setting | Value |
|---|---|
GAS_URL | The Apps Script URL you prepared. Use the URL ending in /exec. |
GAS_API_TOKEN | The same authentication token registered in Apps Script. |
SIM_PROVIDER | 1 for the included 1NCE SIM. |
ONE_NCE_APN | The APN assigned to the included SIM. |
SEND_INTERVAL_MS | 600000UL (10 minutes). |
Upload to AP03B
Keep the batteries disconnected and connect the AZ01C USB-C leaf to your computer with the USB cable.
-
Set
upload_portandupload_commandinplatformio.inito match your computer's connection port and STM32CubeProgrammer location. Refer to the OS-specific configuration examples, and use theleafony_ap03benvironment for this kit. -
Open the PlatformIO terminal in VS Code and build the program.
pio run -e leafony_ap03b -
Set AP03B's PG switch to Program and press the RST button. Then upload with the following command:
pio run -e leafony_ap03b -t upload -
After the upload succeeds, return the PG switch to Run.
See the AP03B documentation for the switch location.
6. Check operation
-
Keep the USB cable connected and open the serial monitor with the following command:
pio device monitor -e leafony_ap03b -b 115200 -
Press AP03B's RST button to start the program. Wait for it to connect to the cellular network and acquire the time.
-
When
Saved to Google Sheetsappears in the serial monitor, open the Google spreadsheet. -
If a row containing the reception timestamp, temperature, and humidity has been added to the
temperaturesheet, the sample is working. Leave it running to add new measurements every 10 minutes.
Reception timestamps are recorded in UTC. Add nine hours to read them in Japan Standard Time.
If no row is added, check the settings for the message shown in the serial monitor using Serial logs and troubleshooting.
7. Next steps
Run on batteries away from your computer
- Disconnect the USB cable and turn the AV06 power switch OFF.
- Insert two AA batteries into the included battery holder, checking the positive and negative orientation. Connect the holder's PH connector to AV06.
- Make sure AP03B's PG switch is set to Run, then turn the AV06 power switch ON.
- Check that a new row is added to the spreadsheet.
Keep the USB cable disconnected when running on batteries. See the AV06 documentation for the power switch and connector locations.
Use the recorded data and customize the program
- Chart changes in temperature and humidity: Select the timestamp, temperature, and humidity columns in the spreadsheet, then choose “Insert” → “Chart”.
- Change the recording interval: Change
SEND_INTERVAL_MSand upload the program again. See Sample configuration for the allowed range. - Learn how to reduce battery consumption: Low-power design explains communication intervals and sleep modes.
