Walabot API Beta
All you need to know to create a Walabot Application
Code Examples

All sample applications share the coding format:

  • Variable definitions - local variable used during the function
  • Initialize configuration - set of variables with predefine value,
    which are used by the Walabot API during Configuration phase.
  • Code Sample is divided into 7 steps:
    1) Connect
    2) Configure
    3) Start
    4) Calibrate
    5) Trigger
    6) Get action
    7) Stop/Disconnect
  • Important implementation note: Walabot uses internal Database (DB), these files are located by default
    in Windows at : "%ProgramData%/Walabot/WalabotSDK" folder. When you write your own application, there is need to modify Walabot lib
    its database location. Walabot_SetSettingsFolder
  1. Sensor Sample Code: this example shows how to build up a simple sensor application using Walabot API. There are two modes MTI mode enable/disable, can be set by modifying the mtiMode variable.
    C# Sample Code
    C++ Sample Code
    #include "WalabotAPI.h"
    #include <iostream>
    #include <stdio.h>
    #include <string>
    #ifdef __LINUX__
    #define CONFIG_FILE_PATH "/etc/walabotsdk.conf"
    #else
    #define CONFIG_FILE_PATH "C:\\Program Files\\Walabot\\WalabotSDK\\bin\\.config"
    #endif
    #define CHECK_WALABOT_RESULT(result, func_name) \
    { \
    if (result != WALABOT_SUCCESS) \
    { \
    const char* errorStr = Walabot_GetErrorString(); \
    std::cout << std::endl << func_name << " error: " \
    << errorStr << std::endl; \
    std::cout << "Press enter to continue ..."; \
    std::string dummy; \
    std::getline(std::cin, dummy); \
    return; \
    } \
    }
    void PrintSensorTargets(SensorTarget* targets, int numTargets)
    {
    int targetIdx;
    #ifdef __LINUX__
    printf("\033[2J\033[1;1H");
    #else
    system("cls");
    #endif
    if (numTargets > 0)
    {
    for (targetIdx = 0; targetIdx < numTargets; targetIdx++)
    {
    printf("Target #%d: \nX = %lf \nY = %lf \nZ = %lf \namplitude = %lf\n\n\n ",
    targetIdx,
    targets[targetIdx].xPosCm,
    targets[targetIdx].yPosCm,
    targets[targetIdx].zPosCm,
    targets[targetIdx].amplitude);
    }
    }
    else
    {
    printf("No target detected\n");
    }
    }
    void SensorCode_SampleCode()
    {
    // --------------------
    // Variable definitions
    // --------------------
    // Walabot_GetSensorTargets - output parameters
    SensorTarget* targets;
    int numTargets;
    // Walabot_GetStatus - output parameters
    APP_STATUS appStatus;
    double calibrationProcess; // Percentage of calibration completed, if status is STATUS_CALIBRATING
    // Walabot_GetRawImageSlice - output parameters
    int* rasterImage;
    int sizeX;
    int sizeY;
    double sliceDepth;
    double power;
    // ------------------------
    // Initialize configuration
    // ------------------------
    // Walabot_SetArenaR - input parameters
    double minInCm = 30;
    double maxInCm = 200;
    double resICm = 3;
    // Walabot_SetArenaTheta - input parameters
    double minIndegrees = -15;
    double maxIndegrees = 15;
    double resIndegrees = 5;
    // Walabot_SetArenaPhi - input parameters
    double minPhiInDegrees = -60;
    double maxPhiInDegrees = 60;
    double resPhiInDegrees = 5;
    // ----------------------
    // Sample Code Start Here
    // ----------------------
    /*
    For an image to be received by the application, the following need to happen :
    1) Connect
    2) Configure
    3) Calibrate
    4) Start
    5) Trigger
    6) Get action
    7) Stop/Disconnect
    */
    bool mtiMode = true;
    res = Walabot_Initialize(CONFIG_FILE_PATH);
    CHECK_WALABOT_RESULT(res, "Walabot_Initialize");
    // 1) Connect : Establish communication with Walabot.
    // ==================================================
    CHECK_WALABOT_RESULT(res, "Walabot_ConnectAny");
    // 2) Configure : Set scan profile and arena
    // =========================================
    // Set Profile - to Sensor.
    // Walabot recording mode is configure with the following attributes:
    // -> Distance scanning through air;
    // -> high-resolution images
    // -> slower capture rate
    CHECK_WALABOT_RESULT(res, "Walabot_SetProfile");
    // Setup arena - specify it by Cartesian coordinates(ranges and resolution on the x, y, z axes);
    // In Sensor mode there is need to specify Spherical coordinates(ranges and resolution along radial distance and Theta and Phi angles).
    res = Walabot_SetArenaR(minInCm, maxInCm, resICm);
    CHECK_WALABOT_RESULT(res, "Walabot_SetArenaR");
    // Sets polar range and resolution of arena (parameters in degrees).
    res = Walabot_SetArenaTheta(minIndegrees, maxIndegrees, resIndegrees);
    CHECK_WALABOT_RESULT(res, "Walabot_SetArenaTheta");
    // Sets azimuth range and resolution of arena.(parameters in degrees).
    res = Walabot_SetArenaPhi(minPhiInDegrees, maxPhiInDegrees, resPhiInDegrees);
    CHECK_WALABOT_RESULT(res, "Walabot_SetArenaPhi");
    FILTER_TYPE filterType = mtiMode ?
    FILTER_TYPE_MTI : //Moving Target Identification: standard dynamic-imaging filter
    res = Walabot_SetDynamicImageFilter(filterType);
    CHECK_WALABOT_RESULT(res, "Walabot_SetDynamicImageFilter");
    // 3) Start: Start the system in preparation for scanning.
    // =======================================================
    res = Walabot_Start();
    CHECK_WALABOT_RESULT(res, "Walabot_Start");
    // 4) Start Calibration - only if MTI mode is not set - (there is no sense
    // executing calibration when MTI is active)
    // ========================================================================
    if (!mtiMode)
    {
    // calibrates scanning to ignore or reduce the signals
    CHECK_WALABOT_RESULT(res, "Walabot_StartCalibration");
    }
    bool recording = true;
    while (recording)
    {
    // calibrates scanning to ignore or reduce the signals
    res = Walabot_GetStatus(&appStatus, &calibrationProcess);
    CHECK_WALABOT_RESULT(res, "Walabot_GetStatus");
    // 5) Trigger: Scan(sense) according to profile and record signals to be
    // available for processing and retrieval.
    // ====================================================================
    res = Walabot_Trigger();
    CHECK_WALABOT_RESULT(res, "Walabot_Trigger");
    // 6) Get action : retrieve the last completed triggered recording
    // ================================================================
    res = Walabot_GetSensorTargets(&targets, &numTargets);
    CHECK_WALABOT_RESULT(res, "Walabot_GetSensorTargets");
    res = Walabot_GetRawImageSlice(&rasterImage, &sizeX, &sizeY, &sliceDepth, &power);
    CHECK_WALABOT_RESULT(res, "Walabot_GetRawImageSlice");
    // ******************************
    // TODO: add processing code here
    // ******************************
    PrintSensorTargets(targets, numTargets);
    }
    // 7) Stop and Disconnect.
    // ======================
    res = Walabot_Stop();
    CHECK_WALABOT_RESULT(res, "Walabot_Stop");
    CHECK_WALABOT_RESULT(res, "Walabot_Disconnect");
    CHECK_WALABOT_RESULT(res, "Walabot_Clean");
    }
    int main()
    {
    SensorCode_SampleCode();
    }
    Python Sample Code
    from __future__ import print_function # WalabotAPI works on both Python 2 an 3.
    from sys import platform
    from os import system
    from imp import load_source
    from os.path import join
    if platform == 'win32':
    modulePath = join('C:/', 'Program Files', 'Walabot', 'WalabotSDK',
    'python', 'WalabotAPI.py')
    elif platform.startswith('linux'):
    modulePath = join('/usr', 'share', 'walabot', 'python', 'WalabotAPI.py')
    wlbt = load_source('WalabotAPI', modulePath)
    wlbt.Init()
    def PrintSensorTargets(targets):
    system('cls' if platform == 'win32' else 'clear')
    if targets:
    for i, target in enumerate(targets):
    print('Target #{}:\nx: {}\ny: {}\nz: {}\namplitude: {}\n'.format(
    i + 1, target.xPosCm, target.yPosCm, target.zPosCm,
    target.amplitude))
    else:
    print('No Target Detected')
    def SensorApp():
    # wlbt.SetArenaR - input parameters
    minInCm, maxInCm, resInCm = 30, 200, 3
    # wlbt.SetArenaTheta - input parameters
    minIndegrees, maxIndegrees, resIndegrees = -15, 15, 5
    # wlbt.SetArenaPhi - input parameters
    minPhiInDegrees, maxPhiInDegrees, resPhiInDegrees = -60, 60, 5
    # Set MTI mode
    mtiMode = False
    # Initializes walabot lib
    wlbt.Initialize()
    # 1) Connect : Establish communication with walabot.
    wlbt.ConnectAny()
    # 2) Configure: Set scan profile and arena
    # Set Profile - to Sensor.
    wlbt.SetProfile(wlbt.PROF_SENSOR)
    # Setup arena - specify it by Cartesian coordinates.
    wlbt.SetArenaR(minInCm, maxInCm, resInCm)
    # Sets polar range and resolution of arena (parameters in degrees).
    wlbt.SetArenaTheta(minIndegrees, maxIndegrees, resIndegrees)
    # Sets azimuth range and resolution of arena.(parameters in degrees).
    wlbt.SetArenaPhi(minPhiInDegrees, maxPhiInDegrees, resPhiInDegrees)
    # Moving Target Identification: standard dynamic-imaging filter
    filterType = wlbt.FILTER_TYPE_MTI if mtiMode else wlbt.FILTER_TYPE_NONE
    wlbt.SetDynamicImageFilter(filterType)
    # 3) Start: Start the system in preparation for scanning.
    wlbt.Start()
    if not mtiMode: # if MTI mode is not set - start calibrartion
    # calibrates scanning to ignore or reduce the signals
    wlbt.StartCalibration()
    while wlbt.GetStatus()[0] == wlbt.STATUS_CALIBRATING:
    wlbt.Trigger()
    while True:
    appStatus, calibrationProcess = wlbt.GetStatus()
    # 5) Trigger: Scan(sense) according to profile and record signals
    # to be available for processing and retrieval.
    wlbt.Trigger()
    # 6) Get action: retrieve the last completed triggered recording
    targets = wlbt.GetSensorTargets()
    rasterImage, _, _, sliceDepth, power = wlbt.GetRawImageSlice()
    # PrintSensorTargets(targets)
    PrintSensorTargets(targets)
    # 7) Stop and Disconnect.
    wlbt.Stop()
    wlbt.Disconnect()
    wlbt.Clean()
    print('Terminate successfully')
    if __name__ == '__main__':
    SensorApp()


  1. Breathing example, setting up a Narrow Sensor profile
    C# Sample Code
    C++ Sample Code
    #include "WalabotAPI.h"
    #include <iostream>
    #include <stdio.h>
    #include <string>
    #ifdef __LINUX__
    #define CONFIG_FILE_PATH "/etc/walabotsdk.conf"
    #else
    #define CONFIG_FILE_PATH "C:\\Program Files\\Walabot\\WalabotSDK\\bin\\.config"
    #endif
    #define CHECK_WALABOT_RESULT(result, func_name) \
    { \
    if (result != WALABOT_SUCCESS) \
    { \
    const char* errorStr = Walabot_GetErrorString(); \
    std::cout << std::endl << func_name << " error: " \
    << errorStr << std::endl; \
    std::cout << "Press enter to continue ..."; \
    std::string dummy; \
    std::getline(std::cin, dummy); \
    return; \
    } \
    }
    void PrintBreathingEnergy(double energy)
    {
    #ifdef __LINUX__
    printf("\033[2J\033[1;1H");
    #else
    system("cls");
    #endif
    printf("Energy = %lf\n ", energy * 1e7);
    }
    void SensorBreathing_SampleCode()
    {
    // --------------------
    // Variable definitions
    // --------------------
    // Walabot_GetStatus - output parameters
    APP_STATUS appStatus;
    double calibrationProcess; // Percentage of calibration completed, if status is STATUS_CALIBRATING
    // Walabot_GetImageEnergy
    double energy;
    // ------------------------
    // Initialize configuration
    // ------------------------
    // Walabot_SetArenaR - input parameters
    double minInCm = 30;
    double maxInCm = 150;
    double resICm = 1;
    // Walabot_SetArenaTheta - input parameters
    double minIndegrees = -4;
    double maxIndegrees = 4;
    double resIndegrees = 2;
    // Walabot_SetArenaPhi - input parameters
    double minPhiInDegrees = -4;
    double maxPhiInDegrees = 4;
    double resPhiInDegrees = 2;
    // ----------------------
    // Sample Code Start Here
    // ----------------------
    /*
    For an image to be received by the application, the following need to happen :
    1) Connect
    2) Configure
    3) Start
    4) Trigger
    5) Get action
    6) Stop/Disconnect
    */
    res = Walabot_Initialize(CONFIG_FILE_PATH);
    CHECK_WALABOT_RESULT(res, "Walabot_Initialize");
    // 1) Connect : Establish communication with Walabot.
    // ==================================================
    CHECK_WALABOT_RESULT(res, "Walabot_ConnectAny");
    // 2) Configure : Set scan profile and arena
    // =========================================
    // Set Profile - to Sensor -Narrow.
    // Walabot recording mode is configure with the following attributes:
    // -> Distance scanning through air;
    // -> lower - resolution images for a fast capture rate (useful for tracking quick movement)
    CHECK_WALABOT_RESULT(res, "Walabot_SetProfile");
    // Setup arena - specify it by Cartesian coordinates(ranges and resolution on the x, y, z axes);
    // In Sensor mode there is need to specify Spherical coordinates(ranges and resolution along radial distance and Theta and Phi angles).
    res = Walabot_SetArenaR(minInCm, maxInCm, resICm);
    CHECK_WALABOT_RESULT(res, "Walabot_SetArenaR");
    // Sets polar range and resolution of arena (parameters in degrees).
    res = Walabot_SetArenaTheta(minIndegrees, maxIndegrees, resIndegrees);
    CHECK_WALABOT_RESULT(res, "Walabot_SetArenaTheta");
    // Sets azimuth range and resolution of arena.(parameters in degrees).
    res = Walabot_SetArenaPhi(minPhiInDegrees, maxPhiInDegrees, resPhiInDegrees);
    CHECK_WALABOT_RESULT(res, "Walabot_SetArenaPhi");
    // Dynamic-imaging filter for the specific frequencies typical of breathing
    CHECK_WALABOT_RESULT(res, "Walabot_SetDynamicImageFilter");
    // 3) Start: Start the system in preparation for scanning.
    // =======================================================
    res = Walabot_Start();
    CHECK_WALABOT_RESULT(res, "Walabot_Start");
    bool recording = true;
    while (recording)
    {
    // calibrates scanning to ignore or reduce the signals
    res = Walabot_GetStatus(&appStatus, &calibrationProcess);
    CHECK_WALABOT_RESULT(res, "Walabot_GetStatus");
    // 4) Trigger: Scan(sense) according to profile and record signals to be
    // available for processing and retrieval.
    // ====================================================================
    res = Walabot_Trigger();
    CHECK_WALABOT_RESULT(res, "Walabot_Trigger");
    // 5) Get action : retrieve the last completed triggered recording
    // ================================================================
    res = Walabot_GetImageEnergy(&energy);
    CHECK_WALABOT_RESULT(res, "Walabot_GetImageEnergy");
    // ******************************
    // TODO: add processing code here
    // ******************************
    PrintBreathingEnergy(energy);
    }
    // 6) Stop and Disconnect.
    // ======================
    res = Walabot_Stop();
    CHECK_WALABOT_RESULT(res, "Walabot_Stop");
    CHECK_WALABOT_RESULT(res, "Walabot_Disconnect");
    res = Walabot_Clean();
    CHECK_WALABOT_RESULT(res, "Walabot_Clean");
    }
    int main()
    {
    SensorBreathing_SampleCode();
    }
    Pyhton Sample Code
    from __future__ import print_function # WalabotAPI works on both Python 2 an 3.
    from sys import platform
    from os import system
    from imp import load_source
    from os.path import join
    if platform == 'win32':
    modulePath = join('C:/', 'Program Files', 'Walabot', 'WalabotSDK',
    'python', 'WalabotAPI.py')
    elif platform.startswith('linux'):
    modulePath = join('/usr', 'share', 'walabot', 'python', 'WalabotAPI.py')
    wlbt = load_source('WalabotAPI', modulePath)
    wlbt.Init()
    def PrintBreathingEnergy(energy):
    system('cls' if platform == 'win32' else 'clear')
    print('Energy = {}'.format(energy * 1e7))
    def BreathingApp():
    # Walabot_SetArenaR - input parameters
    minInCm, maxInCm, resInCm = 30, 150, 1
    # Walabot_SetArenaTheta - input parameters
    minIndegrees, maxIndegrees, resIndegrees = -4, 4, 2
    # Walabot_SetArenaPhi - input parameters
    minPhiInDegrees, maxPhiInDegrees, resPhiInDegrees = -4, 4, 2
    # Initializes walabot lib
    wlbt.Initialize()
    # 1) Connect : Establish communication with walabot.
    wlbt.ConnectAny()
    # 2) Configure: Set scan profile and arena
    # Set Profile - to Sensor-Narrow.
    wlbt.SetProfile(wlbt.PROF_SENSOR_NARROW)
    # Setup arena - specify it by Cartesian coordinates.
    wlbt.SetArenaR(minInCm, maxInCm, resInCm)
    # Sets polar range and resolution of arena (parameters in degrees).
    wlbt.SetArenaTheta(minIndegrees, maxIndegrees, resIndegrees)
    # Sets azimuth range and resolution of arena.(parameters in degrees).
    wlbt.SetArenaPhi(minPhiInDegrees, maxPhiInDegrees, resPhiInDegrees)
    # Dynamic-imaging filter for the specific frequencies typical of breathing
    wlbt.SetDynamicImageFilter(wlbt.FILTER_TYPE_DERIVATIVE)
    # 3) Start: Start the system in preparation for scanning.
    wlbt.Start()
    # 4) Trigger: Scan (sense) according to profile and record signals to be
    # available for processing and retrieval.
    while True:
    appStatus, calibrationProcess = wlbt.GetStatus()
    # 5) Trigger: Scan(sense) according to profile and record signals
    # to be available for processing and retrieval.
    wlbt.Trigger()
    # 6) Get action: retrieve the last completed triggered recording
    energy = wlbt.GetImageEnergy()
    # PrintBreathingEnergy(energy)
    PrintBreathingEnergy(energy)
    # 7) Stop and Disconnect.
    wlbt.Stop()
    wlbt.Disconnect()
    wlbt.Clean()
    print('Terminate successfully')
    if __name__ == '__main__':
    BreathingApp()


  1. InWall application sensor
    C# Sample Code
    C++ Sample Code
    cpp/InWallSampleCode.cpp Python Sample Code
    from __future__ import print_function # WalabotAPI works on both Python 2 an 3.
    from sys import platform
    from os import system
    from imp import load_source
    from os.path import join
    if platform == 'win32':
    modulePath = join('C:/', 'Program Files', 'Walabot', 'WalabotSDK',
    'python', 'WalabotAPI.py')
    elif platform.startswith('linux'):
    modulePath = join('/usr', 'share', 'walabot', 'python', 'WalabotAPI.py')
    wlbt = load_source('WalabotAPI', modulePath)
    wlbt.Init()
    def PrintSensorTargets(targets):
    system('cls' if platform == 'win32' else 'clear')
    if targets:
    for i, target in enumerate(targets):
    print(('Target #{}:\ntype: {}\nangleDeg: {}\nx: {}\ny: {}\nz: {}'+
    '\nwidth: {}\namplitude: {}\n').format(i + 1, target.type,
    target.angleDeg, target.xPosCm, target.yPosCm, target.zPosCm,
    target.widthCm, target.amplitude))
    else:
    print('No Target Detected')
    def InWallApp():
    # wlbt.SetArenaX - input parameters
    xArenaMin, xArenaMax, xArenaRes = -3, 4, 0.5
    # wlbt.SetArenaY - input parameters
    yArenaMin, yArenaMax, yArenaRes = -6, 4, 0.5
    # wlbt.SetArenaZ - input parameters
    zArenaMin, zArenaMax, zArenaRes = 3, 8, 0.5
    # Initializes walabot lib
    wlbt.Initialize()
    # 1) Connects: Establish communication with walabot.
    wlbt.ConnectAny()
    # 2) Configure: Set scan profile and arena
    # Set Profile - to Short-range.
    wlbt.SetProfile(wlbt.PROF_SHORT_RANGE_IMAGING)
    # Set arena by Cartesian coordinates, with arena resolution
    wlbt.SetArenaX(xArenaMin, xArenaMax, xArenaRes)
    wlbt.SetArenaY(yArenaMin, yArenaMax, yArenaRes)
    wlbt.SetArenaZ(zArenaMin, zArenaMax, zArenaRes)
    # Walabot filtering disable
    wlbt.SetDynamicImageFilter(wlbt.FILTER_TYPE_NONE)
    # 3) Start: Start the system in preparation for scanning.
    wlbt.Start()
    # calibrates scanning to ignore or reduce the signals
    wlbt.StartCalibration()
    while wlbt.GetStatus()[0] == wlbt.STATUS_CALIBRATING:
    wlbt.Trigger()
    while True:
    appStatus, calibrationProcess = wlbt.GetStatus()
    # 5) Trigger: Scan (sense) according to profile and record signals
    # to be available for processing and retrieval.
    wlbt.Trigger()
    # 6) Get action: retrieve the last completed triggered recording
    targets = wlbt.GetImagingTargets()
    rasterImage, _, _, sliceDepth, power = wlbt.GetRawImageSlice()
    # PrintSensorTargets(targets)
    PrintSensorTargets(targets)
    # 7) Stop and Disconnect.
    wlbt.Stop()
    wlbt.Disconnect()
    wlbt.Clean()
    print('Terminate successfully')
    if __name__ == '__main__':
    InWallApp()

  2. Tracker example C++ Sample Code
    #include "WalabotAPI.h"
    #include <iostream>
    #include <stdio.h>
    #include <string>
    #ifdef __LINUX__
    #define CONFIG_FILE_PATH "/etc/walabotsdk.conf"
    #else
    #define CONFIG_FILE_PATH "C:\\Program Files\\Walabot\\WalabotSDK\\bin\\.config"
    #endif
    #define CHECK_WALABOT_RESULT(result, func_name) \
    { \
    if (result != WALABOT_SUCCESS) \
    { \
    const char* errorStr = Walabot_GetErrorString(); \
    std::cout << std::endl << func_name << " error: " \
    << errorStr << std::endl; \
    std::cout << "Press enter to continue ..."; \
    std::string dummy; \
    std::getline(std::cin, dummy); \
    return; \
    } \
    }
    void PrintTrackerTargets(TrackerTarget* targets, int numTargets)
    {
    int targetIdx;
    #ifdef __LINUX__
    printf("\033[2J\033[1;1H");
    #else
    system("cls");
    #endif
    if (numTargets > 0)
    {
    for (targetIdx = 0; targetIdx < numTargets; targetIdx++)
    {
    printf("Target #%d: \nX = %lf \nY = %lf \nZ = %lf \namplitude = %lf\n\n\n ",
    targetIdx,
    targets[targetIdx].xPosCm,
    targets[targetIdx].yPosCm,
    targets[targetIdx].zPosCm,
    targets[targetIdx].amplitude);
    }
    }
    else
    {
    printf("No target detected\n");
    }
    }
    void TrackerCode_SampleCode()
    {
    // --------------------
    // Variable definitions
    // --------------------
    // Walabot_GetTrackerTargets - output parameters
    TrackerTarget* targets;
    int numTargets;
    // Walabot_GetStatus - output parameters
    APP_STATUS appStatus;
    double calibrationProcess; // Percentage of calibration completed, if status is STATUS_CALIBRATING
    // Walabot_GetRawImageSlice - output parameters
    int* rasterImage;
    int sizeX;
    int sizeY;
    double sliceDepth;
    double power;
    // ------------------------
    // Initialize configuration
    // ------------------------
    // Walabot_SetArenaR - input parameters
    double minInCm = 30;
    double maxInCm = 200;
    double resICm = 3;
    // Walabot_SetArenaTheta - input parameters
    double minIndegrees = -15;
    double maxIndegrees = 15;
    double resIndegrees = 5;
    // Walabot_SetArenaPhi - input parameters
    double minPhiInDegrees = -60;
    double maxPhiInDegrees = 60;
    double resPhiInDegrees = 5;
    // ----------------------
    // Sample Code Start Here
    // ----------------------
    /*
    For an image to be received by the application, the following need to happen :
    1) Connect
    2) Configure
    3) Calibrate
    4) Start
    5) Trigger
    6) Get action
    7) Stop/Disconnect
    */
    bool mtiMode = true;
    res = Walabot_Initialize(CONFIG_FILE_PATH);
    CHECK_WALABOT_RESULT(res, "Walabot_Initialize");
    // 1) Connect : Establish communication with Walabot.
    // ==================================================
    CHECK_WALABOT_RESULT(res, "Walabot_ConnectAny");
    // 2) Configure : Set scan profile and arena
    // =========================================
    // Set Profile - to Tracker.
    // Walabot recording mode is configure with the following attributes:
    // -> Distance scanning through air;
    // -> high-resolution images
    // -> slower capture rate
    CHECK_WALABOT_RESULT(res, "Walabot_SetProfile");
    CHECK_WALABOT_RESULT(res, "Walabot_SetThreshold");
    // Setup arena - specify it by Cartesian coordinates(ranges and resolution on the x, y, z axes);
    // In Tracker mode there is need to specify Spherical coordinates(ranges and resolution along radial distance and Theta and Phi angles).
    res = Walabot_SetArenaR(minInCm, maxInCm, resICm);
    CHECK_WALABOT_RESULT(res, "Walabot_SetArenaR");
    // Sets polar range and resolution of arena (parameters in degrees).
    res = Walabot_SetArenaTheta(minIndegrees, maxIndegrees, resIndegrees);
    CHECK_WALABOT_RESULT(res, "Walabot_SetArenaTheta");
    // Sets azimuth range and resolution of arena.(parameters in degrees).
    res = Walabot_SetArenaPhi(minPhiInDegrees, maxPhiInDegrees, resPhiInDegrees);
    CHECK_WALABOT_RESULT(res, "Walabot_SetArenaPhi");
    FILTER_TYPE filterType = mtiMode ?
    FILTER_TYPE_MTI : //Moving Target Identification: standard dynamic-imaging filter
    res = Walabot_SetDynamicImageFilter(filterType);
    CHECK_WALABOT_RESULT(res, "Walabot_SetDynamicImageFilter");
    // 3) Start: Start the system in preparation for scanning.
    // =======================================================
    res = Walabot_Start();
    CHECK_WALABOT_RESULT(res, "Walabot_Start");
    // 4) Start Calibration - only if MTI mode is not set - (there is no sense
    // executing calibration when MTI is active)
    // ========================================================================
    if (!mtiMode)
    {
    // calibrates scanning to ignore or reduce the signals
    CHECK_WALABOT_RESULT(res, "Walabot_StartCalibration");
    }
    bool recording = true;
    while (recording)
    {
    // calibrates scanning to ignore or reduce the signals
    res = Walabot_GetStatus(&appStatus, &calibrationProcess);
    CHECK_WALABOT_RESULT(res, "Walabot_GetStatus");
    // 5) Trigger: Scan(sense) according to profile and record signals to be
    // available for processing and retrieval.
    // ====================================================================
    res = Walabot_Trigger();
    CHECK_WALABOT_RESULT(res, "Walabot_Trigger");
    // 6) Get action : retrieve the last completed triggered recording
    // ================================================================
    res = Walabot_GetTrackerTargets(&targets, &numTargets);
    CHECK_WALABOT_RESULT(res, "Walabot_GetTrackerTargets");
    res = Walabot_GetRawImageSlice(&rasterImage, &sizeX, &sizeY, &sliceDepth, &power);
    CHECK_WALABOT_RESULT(res, "Walabot_GetRawImageSlice");
    // ******************************
    // TODO: add processing code here
    // ******************************
    PrintTrackerTargets(targets, numTargets);
    }
    // 7) Stop and Disconnect.
    // ======================
    res = Walabot_Stop();
    CHECK_WALABOT_RESULT(res, "Walabot_Stop");
    CHECK_WALABOT_RESULT(res, "Walabot_Disconnect");
    CHECK_WALABOT_RESULT(res, "Walabot_Clean");
    }
    int main()
    {
    TrackerCode_SampleCode();
    }
    Pyhton Sample Code
    from __future__ import print_function # WalabotAPI works on both Python 2 an 3.
    from sys import platform
    from os import system
    from imp import load_source
    from os.path import join
    if platform == 'win32':
    modulePath = join('C:/', 'Program Files', 'Walabot', 'WalabotSDK',
    'python', 'WalabotAPI.py')
    elif platform.startswith('linux'):
    modulePath = join('/usr', 'share', 'walabot', 'python', 'WalabotAPI.py')
    wlbt = load_source('WalabotAPI', modulePath)
    wlbt.Init()
    def PrintTrackerTargets(targets):
    system('cls' if platform == 'win32' else 'clear')
    if targets:
    for i, target in enumerate(targets):
    print('Target #{}:\nx: {}\ny: {}\nz: {}\namplitude: {}\n'.format(
    i + 1, target.xPosCm, target.yPosCm, target.zPosCm,
    target.amplitude))
    else:
    print('No Target Detected')
    def TrackerApp():
    # wlbt.SetArenaR - input parameters
    minInCm, maxInCm, resInCm = 30, 200, 3
    # wlbt.SetArenaTheta - input parameters
    minIndegrees, maxIndegrees, resIndegrees = -15, 15, 5
    # wlbt.SetArenaPhi - input parameters
    minPhiInDegrees, maxPhiInDegrees, resPhiInDegrees = -60, 60, 5
    # Set MTI mode
    mtiMode = True
    # Initializes walabot lib
    wlbt.Initialize()
    # 1) Connect : Establish communication with walabot.
    wlbt.ConnectAny()
    # 2) Configure: Set scan profile and arena
    # Set Profile - to Tracker.
    wlbt.SetProfile(wlbt.PROF_TRACKER)
    # Set threshold
    wlbt.SetThreshold(30)
    # Setup arena - specify it by Cartesian coordinates.
    wlbt.SetArenaR(minInCm, maxInCm, resInCm)
    # Sets polar range and resolution of arena (parameters in degrees).
    wlbt.SetArenaTheta(minIndegrees, maxIndegrees, resIndegrees)
    # Sets azimuth range and resolution of arena.(parameters in degrees).
    wlbt.SetArenaPhi(minPhiInDegrees, maxPhiInDegrees, resPhiInDegrees)
    # Moving Target Identification: standard dynamic-imaging filter
    filterType = wlbt.FILTER_TYPE_MTI if mtiMode else wlbt.FILTER_TYPE_NONE
    wlbt.SetDynamicImageFilter(filterType)
    # 3) Start: Start the system in preparation for scanning.
    wlbt.Start()
    if not mtiMode: # if MTI mode is not set - start calibrartion
    # calibrates scanning to ignore or reduce the signals
    wlbt.StartCalibration()
    while wlbt.GetStatus()[0] == wlbt.STATUS_CALIBRATING:
    wlbt.Trigger()
    while True:
    appStatus, calibrationProcess = wlbt.GetStatus()
    # 5) Trigger: Scan(sense) according to profile and record signals
    # to be available for processing and retrieval.
    wlbt.Trigger()
    # 6) Get action: retrieve the last completed triggered recording
    targets = wlbt.GetTrackerTargets()
    rasterImage, _, _, sliceDepth, power = wlbt.GetRawImageSlice()
    # PrintTrackerTargets(targets)
    PrintTrackerTargets(targets)
    # 7) Stop and Disconnect.
    wlbt.Stop()
    wlbt.Disconnect()
    wlbt.Clean()
    print('Terminate successfully')
    if __name__ == '__main__':
    TrackerApp()

  3. Tracker example Pyhton Sample Code
    from __future__ import print_function, division
    from datetime import datetime # used to the current time
    from math import sin, cos, radians, sqrt # used to calculate MAX_Y_VALUE
    import WalabotAPI as wlbt
    try:
    input = raw_input
    except NameError:
    pass
    R_MIN, R_MAX, R_RES = 10, 60, 2 # SetArenaR parameters
    THETA_MIN, THETA_MAX, THETA_RES = -15, 15, 2 # SetArenaTheta parameters
    PHI_MIN, PHI_MAX, PHI_RES = -10, 10, 10 # SetArenaPhi parametes
    THRESHOLD = 15 # SetThreshold parametes
    MAX_X_VALUE = R_MAX * sin(radians(THETA_MAX))
    SENSITIVITY = 0.25 # amount of seconds to wait after a move has been detected
    TENDENCY_LOWER_BOUND = 0.04 # tendency below that won't count as entrance/exit
    IGNORED_LENGTH = 3 # len in cm to ignore targets in center of arena
    ASSUMED_FRAME_RATE = 8
    wlbt.Init()
    wlbt.SetSettingsFolder()
    def getNumOfPeopleInside():
    """ Gets the current number of people in the room as input and returns it.
    Validate that the number is valid.
    Returns:
    num Number of people in the room that got as input
    """
    num = input('- Enter current number of people in the room: ')
    if (not num.isdigit()) or (int(num) < 0):
    print('- Invalid input, try again.')
    return getNumOfPeopleInside()
    return int(num)
    def verifyWalabotIsConnected():
    """ Check for Walabot connectivity. loop until detect a Walabot.
    """
    while True:
    try:
    wlbt.ConnectAny()
    except wlbt.WalabotError as err:
    input("- Connect Walabot and press 'Enter'.")
    else:
    print('- Connection to Walabot established.')
    return
    def setWalabotSettings():
    """ Configure Walabot's profile, arena (r, theta, phi), threshold and
    the image filter.
    """
    wlbt.SetProfile(wlbt.PROF_TRACKER)
    wlbt.SetArenaR(R_MIN, R_MAX, R_RES)
    wlbt.SetArenaTheta(THETA_MIN, THETA_MAX, THETA_RES)
    wlbt.SetArenaPhi(PHI_MIN, PHI_MAX, PHI_RES)
    wlbt.SetThreshold(THRESHOLD)
    wlbt.SetDynamicImageFilter(wlbt.FILTER_TYPE_NONE)
    print('- Walabot Configured.')
    def startAndCalibrateWalabot():
    """ Start the Walabot and calibrate it.
    """
    wlbt.Start()
    wlbt.StartCalibration()
    print('- Calibrating...')
    while wlbt.GetStatus()[0] == wlbt.STATUS_CALIBRATING:
    wlbt.Trigger()
    print('- Calibration ended.\n- Ready!')
    def getDataList():
    """ Detect and record a list of Walabot sensor targets. Stop recording
    and return the data when enough triggers has occured (according to the
    SENSITIVITY) with no detection of targets.
    Returns:
    dataList: A list of the yPosCm attribute of the detected
    sensor targets
    """
    while True:
    wlbt.Trigger()
    targets = wlbt.GetTrackerTargets()
    if targets:
    targets = [max(targets, key=distance)]
    numOfFalseTriggers = 0
    triggersToStop = ASSUMED_FRAME_RATE * SENSITIVITY
    while numOfFalseTriggers < triggersToStop:
    wlbt.Trigger()
    newTargets = wlbt.GetTrackerTargets()
    if newTargets:
    targets.append(max(newTargets, key=distance))
    numOfFalseTriggers = 0
    else:
    numOfFalseTriggers += 1
    yList = [
    t.xPosCm for t in targets ]
    if yList:
    return yList
    def distance(t):
    return sqrt(t.xPosCm**2 + t.yPosCm**2 + t.zPosCm**2)
    def analizeAndAlert(dataList, numOfPeople):
    """ Analize a given dataList and print to the screen one of two results
    if occured: an entrance or an exit.
    Arguments:
    dataList A list of values
    numOfPeople The current number of people in the room
    returns:
    numOfPeople The new number of people in the room
    """
    currentTime = datetime.now().strftime('%H:%M:%S')
    if len(dataList) == 0:
    return numOfPeople
    tendency = getTypeOfMovement(dataList)
    if tendency > 0:
    result = ': Someone has left!'.ljust(25)
    numOfPeople -= 1
    elif tendency < 0:
    result = ': Someone has entered!'.ljust(25)
    numOfPeople += 1
    else: # do not count as a valid entrance / exit
    result = ': Someone is at the door!'.ljust(25)
    numToDisplay = ' Currently '+str(numOfPeople)+' people in the room.'
    print(currentTime+result+numToDisplay)
    return numOfPeople
    def getTypeOfMovement(dataList):
    """ Calculate and return the type of movement detected.
    The movement only counts as a movement inside/outside if the tendency
    if above TENDENCY_LOWER_BOUND and if the we have at least of item from
    both sides of the door header.
    Arguments:
    dataList A list of values
    Returns:
    tendency if zero - not count as a valid entrance/exit
    if positive - counts as exiting the room
    if negative - counts as entering the room
    """
    if dataList:
    velocity = getVelocity(dataList)
    tendency = (velocity * len(dataList)) / (2 * MAX_X_VALUE)
    side1 = any(x > 0 for x in dataList)
    side2 = any(x < 0 for x in dataList)
    bothSides = side1 and side2
    aboveLowerBound = abs(tendency) > TENDENCY_LOWER_BOUND
    if bothSides or aboveLowerBound:
    return -tendency
    if len(dataList) == 1:
    return dataList[0]
    return 0
    def getVelocity(data):
    """ Calculate velocity of a given set of values using linear regression.
    Arguments:
    data An iterator contains values.
    Returns:
    velocity The estimates slope.
    """
    sumY = sumXY = 0
    for x, y in enumerate(data):
    sumY, sumXY = sumY + y, sumXY + x*y
    if sumXY == 0: # no values / one values only / all values are 0
    return 0
    sumX = x * (x+1) / 2 # Gauss's formula - sum of first x natural numbers
    sumXX = x * (x+1) * (2*x+1) / 6 # sum of sequence of squares
    return (sumXY - sumX*sumY/(x+1)) / (sumXX - sumX**2/(x+1))
    def stopAndDisconnectWalabot():
    """ Stops Walabot and disconnect the device.
    """
    wlbt.Stop()
    wlbt.Disconnect()
    def PeopleCounter():
    """ Main function. init and configure the Walabot, get the current number
    of people from the user, start the main loop of the app.
    Walabot scan constantly and record sets of data (when peoples are
    near the door header). For each data set, the app calculates the type
    of movement recorded and acts accordingly.
    """
    verifyWalabotIsConnected()
    numOfPeople = getNumOfPeopleInside()
    setWalabotSettings()
    startAndCalibrateWalabot()
    try:
    while True:
    dataList = getDataList()
    numOfPeople = analizeAndAlert(dataList, numOfPeople)
    except KeyboardInterrupt:
    pass
    finally:
    stopAndDisconnectWalabot()
    if __name__ == '__main__':
    PeopleCounter()

  4. Gesture recognition example: This sample code allows you to flip pages of a file (a pdf file, a presentation etc.) using a hand gesture.
    By moving your hand along the Walabots' y axis in a gentle wave fashion, a page would flip forward or backwards.
    After running the code, you need to bring into focus the file which you want to use the app with.
    In order to make the files' paged to flip, The code takes over the "PgUp" and "PgDn" keys of your keyboard.
    If you wish, you can decide which keys should be pressed as the outcome of your hand gesture, by changing the virtual key-codes (in the function PageFlip)
    IMPORTANT NOTE: The hand should cross the origin of the walabot device during its movement.
    #include "WalabotAPI.h"
    #include <stdio.h>
    #include <iostream>
    #include <conio.h>
    #include <string>
    #define WINVER 0x0500
    #include <windows.h>
    #include <fstream>
    // This sample code allows you to flip pages of a file (a pdf file, a presentation etc.) using a hand gesture.
    // By moving your hand along the Walabots' y axis in a gentle wave fashion, a page would flip forward or backwards.
    // After running the code, you need to bring into focus the file which you want to use the app with.
    // In order to make the files' paged to flip, The code takes over the "PgUp" and "PgDn" keys of your keyboard.
    // If you wish, you can decide which keys should be pressed as the outcome of your hand gesture, by changing the virtual key-codes (in the function PageFlip)
    // IMPORTANT NOTE: The hand should cross the origin of the walabot device during its movement.
    #define CHECK_WALABOT_RESULT(result, func_name) \
    { \
    if (result != WALABOT_SUCCESS) \
    { \
    unsigned int extended = Walabot_GetExtendedError(); \
    const char* errorStr = Walabot_GetErrorString(); \
    std::cout << std::endl << "Error at " __FILE__ << ":" \
    << std::dec << __LINE__ << " - " \
    << func_name << " result is 0x" << std::hex \
    << result << std::endl; \
    \
    std::cout << "Error string: " << errorStr << std::endl; \
    \
    std::cout << "Extended error: 0x" << std::hex \
    << extended << std::endl << std::endl; \
    \
    std::cout << "Press enter to continue ..."; \
    std::string dummy; \
    std::getline(std::cin, dummy); \
    return; \
    } \
    }
    // Global Variables
    int gFlag = 0; // 0 when the array of ypos samples needs to be completely reset with new samples
    const double gDeltaY = 0.6; // The difference by which 2 successive ypos samples, are checked for increasing/decreasing tendency
    const int gSampleSizeWindow = 6; // Number of ypos samples to be taken at each loop
    int gCleanSampleSize = 0; // Number of yPos samples received after a single loop (not every trigger action is guaranteed to return a target)
    int gRestTime = 300; // Amount of milliseconds to rest after identifying a gesture and turning a page (gives time to move the hand out
    // of the arena to avoid an unintentional reading)
    // Returns true if a there is at least one positive y position in YposSorted
    bool GotPositive(double YposSorted[])
    {
    for (int k = 0; k < gCleanSampleSize; k++)
    {
    if (YposSorted[k] > 0)
    {
    return true;
    }
    }
    return false;
    }
    // Returns true if a there is at least one negative y position in YposSorted
    bool GotNegative(double YposSorted[])
    {
    for (int k = 0; k < gCleanSampleSize; k++)
    {
    if (YposSorted[k] < 0)
    {
    return true;
    }
    }
    return false;
    }
    // Given the array YposArray - moves the actual target values to the front of the array
    double* SortYposArray(double YposArray[])
    {
    double YposSorted[gSampleSizeWindow];
    for (int k = 0; k < gSampleSizeWindow; k++)
    {
    if (YposArray[k] < 617)
    {
    YposSorted[gCleanSampleSize] = YposArray[k];
    gCleanSampleSize++;
    }
    }
    return YposSorted;
    }
    // Returns a score by checking the direction of the y coordinates in the array YposSorted
    int GetScore(double YposSorted[])
    {
    int score = 0;
    for (int k = 1; k < gCleanSampleSize; k++)
    {
    if ((YposSorted[k] - YposSorted[k - 1])<gDeltaY)
    {
    score++;
    }
    else if ((YposSorted[k] - YposSorted[k - 1])>gDeltaY)
    {
    score--;
    }
    }
    return score;
    }
    // Flips page
    void PageFlip(double YposArray[])
    {
    double *YsortedPointer;
    YsortedPointer = SortYposArray(YposArray);
    double YposSorted[gSampleSizeWindow];
    for (int k = 0; k < gCleanSampleSize; k++)
    {
    YposSorted[k] = *(YsortedPointer + k);
    }
    if (GotNegative(YposSorted) == true && GotPositive(YposSorted) == true)
    {
    int Score = GetScore(YposSorted);
    int CurrentCleanSampleSize = gCleanSampleSize;
    gCleanSampleSize = 0; // RESET VALUE
    if (Score > 0 && Score > (CurrentCleanSampleSize / 2.5))
    {
    INPUT ip;
    // Set up a generic keyboard event.
    ip.type = INPUT_KEYBOARD;
    ip.ki.wScan = 0; // hardware scan code for key
    ip.ki.time = 0;
    ip.ki.dwExtraInfo = 0;
    // Press the "PgDn" key
    ip.ki.wVk = 0x22; // virtual-key code for the "PgDn" key
    ip.ki.dwFlags = 0; // 0 for key press
    SendInput(1, &ip, sizeof(INPUT));
    // Release the "PgDn" key
    ip.ki.dwFlags = KEYEVENTF_KEYUP; // KEYEVENTF_KEYUP for key release
    SendInput(1, &ip, sizeof(INPUT));
    gFlag = 0;
    Sleep(gRestTime);
    }
    else if (Score < 0 && abs(Score) >(CurrentCleanSampleSize / 2.5))
    {
    INPUT ip;
    // Set up a generic keyboard event.
    ip.type = INPUT_KEYBOARD;
    ip.ki.wScan = 0; // hardware scan code for key
    ip.ki.time = 0;
    ip.ki.dwExtraInfo = 0;
    // Press the "PgUp" key
    ip.ki.wVk = 0x21; // virtual-key code for the "PgUp" key
    ip.ki.dwFlags = 0; // 0 for key press
    SendInput(1, &ip, sizeof(INPUT));
    // Release the "PgUp" key
    ip.ki.dwFlags = KEYEVENTF_KEYUP; // KEYEVENTF_KEYUP for key release
    SendInput(1, &ip, sizeof(INPUT));
    gFlag = 0;
    Sleep(gRestTime);
    }
    else
    {
    return;
    }
    }
    else
    {
    gCleanSampleSize = 0; // RESET VALUE
    return;
    }
    }
    // Get y of closest target projected on the Y-Z plane
    double GetYposOfClosestTarget(SensorTarget *targets, int numTargets)
    {
    // Set initial parameter values
    int ClosestTargetIndex = 0;
    double SizeOfClosestTargetYZ = sqrt(pow(targets[0].yPosCm, 2) + pow(targets[0].zPosCm, 2));
    for (int k = 1; k < numTargets; k++)
    {
    double SizeOfTargetYZ = sqrt(pow(targets[k].zPosCm, 2) + pow(targets[k].yPosCm, 2));
    if (SizeOfTargetYZ< SizeOfClosestTargetYZ)
    {
    ClosestTargetIndex = k;
    SizeOfClosestTargetYZ = SizeOfTargetYZ;
    }
    }
    return targets[ClosestTargetIndex].yPosCm;
    }
    // Get y coordinate of sensed target
    double GetYpos(SensorTarget* targets, int numTargets)
    {
    if (numTargets > 1)
    {
    return GetYposOfClosestTarget(targets, numTargets);
    }
    else if (numTargets == 1)
    {
    return targets->yPosCm;
    }
    else
    {
    return 617; // A value that is out of range at any case- marks that no actual target was detected
    }
    }
    void FlipPages_SampleCode()
    {
    // --------------------
    // Variable definitions
    // --------------------
    // Walabot_GetStatus - output parameters
    APP_STATUS appStatus;
    double calibrationProcess; // Percentage of calibration completed, if status is STATUS_CALIBRATING
    SensorTarget *targets;
    int numTargets;
    double YposArray[gSampleSizeWindow];
    // ------------------------
    // Initialize configuration
    // ------------------------
    double rArenaMin = 10.0;
    double rArenaMax = 40.0;
    double rArenaRes = 5.0;
    double thetaArenaMin = -20.0;
    double thetaArenaMax = 20.0;
    double thetaArenaRes = 10.0;
    double phiArenaMin = -45.0;
    double phiArenaMax = 45.0;
    double phiArenaRes = 5.0;
    double threshold = 8.0;
    // Configure Walabot database install location (for windows)
    res = Walabot_SetSettingsFolder("C:/ProgramData/Walabot/WalabotSDK");
    CHECK_WALABOT_RESULT(res, "Walabot_SetSettingsFolder");
    // Connect : Establish communication with Walabot.
    // ==================================================
    CHECK_WALABOT_RESULT(res, "Walabot_ConnectAny");
    // Configure : Set scan profile and arena
    // =========================================
    // Set Profile - SENSOR Profile
    // Walabot recording mode is configured with the following attributes:
    // -> Distance scanning through air;
    // -> High-resolution images, but slower capture rate;
    CHECK_WALABOT_RESULT(res, "Walabot_SetProfile");
    // Set arena size and resolution with Polar coordinates:
    res = Walabot_SetArenaR(rArenaMin, rArenaMax, rArenaRes);
    CHECK_WALABOT_RESULT(res, "Walabot_SetArenaR");
    res = Walabot_SetArenaTheta(thetaArenaMin, thetaArenaMax, thetaArenaRes);
    CHECK_WALABOT_RESULT(res, "Walabot_SetArenaTheta");
    res = Walabot_SetArenaPhi(phiArenaMin, phiArenaMax, phiArenaRes);
    CHECK_WALABOT_RESULT(res, "Walabot_SetArenaPhi");
    // Set threshold
    res = Walabot_SetThreshold(threshold);
    CHECK_WALABOT_RESULT(res, "Walabot_SetThreshold");
    // Set Walabot filtering type
    CHECK_WALABOT_RESULT(res, "Walabot_SetDynamicImageFilter");
    // Start: Start the system in preparation for scanning.
    // =======================================================
    res = Walabot_Start();
    CHECK_WALABOT_RESULT(res, "Walabot_Start");
    // calibrates scanning to ignore or reduce the signals
    CHECK_WALABOT_RESULT(res, "Walabot_StartCalibration");
    // calibrates scanning to ignore or reduce the signals
    res = Walabot_GetStatus(&appStatus, &calibrationProcess);
    CHECK_WALABOT_RESULT(res, "Walabot_GetStatus");
    // Display message to the user:
    std::cout << "The app is up and running- to use the app, bring your file into focus" << '\n';
    // Loop
    bool recording = true;
    while (recording)
    {
    if (gFlag == 0)
    {
    for (int k = 0; k < gSampleSizeWindow; k++)
    {
    // Trigger: Scan(sense) according to profile and record signals to be
    // available for processing and retrieval.
    // ====================================================================
    res = Walabot_Trigger();
    CHECK_WALABOT_RESULT(res, "Walabot_Trigger");
    // Get action : retrieve the last completed triggered recording
    // ================================================================
    res = Walabot_GetSensorTargets(&targets, &numTargets);
    CHECK_WALABOT_RESULT(res, "Walabot_GetSensorTargets");
    YposArray[k] = GetYpos(targets, numTargets);
    }
    gFlag = 1;
    PageFlip(YposArray);
    }
    if (gFlag == 1)
    {
    for (int k = 1; k < gSampleSizeWindow; k++)
    {
    YposArray[k - 1] = YposArray[k];
    }
    res = Walabot_Trigger();
    CHECK_WALABOT_RESULT(res, "Walabot_Trigger");
    res = Walabot_GetSensorTargets(&targets, &numTargets);
    CHECK_WALABOT_RESULT(res, "Walabot_GetSensorTargets");
    YposArray[gSampleSizeWindow - 1] = GetYpos(targets, numTargets);
    PageFlip(YposArray);
    }
    }
    // Stop and Disconnect.
    // ======================
    res = Walabot_Stop();
    CHECK_WALABOT_RESULT(res, "Walabot_Stop");
    CHECK_WALABOT_RESULT(res, "Walabot_Disconnect");
    }
    #ifndef _SAMPLE_CODE_
    int main()
    {
    FlipPages_SampleCode();
    }
    #endif



    Fill out our 5 question survey Share Your API Feedback