You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/SparkFun_Qwiic_Button.h
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,7 @@ Distributed as-is; no warranty is given.
26
26
#include<Arduino.h>
27
27
#include"registers.h"
28
28
29
-
#defineDEV_ADDR0x5F//default device address of the QwiicButton
29
+
#defineDEV_ADDR0x60//default device address of the QwiicButton
30
30
#defineDEV_ID_BTN0x5D//device ID of the Qwiic Button
31
31
#defineDEV_ID_SW0x5E//device ID of the Qwiic Switch
32
32
@@ -43,6 +43,7 @@ class QwiicButton {
43
43
boolcheckDeviceID(); //Returns true if the device ID matches that of either the button or the switch
44
44
uint8_tgetDeviceType(); //Returns 1 if a button is attached, 2 if a switch is attached. Returns 0 if there is no device attached.
45
45
uint16_tgetFirmwareVersion(); //Returns the firmware version of the attached device as a 16-bit integer. The leftmost (high) byte is the major revision number, and the rightmost (low) byte is the minor revision number.
46
+
boolsetI2Caddress(uint8_t address); //Configures the attached device to attach to the I2C bus using the specified address
46
47
47
48
//Button status/config
48
49
boolisPressed(); //Returns 1 if the button/switch is pressed, and 0 otherwise
0 commit comments