Arduino TKJHAT
Arduino library for Pico HAT extension board
Loading...
Searching...
No Matches
TKJHAT Class Reference

Main interface for accessing TKJHAT board features. More...

#include <TKJHAT.h>

Public Member Functions

void begin ()
 Initialize all peripherals on the HAT Also initializes the default I2C bus for sensors and display.
 TKJHAT ()
 Construct a new TKJHAT object.

Public Attributes

Button button1
 Button 1 on the board.
Button button2
 Button 2 on the board.
Buzzer buzzer
 Buzzer output.
Display display
 Display module.
HDC2021 hdc2021
 Temperature and humidity sensor.
ICM42670 icm42670
 IMU sensor (accelerometer + gyroscope).
Led led
 Onboard LED.
LightSensor lightSensor
 Ambient light sensor.
RGBLed rgbLed
 RGB LED.

Detailed Description

Main interface for accessing TKJHAT board features.

Example:

TKJHAT hat;
void setup() {
hat.begin();
}
void loop() {
if (hat.button1.isPressed()) {
hat.led.on();
}
}
TKJHAT()
Construct a new TKJHAT object.
Examples
Button.ino, Buzzer.ino, Display.ino, HDC2021.ino, ICM42670.ino, Led.ino, Lightsensor.ino, and RGBLed.ino.

Member Function Documentation

◆ begin()

void TKJHAT::begin ( )

Initialize all peripherals on the HAT Also initializes the default I2C bus for sensors and display.

Must be called in setup() before using any components.

Examples
Button.ino, Display.ino, HDC2021.ino, ICM42670.ino, and Lightsensor.ino.

The documentation for this class was generated from the following file: