Arduino_OplaUI - setDigits()

Sets the precision of the value expressed in number of decimal digits to show.

Syntax

gauge.setDigits(digits);

Parameters

  • digits: 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.setDigits(1);
}

See also