16 uint32_t lux = hat.lightSensor.readLight();
18 if (!hat.button1.isPressed()) {
22 hat.display.writeTextPositioned(0, 0,
"Light Intensity:", 1);
23 String text = String(lux);
24 hat.display.writeTextPositioned(0, 16, text.c_str(), 1);
28 hat.display.writeTextPositioned(0, 0,
"STOPPED");
Main interface for accessing TKJHAT board features.
void begin()
Initialize all peripherals on the HAT Also initializes the default I2C bus for sensors and display.