Skip to content
Shop

Basic Kit 2 Getting Started Guide

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.

Open Gemini

Copy the prompt, then paste it into Gemini’s message box.

View prompt

Basic Kit 2 lets you display sensor readings on a phone or computer. The kit comes assembled with an AVR MCU, and includes a separate STM32 MCU leaf. Both MCUs have a demo sketch installed, so you can try the original demos without uploading a program or setting up a development environment.

7 types of leaves. Select a photo or name for specifications and pin assignments.

AP01 AVR MCU

An AVR microcontroller that runs your programs.
Qty: 1

AP03 STM32 MCU

Runs programs to read sensors and control other leaves. It can replace the AVR MCU.
Qty: 1

AI01 4-Sensors

Measures temperature, humidity, light, and acceleration.
Qty: 1

AC02 BLE Sugar

Sends and receives data over Bluetooth LE.
Qty: 1

AV01 CR2032

Supplies power from a CR2032 coin cell battery.
Qty: 1

AZ01 USB

Connects to a computer for programming, serial communication, and USB power.
Qty: 1

AX02 29pin

Connects leaf signals to external circuits.
Qty: 1
Accessories and other included items

AZ62 Connector Cover

Protects the connector from dust and debris.
Qty: 1

AZ66 Basic Kit Case

Holds Basic Kit and attaches it to a surface that magnets stick to, using a magnet on its base.
Qty: 1
  • Product sheet× 1
  • Product label× 1
  • CR2032 coin cell battery× 1
  • M2×18 mm screw× 2
  • Screwdriver× 1
  1. If this is your first time, start with the AVR demo. Keep the kit assembled and follow the Basic Kit guide. The same demo works with Basic Kit 2's AVR configuration.
  2. To try on-device logging and low-power operation, switch to STM32. Follow this page to replace the AVR MCU with the STM32 MCU.

The rest of this page covers the STM32 demo. If you have already uploaded a different sketch, see the STM32 Logger Beacon sample for instructions on uploading the original demo.

Two modes of the STM32 demoMeasure and store with low power. Connect to configure the device or retrieve its log.

MOST OF THE TIME

Measure, store, broadcast

Beacon mode

Leafony
Readings
Android phone*Raspberry Pi

One-way broadcast

  • Periodically measure temperature, humidity, illuminance and battery voltage.
  • Store readings in on-device memory (EEPROM).
  • Broadcast readings by beacon, then sleep.

Power consumptionUltra-low

WHEN NEEDED

Set up and read the log

Connection mode

Leafony
Settings Stored data
PCAndroid phone*

Two-way connection

  • Initial setup: set the clock and measurement interval.
  • Transfer stored data from on-device memory (EEPROM).
  • Graph and analyze the downloaded data on a PC or Android phone*.

Power consumptionMedium

Qualitative comparison of the two modes in the demo.

Switching modes

BeaconConnection

Shake Leafony

Then select Connect in the web app.

Motion detection wakes the device and gives the app time to connect.

ConnectionBeacon

Select Disconnect in the web app.

The device resumes measuring, storing, broadcasting and sleeping.

First, connect to set the device clock. The demo needs the clock set before it can store readings.

Where the data goes

ConnectionRead and analyze the stored log

  1. Leafony memory
  2. PC / Android phone*
  3. Graphing / analysis

BeaconMonitor beacon readings nearby

  1. Leafony beacon
  2. Android phone*
  3. Real-time monitoring

BeaconApplication example: use Raspberry Pi as a receiver

  1. Leafony beacon
  2. Raspberry Pi
  3. Internet / cloud
  4. Phone: real-time graphing / analysis

This application example requires software for receiving and forwarding data, and a service for displaying it.

* Android only: the phone condition shown in the original demo diagram. The September 2022 guide also describes Bluefy for iPhone connections. Connecting and receiving live beacons have different browser requirements; see the browser notes below and the current compatibility table.

EEPROM here refers to the MCU’s internal Flash used to retain the log, rather than a separate memory leaf.

The STM32 demo normally measures, stores readings and broadcasts beacons, sleeping between cycles to reduce battery use. Connect to a PC or phone when you need to set the clock or measurement interval, or retrieve the stored log.

You can retrieve the readings stored in the device in a batch. Check the browser notes below for connecting or receiving beacons.

  • Basic Kit 2 and its CR2032 coin cell
  • A Bluetooth-capable phone or computer
  • Google Chrome on a supported system such as Android, Windows or Mac; Bluefy on iPhone or iPad

The web app can retrieve and graph up to 169 samples stored in the device. Start with the steps below to connect, record measurements and retrieve the log.

  • Connecting to read the log and receiving beacons without a connection have different browser requirements. Chrome provides the connection feature on Android, Windows, Mac and other supported systems. The official compatibility table lists Linux as partially implemented and unsupported, requiring additional settings.
  • Receiving beacons is optional. The web app describes this feature for Android. Chrome's Scanning API is experimental and requires chrome://flags/#enable-experimental-web-platform-features on a supported system. See the Web Bluetooth implementation status for details.
  • On iPhone and iPad, open the web app in Bluefy. The September 2022 guide reports that CSV download was unavailable. CSV download in this demo has not been retested with current Bluefy versions, so use the on-screen graph for your first check.
  1. Turn the power off and disconnect USB before changing the leaves. Remove the Connector Cover from the STM32 MCU. Remove the AVR MCU and USB leaf from the assembled block, then install the STM32 MCU as shown.

    Replace the AVR MCU and USB leaf with the STM32 MCU

  2. Set the STM32 MCU's program switch to Run.

    STM32 MCU program switch and reset button

  3. Insert the CR2032 coin cell and turn the power switch on.

    Coin cell placement and power switch

  1. Turn Bluetooth on and open the STM32 Logger Beacon web app in a supported browser. Allow Bluetooth access if requested.
  2. Select Connect in the web app and shake Leafony to make it available for a connection. Select Leaf_A (the initial device name) from the list and pair. The connection sets the device's clock automatically.
  3. Select Disconnect. The device starts recording measurements and broadcasting beacons; wait for the measurement interval to pass. To check the interval while connected, open Initial Settings and select Check next to Sleep Time.

If the device does not appear in the list, shake it and try selecting it again. It waits for a connection for about 20 seconds.

  1. Shake the device and reconnect using Connect in the web app.
  2. Under Get Sensors Data, select Get Data. After the stored data is received, graphs show temperature, humidity, illuminance and battery voltage.
  3. When finished, select Disconnect to resume logging.

When measurement times and values appear in the graphs, you can confirm the connection, recording and retrieval steps. Try beacon reception or CSV download after checking your browser's support.

The measurement interval depends on the installed sketch and saved settings. The original guide estimates that intervals of several minutes may allow months of CR2032 coin cell operation. This is a theoretical estimate, not a measured runtime guarantee; battery condition, supply losses and the program's activity affect runtime. See low-power design for the calculation method.

After trying the demo, set up a development environment when you want to upload your own programs.