LDR - scaleTo

How to scale LDR values

Example

This example shows how to read LDR values and scale it to another range.

#include <NanoPlayBoard.h>

NanoPlayBoard board;

void setup() {

}

void loop() {
  int value = board.ldr.scaleTo(0, 99);
  board.ledmatrix.printInLandscape(value);
}

The source code of this example is available on GitHub.