Skip to content

Module Core

The Core module is a directory that contains other submodules. These modules perform generic functions, such as controlling the internal clock, controlling opmodes, and other basic tasks.

Contents

Module At

Use the Serial module to send AT commands to a modem. With this library we control the SIM868 communication modem and any other that requires sending and receiving AT commands.

It has three main methods, at::send() and at::searchLine() and at::read(). Please read the comments of every method on the source code

Configuration

In the user confugiration see Serial Ports properties prefixed with SERIAL_AT

Example

Using searchLine()

// Typical "AT" command should return OK on first line among other data in the
// following lines
at::send("AT");
if (at::searchLine(1, "OK", 500)) {
  // the modem has return a valid response
}

// global::buffer will contain the string "OK"
debug::info("result", global::buffer());

Using read()

at::send("AT");
at::read();
// global::buffer will contain all the response of the sent command
debug::info("result", global::buffer());

Module Debug

Module Delay

Module device

Module Errors

Module Global

Module Hash

Module Interruption

Module Names

Module opmode

  • OPMODE_BOOT: opmode.h::boot() | Configured by default as the first mode. It is in charge of initializing all the modules and set the normal opmode.
  • OPMODE_NORMAL: opmode.h::normal() | The boot opmode will change to normal. All work is done in this mode. Sensor data is read, messages are created and transmitted.
  • OPMODE_LOW: opmode.h::low() | It performs the same functions as the normal opmode but at longer intervals and by activating the sleep mode whenever possible. Some modules may be ordered to stop working when this mode is activated.
  • OPMODE_SLEEP: opmode.h::sleep() | The microcontroller goes into sleep mode and stops working. This is usually reached via the BATT module, when a low battery charge is reported. You can also activate this mode manually when you want to save battery power, for example during the night.
  • OPMODE_FATAL_ERROR: opmode.h::fatal() | An error prevents rhomb.IoT from working. Visual alarms such as LED flashes or LCD messages are activated. This can be reached when a slave module is wrongly placed or a configuration parameter is not correct.

Module Puf

Module rhio-pinmap

Module Sync

Module Tempo

Module Types

Module FreeRam

Module Utils

Comments