Arduino_OplaUI - setRange()

Sets the minimum and the maximum values displayed by the gauge.

Syntax

gauge.setRange(min, max);

Parameters

  • min: a variable of type int
  • max: a variable of type int

Example

#include <Arduino_MKRIoTCarrier.h>
#include <Arduino_OplaUI.h>

MKRIoTCarrier carrier;
OplaGauge1 gauge1;

void setup() {
  carrier.begin();
  gauge1.begin(carrier.display);
  gauge1.setRange(-40, 40);
}

See also