Arduino_OplaUI - setSteps()

Sets the number of steps to draw between minimum and maximum. This only affects how many segments are drawn, but it does not prevent you from assigning any value within the range

Syntax

gauge.setSteps(steps);

Parameters

  • steps: 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);
  gauge1.setSteps(8);
}

See also