0121-17 Monarco HAT Reading Ultrasonic Sensor

Example Projects > 0121 Monarco HAT > 0121-17 Monarco HAT Reading Ultrasonic Sensor

Monarco HAT reading Ultrasonic Sensor

This folder contains the source files for the demonstration project on using REXYGEN on the Raspberry Pi minicomputer with the Monarco HAT add-on board.

In this example the Monarco HAT is reading Ultrasonic Sensor via analog input.

The measured temperature and status of the output is recorded in the TRND blocks
which allow displaying of the trends (graphs).

Timing of the project

The algorithm runs each 2 milliseconds (0.002 s). See the EXEC function block,
tick x ntick0 = 0.002 x 1 = 0.002 s.


  • REXYGEN Runtime Core and MonarcoDrv modules must be installed and running on the Raspberry Pi.

Running the example

  • The *exec.mdl file is the project main file, open it with REXYGEN Studio.
  • Compile and download the project to the target device.
  • Switch to Watch mode and observe the algorithm (use Target->Watch Selection to display real-time data).


Additional information