Sample ACTs

Mono Wireless, Inc.

Sample ACTs

To help you understand how the ACT works, we have prepared some samples.

The samples can be found in Act_samples in the folder where you installed the MWSDK.

Introduction to sample ACTs

Several samples are provided to help you understand how the act works.

Short ACT with no wireless communication and only microcontroller functions

Example of ACT description with I2C sensor

This is an example of a wireless sensor implementation that connects an I2C sensor and sends wireless packets while performing a brief operation by sleeping. Since this is a relatively simple and typical structure, it is recommended that you refer to it after reviewing act0 through act4.

Typical elements for implementing wireless sensors in TWELITE (simple relay net <NWK_SIMPLE>, Interactive settings mode <STG_STD>, I2C sensor handling Wire, intermittent operation with sleep, etc.).

Basic ACT for wireless communication

These are samples of sending or receiving wireless packets, each implemented from a slightly different perspective.

ACT on Parent Node side

Note: App_Wings can also be used to receive wireless packets for the ACTs included in this sample.

Refer to this when implementing your own Receiving Parent Node application.

ACT to add Interactive settings mode

The explanation of the ACT using Interactive settings mode describes the general flow of the program. There are no major differences between the explanations for any of the samples. (Here we quote BRD_I2C_TEMPHUMID)

ACT to operate sensors and other devices

This sample obtains sensor information from built-in peripherals and external sensor devices.

ACT to use TWELITE PAL

Although a standard PAL application is written into TWELITE PAL, it is possible to write a description using ACT without using the PAL application. The MWX library provides standard procedures for MOTION SENSE PAL use.

This is a sample for various PAL boards. This sample acquires sensor values, transmits these valuse, and sleeps on the PAL board.

The following is an example of an advanced application, which is a little more complicated to describe than the above ACT.

ACT, which introduced the stand-alone function

Acts with names starting with Unit are intended to introduce features and APIs.

Get the latest version.

We have put the complete source on Github for the purpose of checking the latest code and the revision history between MWSDK versions. See the links below for more information.

https://github.com/monowireless/Act_samples

Common description

The following items are common settings in the Act sample and are explained below.

const uint32_t APP_ID = 0x1234abcd;
const uint8_t CHANNEL = 13;
const char APP_FOURCHAR[] = "BAT1";

The following settings are common to all sample acts.

Both the application ID and the channel are mechanisms to ensure that the network does not mix with other networks.

Systems with different Application IDs will not mix, even if they are on the same channel. However, if a system with a different Application ID is transmitting frequently, this will cause interference and will have an effect.

The channel determines the frequency used for communication; in principle, 16 channels are available on the TWELITE radio module, and it is not possible to communicate with different channels except in very exceptional cases, which would not be the case in a normal system.

As a common specification of sample acts, the payload (data part) of the packet is prefixed with a 4-byte string (APP_FOURCHAR[]). This is for explanatory purposes, although one byte is sufficient for species specific identifiers. The inclusion of such system-specific identifiers and data structures is another way to prevent confusion.