SparkFun Qwiic Buzzer  v1.0.1-17-gba6cd53
Library for the SparkFun Qwiic Buzzer
Loading...
Searching...
No Matches
SparkFun_Qwiic_Buzzer_Arduino_Library.h
Go to the documentation of this file.
1
17#pragma once
18
19// clang-format off
20#include <SparkFun_Toolkit.h>
21#include "sfTk/sfDevBuzzer.h"
22// clang-format on
24{
25 public:
30 bool begin(const uint8_t address = SFE_QWIIC_BUZZER_DEFAULT_ADDRESS, TwoWire &wirePort = Wire)
31 {
32 // Setup Arudino I2C bus
33 _theI2CBus.init(wirePort, address);
34
35 // Begin the sensor
36 return sfDevBuzzer::begin(&_theI2CBus) == ksfTkErrOk;
37 }
38
42 {
43 return sfDevBuzzer::isConnected() == ksfTkErrOk;
44 }
45
46 private:
47 sfTkArdI2C _theI2CBus;
48};
Definition: SparkFun_Qwiic_Buzzer_Arduino_Library.h:24
bool isConnected()
Checks if the Qwiic Buzzer is connected.
Definition: SparkFun_Qwiic_Buzzer_Arduino_Library.h:41
bool begin(const uint8_t address=SFE_QWIIC_BUZZER_DEFAULT_ADDRESS, TwoWire &wirePort=Wire)
Begins the Qwiic Buzzer.
Definition: SparkFun_Qwiic_Buzzer_Arduino_Library.h:30
Definition: sfDevBuzzer.h:43
uint8_t address()
Gets the current I2C address of the Qwiic Buzzer.
Definition: sfDevBuzzer.cpp:146
sfTkError_t isConnected()
Checks if the Qwiic Buzzer is connected.
Definition: sfDevBuzzer.cpp:50
sfTkError_t begin(sfTkII2C *theBus=nullptr)
Begins the Qwiic Buzzer.
Definition: sfDevBuzzer.cpp:21
Header file for SparkFun Qwiic Buzzer Library.
#define SFE_QWIIC_BUZZER_DEFAULT_ADDRESS
Definition: sfDevBuzzer.h:33