From 0e267252998abda41357ab782221d8dd1d7b20ca Mon Sep 17 00:00:00 2001 From: <> Date: Mon, 25 Nov 2024 22:48:16 +0000 Subject: [PATCH] Deployed 0b4a077 with MkDocs version: 1.6.1 --- .nojekyll | 0 404.html | 1097 + arduino_example/index.html | 1672 + arduino_library/index.html | 1265 + ...parkFun_Qwiic_Directional_Pad_3D_Image.png | Bin 0 -> 153056 bytes ...parkFun_Qwiic_Directional_Pad_3D_Model.glb | Bin 0 -> 2004836 bytes ...arkFun_Qwiic_Directional_Pad_3D_Model.step | 108837 +++++++++++++++ assets/Qwiic-registered-updated.png | Bin 0 -> 60410 bytes ...Qwiic_Directional_Pad-Board_Dimensions.svg | 2868 + ...n_Qwiic_Directional_Pad_Schematic_v1_1.pdf | Bin 0 -> 209343 bytes .../SparkFun_Qwiic_Directional_Pad_v1_1.zip | Bin 0 -> 247728 bytes .../Korean-Hroparts-Elec-K1-1210UN.pdf | Bin 0 -> 251838 bytes .../directional-pad.svg | 4 + assets/component_documentation/index.html | 1190 + assets/component_documentation/pca9554.pdf | Bin 0 -> 1749897 bytes assets/images/favicon.png | Bin 0 -> 1870 bytes ..._Output_Example1_Qwiic_Directional_Pad.JPG | Bin 0 -> 94762 bytes ...wiic_Directional_Pad_Interrupt_PCA9554.JPG | Bin 0 -> 111688 bytes ...ectional_Pad_ESP32_PCA9554_IO_Expander.jpg | Bin 0 -> 430085 bytes ...ad_ESP32_PCA9554_IO_Expander_Interrupt.jpg | Bin 0 -> 473257 bytes ...PRT-26851_Qwiic_Directional_Pad_Bottom.jpg | Bin 0 -> 268105 bytes ...Qwiic_Directional_Pad_Bottom_Interrupt.jpg | Bin 0 -> 220274 bytes ...1_Qwiic_Directional_Pad_Bottom_Jumpers.jpg | Bin 0 -> 231001 bytes ...6851_Qwiic_Directional_Pad_Bottom_LEDs.jpg | Bin 0 -> 220539 bytes ...nal_Pad_Bottom_PCA9554_IO_I2C_Expander.jpg | Bin 0 -> 227853 bytes ...ic_Directional_Pad_Bottom_Power_Ground.jpg | Bin 0 -> 228398 bytes ...c_Directional_Pad_Bottom_Qwiic_I2C_PTH.jpg | Bin 0 -> 228448 bytes .../PRT-26851_Qwiic_Directional_Pad_Top.jpg | Bin 0 -> 204505 bytes ...5-Way_Directional_Pad_Buttons_Switches.jpg | Bin 0 -> 191989 bytes ...6851_Qwiic_Directional_Pad_Top_I2C_PTH.jpg | Bin 0 -> 170215 bytes ...51_Qwiic_Directional_Pad_Top_Interrupt.jpg | Bin 0 -> 169790 bytes ...T-26851_Qwiic_Directional_Pad_Top_LEDs.jpg | Bin 0 -> 171059 bytes ...al_Pad_Top_PCA9554_IO_I2C_Expander_PTH.jpg | Bin 0 -> 170882 bytes ...Qwiic_Directional_Pad_Top_Power_Ground.jpg | Bin 0 -> 170274 bytes ..._Directional_Pad-User_Board_Dimensions.png | Bin 0 -> 49110 bytes assets/javascripts/bundle.203fd0bc.min.js | 3 + assets/javascripts/lunr/min/lunr.ar.min.js | 1 + assets/javascripts/lunr/min/lunr.da.min.js | 18 + assets/javascripts/lunr/min/lunr.de.min.js | 18 + assets/javascripts/lunr/min/lunr.du.min.js | 18 + assets/javascripts/lunr/min/lunr.el.min.js | 1 + assets/javascripts/lunr/min/lunr.es.min.js | 18 + assets/javascripts/lunr/min/lunr.fi.min.js | 18 + assets/javascripts/lunr/min/lunr.fr.min.js | 18 + assets/javascripts/lunr/min/lunr.he.min.js | 1 + assets/javascripts/lunr/min/lunr.hi.min.js | 1 + assets/javascripts/lunr/min/lunr.hu.min.js | 18 + assets/javascripts/lunr/min/lunr.hy.min.js | 1 + assets/javascripts/lunr/min/lunr.it.min.js | 18 + assets/javascripts/lunr/min/lunr.ja.min.js | 1 + assets/javascripts/lunr/min/lunr.jp.min.js | 1 + assets/javascripts/lunr/min/lunr.kn.min.js | 1 + assets/javascripts/lunr/min/lunr.ko.min.js | 1 + assets/javascripts/lunr/min/lunr.multi.min.js | 1 + assets/javascripts/lunr/min/lunr.nl.min.js | 18 + assets/javascripts/lunr/min/lunr.no.min.js | 18 + assets/javascripts/lunr/min/lunr.pt.min.js | 18 + assets/javascripts/lunr/min/lunr.ro.min.js | 18 + assets/javascripts/lunr/min/lunr.ru.min.js | 18 + assets/javascripts/lunr/min/lunr.sa.min.js | 1 + .../lunr/min/lunr.stemmer.support.min.js | 1 + assets/javascripts/lunr/min/lunr.sv.min.js | 18 + assets/javascripts/lunr/min/lunr.ta.min.js | 1 + assets/javascripts/lunr/min/lunr.te.min.js | 1 + assets/javascripts/lunr/min/lunr.th.min.js | 1 + assets/javascripts/lunr/min/lunr.tr.min.js | 18 + assets/javascripts/lunr/min/lunr.vi.min.js | 1 + assets/javascripts/lunr/min/lunr.zh.min.js | 1 + assets/javascripts/lunr/tinyseg.js | 206 + assets/javascripts/lunr/wordcut.js | 6708 + .../workers/search.c7c1ca2c.min.js | 2 + assets/sfe_favicon.png | Bin 0 -> 14810 bytes assets/sfe_logo_sm.png | Bin 0 -> 5540 bytes assets/stylesheets/main.d0dfab1c.min.css | 1 + assets/stylesheets/palette.ab4e12ef.min.css | 1 + css/timeago.css | 15 + github/contribute/index.html | 1464 + github/file_issue/index.html | 1546 + hard_copy/index.html | 1191 + hardware_hookup/index.html | 1423 + hardware_overview/index.html | 1693 + index.html | 14 + introduction/index.html | 1862 + javascript/index.html | 1190 + javascript/mathjax.js | 19 + js/timeago.min.js | 2 + js/timeago_mkdocs_material.js | 33 + resources/index.html | 1282 + search/search_index.json | 1 + single_page/index.html | 2390 + sitemap.xml | 59 + sitemap.xml.gz | Bin 0 -> 353 bytes stylesheet/extra.css | 523 + troubleshooting/index.html | 1323 + 94 files changed, 140171 insertions(+) create mode 100644 .nojekyll create mode 100644 404.html create mode 100644 arduino_example/index.html create mode 100644 arduino_library/index.html create mode 100644 assets/3d_model/SparkFun_Qwiic_Directional_Pad_3D_Image.png create mode 100644 assets/3d_model/SparkFun_Qwiic_Directional_Pad_3D_Model.glb create mode 100644 assets/3d_model/SparkFun_Qwiic_Directional_Pad_3D_Model.step create mode 100644 assets/Qwiic-registered-updated.png create mode 100644 assets/board_files/SparkFun_Qwiic_Directional_Pad-Board_Dimensions.svg create mode 100644 assets/board_files/SparkFun_Qwiic_Directional_Pad_Schematic_v1_1.pdf create mode 100644 assets/board_files/SparkFun_Qwiic_Directional_Pad_v1_1.zip create mode 100644 assets/component_documentation/Korean-Hroparts-Elec-K1-1210UN.pdf create mode 100644 assets/component_documentation/directional-pad.svg create mode 100644 assets/component_documentation/index.html create mode 100644 assets/component_documentation/pca9554.pdf create mode 100644 assets/images/favicon.png create mode 100644 assets/img/Arduino_Output_Example1_Qwiic_Directional_Pad.JPG create mode 100644 assets/img/Arduino_Output_Example2_Qwiic_Directional_Pad_Interrupt_PCA9554.JPG create mode 100644 assets/img/PRT-26851-Qwiic_Directional_Pad_ESP32_PCA9554_IO_Expander.jpg create mode 100644 assets/img/PRT-26851-Qwiic_Directional_Pad_ESP32_PCA9554_IO_Expander_Interrupt.jpg create mode 100644 assets/img/PRT-26851_Qwiic_Directional_Pad_Bottom.jpg create mode 100644 assets/img/PRT-26851_Qwiic_Directional_Pad_Bottom_Interrupt.jpg create mode 100644 assets/img/PRT-26851_Qwiic_Directional_Pad_Bottom_Jumpers.jpg create mode 100644 assets/img/PRT-26851_Qwiic_Directional_Pad_Bottom_LEDs.jpg create mode 100644 assets/img/PRT-26851_Qwiic_Directional_Pad_Bottom_PCA9554_IO_I2C_Expander.jpg create mode 100644 assets/img/PRT-26851_Qwiic_Directional_Pad_Bottom_Power_Ground.jpg create mode 100644 assets/img/PRT-26851_Qwiic_Directional_Pad_Bottom_Qwiic_I2C_PTH.jpg create mode 100644 assets/img/PRT-26851_Qwiic_Directional_Pad_Top.jpg create mode 100644 assets/img/PRT-26851_Qwiic_Directional_Pad_Top_5-Way_Directional_Pad_Buttons_Switches.jpg create mode 100644 assets/img/PRT-26851_Qwiic_Directional_Pad_Top_I2C_PTH.jpg create mode 100644 assets/img/PRT-26851_Qwiic_Directional_Pad_Top_Interrupt.jpg create mode 100644 assets/img/PRT-26851_Qwiic_Directional_Pad_Top_LEDs.jpg create mode 100644 assets/img/PRT-26851_Qwiic_Directional_Pad_Top_PCA9554_IO_I2C_Expander_PTH.jpg create mode 100644 assets/img/PRT-26851_Qwiic_Directional_Pad_Top_Power_Ground.jpg create mode 100644 assets/img/SparkFun_Qwiic_Directional_Pad-User_Board_Dimensions.png create mode 100644 assets/javascripts/bundle.203fd0bc.min.js create mode 100644 assets/javascripts/lunr/min/lunr.ar.min.js create mode 100644 assets/javascripts/lunr/min/lunr.da.min.js create mode 100644 assets/javascripts/lunr/min/lunr.de.min.js create mode 100644 assets/javascripts/lunr/min/lunr.du.min.js create mode 100644 assets/javascripts/lunr/min/lunr.el.min.js create mode 100644 assets/javascripts/lunr/min/lunr.es.min.js create mode 100644 assets/javascripts/lunr/min/lunr.fi.min.js create mode 100644 assets/javascripts/lunr/min/lunr.fr.min.js create mode 100644 assets/javascripts/lunr/min/lunr.he.min.js create mode 100644 assets/javascripts/lunr/min/lunr.hi.min.js create mode 100644 assets/javascripts/lunr/min/lunr.hu.min.js create mode 100644 assets/javascripts/lunr/min/lunr.hy.min.js create mode 100644 assets/javascripts/lunr/min/lunr.it.min.js create mode 100644 assets/javascripts/lunr/min/lunr.ja.min.js create mode 100644 assets/javascripts/lunr/min/lunr.jp.min.js create mode 100644 assets/javascripts/lunr/min/lunr.kn.min.js create mode 100644 assets/javascripts/lunr/min/lunr.ko.min.js create mode 100644 assets/javascripts/lunr/min/lunr.multi.min.js create mode 100644 assets/javascripts/lunr/min/lunr.nl.min.js create mode 100644 assets/javascripts/lunr/min/lunr.no.min.js create mode 100644 assets/javascripts/lunr/min/lunr.pt.min.js create mode 100644 assets/javascripts/lunr/min/lunr.ro.min.js create mode 100644 assets/javascripts/lunr/min/lunr.ru.min.js create mode 100644 assets/javascripts/lunr/min/lunr.sa.min.js create mode 100644 assets/javascripts/lunr/min/lunr.stemmer.support.min.js create mode 100644 assets/javascripts/lunr/min/lunr.sv.min.js create mode 100644 assets/javascripts/lunr/min/lunr.ta.min.js create mode 100644 assets/javascripts/lunr/min/lunr.te.min.js create mode 100644 assets/javascripts/lunr/min/lunr.th.min.js create mode 100644 assets/javascripts/lunr/min/lunr.tr.min.js create mode 100644 assets/javascripts/lunr/min/lunr.vi.min.js create mode 100644 assets/javascripts/lunr/min/lunr.zh.min.js create mode 100644 assets/javascripts/lunr/tinyseg.js create mode 100644 assets/javascripts/lunr/wordcut.js create mode 100644 assets/javascripts/workers/search.c7c1ca2c.min.js create mode 100644 assets/sfe_favicon.png create mode 100644 assets/sfe_logo_sm.png create mode 100644 assets/stylesheets/main.d0dfab1c.min.css create mode 100644 assets/stylesheets/palette.ab4e12ef.min.css create mode 100644 css/timeago.css create mode 100644 github/contribute/index.html create mode 100644 github/file_issue/index.html create mode 100644 hard_copy/index.html create mode 100644 hardware_hookup/index.html create mode 100644 hardware_overview/index.html create mode 100644 index.html create mode 100644 introduction/index.html create mode 100644 javascript/index.html create mode 100644 javascript/mathjax.js create mode 100644 js/timeago.min.js create mode 100644 js/timeago_mkdocs_material.js create mode 100644 resources/index.html create mode 100644 search/search_index.json create mode 100644 single_page/index.html create mode 100644 sitemap.xml create mode 100644 sitemap.xml.gz create mode 100644 stylesheet/extra.css create mode 100644 troubleshooting/index.html diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 0000000..e69de29 diff --git a/404.html b/404.html new file mode 100644 index 0000000..332440e --- /dev/null +++ b/404.html @@ -0,0 +1,1097 @@ + + + +
+ + + + + + + + + + + + + + + + + + + + + +Now that we have our library and board add-on installed, we can start experimenting with the breakout board. For the scope of this tutorial, we will highlight the examples provided in the GitHub hardware repo to get started.
+From your downloads, open the example labeled as Example1-ReadButtons_WriteLEDs.ino. This example reads the button presses and writes to the non-addressable LED using the PCA9554 I/O I2C Expander.
+For users using an Arduino microcontroller, select your board in the Tools menu (in our case the SparkFun ESP32 IoT RedBoard) and the correct Port it enumerated on.
+You can also copy or paste the code as shown below. Then click "Upload".
+/*
+ Using the Qwiic Directional Pad
+ By: Nathan Seidle
+ SparkFun Electronics
+ Date: October 8th, 2024
+
+ License: This code is public domain but you buy me a beer if you use this and we meet someday (Beerware license).
+
+ Feel like supporting our work? Buy a board from SparkFun!
+ https://www.sparkfun.com/products/14733
+
+ This example demonstrates how to use pinMode and digitalRead/Write to read the directional pad and turn
+ on/off the RGB LED channels.
+
+ Hardware Connections:
+ Plug the Qwiic board to your Arduino/ESP32 or other
+ Press the buttons
+ Watch each LED turn on one-at-a-time
+*/
+
+#include <SparkFun_I2C_Expander_Arduino_Library.h> // Click here to get the library: http://librarymanager/All#SparkFun_I2C_Expander_Arduino_Library
+
+SFE_PCA95XX io; // Defaults to the PCA9554 at I2C address 0x20
+
+int buttonUp = 0;
+int buttonDown = 1;
+int buttonRight = 2;
+int buttonLeft = 3;
+int buttonCenter = 4;
+int ledBlue = 5;
+int ledGreen = 6;
+int ledRed = 7;
+
+void setup()
+{
+ Serial.begin(115200);
+ delay(250);
+ Serial.println("Qwiic Directional Pad Example");
+
+ Wire.begin();
+
+ // Initialize the PCA9554, default address = 0x20
+ if (io.begin() == false) //Device Address, Number of GPIO
+ {
+ Serial.println("PCA9554 not detected. Please check wiring. Freezing...");
+ while (1)
+ ;
+ }
+
+ io.pinMode(buttonUp, INPUT);
+ io.pinMode(buttonDown, INPUT);
+ io.pinMode(buttonLeft, INPUT);
+ io.pinMode(buttonRight, INPUT);
+ io.pinMode(buttonCenter, INPUT);
+ io.pinMode(ledRed, OUTPUT);
+ io.pinMode(ledGreen, OUTPUT);
+ io.pinMode(ledBlue, OUTPUT);
+
+ redOff();
+ greenOff();
+ blueOff();
+
+ Serial.println("Qwiic Directional Pad online!");
+}
+
+void loop()
+{
+ Serial.print("Button: ");
+
+ if (io.digitalRead(buttonUp) == LOW)
+ {
+ Serial.print("Up");
+ redOn();
+ greenOff();
+ blueOff();
+ }
+ else if (io.digitalRead(buttonDown) == LOW)
+ {
+ Serial.print("Down");
+ redOff();
+ greenOn();
+ blueOff();
+ }
+ else if (io.digitalRead(buttonLeft) == LOW)
+ {
+ Serial.print("Left");
+ redOn();
+ greenOff();
+ blueOn();
+ }
+ else if (io.digitalRead(buttonRight) == LOW)
+ {
+ Serial.print("Right");
+ redOff();
+ greenOn();
+ blueOn();
+ }
+ else if (io.digitalRead(buttonCenter) == LOW)
+ {
+ Serial.print("Center");
+ redOn();
+ greenOn();
+ blueOn();
+ }
+ else
+ {
+ Serial.print(" None");
+ redOff();
+ greenOff();
+ blueOff();
+ }
+ Serial.println();
+
+ delay(100);
+}
+
+void redOn()
+{
+ io.digitalWrite(ledRed, LOW);
+}
+void redOff()
+{
+ io.digitalWrite(ledRed, HIGH);
+}
+void greenOn()
+{
+ io.digitalWrite(ledGreen, LOW);
+}
+void greenOff()
+{
+ io.digitalWrite(ledGreen, HIGH);
+}
+void blueOn()
+{
+ io.digitalWrite(ledBlue, LOW);
+}
+void blueOff()
+{
+ io.digitalWrite(ledBlue, HIGH);
+}
+
After uploading the code, open the Serial Monitor or terminal emulator of your choice with the baud rate set to 115200. Press down on any of the buttons. You will notice a serial output indicating which button was pressed in the Arduino Serial Monitor. Looking to the board, you will notice the LED changing color with respect to the button press.
+ + +From your downloads, open the example labeled as Example2_InterruptReadButtons_WriteLEDs.ino. This example reads the button presses and writes to the non-addressable LED whenever there is an interrupt using the PCA9554 I/O I2C Expander.
+For users using an Arduino microcontroller, select your board in the Tools menu (in our case the SparkFun ESP32 IoT RedBoard) and the correct Port it enumerated on.
+You can also copy or paste the code as shown below. Then click "Upload".
+/*
+ Using the PCA9554 with Interrupts
+ Modified by: Ho Yun "Bobby" Chan
+ Orignally Written By: Nathan Seidle
+ SparkFun Electronics
+ Date: November 22nd, 2024
+
+ License: This code is public domain but you buy me a beer if you use this and we meet someday (Beerware license).
+
+ Feel like supporting our work? Buy a board from SparkFun!
+ https://www.sparkfun.com/products/17047 - Qwiic GPIO
+ https://www.sparkfun.com/products/26784 - Qwiic Power Switch
+ https://www.sparkfun.com/products/26851 - Qwiic Directional Pad
+
+ This example demonstrates how to use interrupts to check for new pin changes on the Qwiic Directional Pad
+ and turn on/off the RGB LED channels
+
+ Hardware Connections:
+ Plug the Qwiic Directional Pad into a Qwiic enabled board (SparkFun Thing Plus C, RedBoard, RedBoard IoT, etc)
+ If you don't have a platform with a Qwiic connection use the SparkFun Qwiic Breadboard Jumper (https://www.sparkfun.com/products/17912)
+ Connect a wire from a GPIO pin that is interrupt capable to the !INT pin on the Qwiic Directional Pad
+ Open the serial monitor at 115200 baud to see the output.
+*/
+
+#include <SparkFun_I2C_Expander_Arduino_Library.h> // Click here to get the library: http://librarymanager/All#SparkFun_I2C_Expander_Arduino_Library
+
+//SFE_PCA95XX io(PCA95XX_PCA9534); // Create a PCA9534 - Has interrupt pin
+//SFE_PCA95XX io(PCA95XX_PCA9536); // Create a PCA9536 - Has optional interrupt pin
+//SFE_PCA95XX io(PCA95XX_PCA9537); // Create a PCA9537 - Has interrupt pin
+SFE_PCA95XX io(PCA95XX_PCA9554); // Create a PCA9554 - Has interrupt pin
+//SFE_PCA95XX io(PCA95XX_PCA9556); // Create a PCA9556 - No interrupt pin / Not compatible with this code
+//SFE_PCA95XX io(PCA95XX_PCA9557); // Create a PCA9557 - No interrupt pin / Not compatible with this code
+
+int buttonUp = 0;
+int buttonDown = 1;
+int buttonRight = 2;
+int buttonLeft = 3;
+int buttonCenter = 4;
+int ledBlue = 5;
+int ledGreen = 6;
+int ledRed = 7;
+
+int gpioExpander_interrupt = 4; //INT of PCA9554 is connected to ESP pin 4. Goes low when an input pin changes.
+
+bool buttonPressed = false;
+
+//Interrupt that is called when INT pin goes low
+void IRAM_ATTR gpioExpanderISR() {
+ buttonPressed = true;
+}
+
+void setup() {
+ Serial.begin(115200);
+ delay(250);
+ Serial.println("Qwiic Directional Pad Example");
+
+ Wire.begin();
+
+ // Initialize the PCA95xx with its default I2C address
+ if (io.begin() == false) {
+ Serial.println("PCA9554 not detected. Please check wiring. Freezing...");
+ while (1)
+ ;
+ }
+ pinMode(gpioExpander_interrupt, INPUT_PULLUP);
+
+ io.pinMode(buttonUp, INPUT);
+ io.pinMode(buttonDown, INPUT);
+ io.pinMode(buttonLeft, INPUT);
+ io.pinMode(buttonRight, INPUT);
+ io.pinMode(buttonCenter, INPUT);
+ io.pinMode(ledRed, OUTPUT);
+ io.pinMode(ledGreen, OUTPUT);
+ io.pinMode(ledBlue, OUTPUT);
+
+ redOff();
+ greenOff();
+ blueOff();
+
+ Serial.println("Qwiic Directional Pad online!");
+
+ attachInterrupt(gpioExpander_interrupt, gpioExpanderISR, CHANGE);
+}
+
+void loop() {
+ //Wait for interrupt to fire
+ if (buttonPressed == true) {
+ Serial.println("Interrupt! ");
+ //Get all the pins in one read to save time
+ uint8_t currentState = io.getInputRegister();
+ // Pins are pulled high so when we see low, button is being pressed
+ if ((currentState & (1 << buttonUp)) == 0) {
+ Serial.println("Up");
+
+ //RED
+ redOn();
+ greenOff();
+ blueOff();
+ } else if ((currentState & (1 << buttonDown)) == 0) {
+ Serial.println("Down");
+
+ //GREEN
+ redOff();
+ greenOn();
+ blueOff();
+ } else if ((currentState & (1 << buttonLeft)) == 0) {
+ Serial.println("Left");
+
+ //MAGENTA
+ redOn();
+ greenOff();
+ blueOn();
+ } else if ((currentState & (1 << buttonRight)) == 0) {
+ Serial.println("Right");
+
+ //CYAN
+ redOff();
+ greenOn();
+ blueOn();
+ } else if ((currentState & (1 << buttonCenter)) == 0) {
+ Serial.println("Center");
+
+ //WHITE
+ redOn();
+ greenOn();
+ blueOn();
+ } else {
+ Serial.println(" None");
+
+ //OFF
+ redOff();
+ greenOff();
+ blueOff();
+ }
+
+ buttonPressed = false;
+ }
+}
+
+
+
+void redOn() {
+ io.digitalWrite(ledRed, LOW);
+}
+void redOff() {
+ io.digitalWrite(ledRed, HIGH);
+}
+void greenOn() {
+ io.digitalWrite(ledGreen, LOW);
+}
+void greenOff() {
+ io.digitalWrite(ledGreen, HIGH);
+}
+void blueOn() {
+ io.digitalWrite(ledBlue, LOW);
+}
+void blueOff() {
+ io.digitalWrite(ledBlue, HIGH);
+}
+
After uploading the code, open the Serial Monitor or terminal emulator of your choice with the baud rate set to 115200. Press down on any of the buttons. You will notice a serial output indicating which button was pressed in the Arduino Serial Monitor whenever there is a button press. Looking to the board, you will notice the LED changing color with respect to the button press.
+ + + + + + + + + + + + + + + + + + + + + + + + + + +Arduino
+This example assumes you are using the latest version of the Arduino IDE on your desktop. If this is your first time using Arduino IDE, library, or board add-on, please review the following tutorials.
+ +Note
+If you've never connected an CH340 device to your computer before, you may need to install drivers for the USB-to-serial converter. Check out our section on "How to Install CH340 Drivers" for help with the installation.
+ +SparkFun has written basic examples for the Qwiic Directional Pad and is provided in the GitHub Hardware repository.
+ + +You will need the has written a library to work with the Qwiic Directional Pad. You can obtain this library through the Arduino Library Manager by searching for "SparkFun I2C Expander Arduino Library". Find the one written by SparkFun Electronics and install the latest version. Users who prefer to manually install the library can get it from the GitHub Repository or download the .ZIP by clicking the button below:
+ + + + + + + + + + + + + + + + + + + + + + + + + + +-2yZ$tbF8f=;q7K3%yPK{z )OVvz5A~=C)?~fZTslJ%5GQOb7d=+;&a1gTvNm3Od8hzuu33X8
z^Gc)~aRcZF`fpV(&wlw>!mJ1o6j={CV8ibffT%fBghW@qeYuiB_Z}UgsSZX!Kk=Vs
z7OUVp_3#5x-!pi~y7Px5Mku`=(}XD67K)R5Zz^aTxc$M699I)aT=nzkY;dZ}Z;Udv
z1q|*LS2g8prW6mI!c#vQj{bJT`MB!tV9e|#dHJsrqOA=7Z$2c!Ej}wJk&iZ=yksBD
zLzPjpx#DtFPgmN-ZyPCw1<4U|M{)5jLiDD&C0KPj?NrI9%e@v%<>C5M?n|GIH;!`R
zNMC7>jqGB%^c6_#JJYZdOX$g30WAlw4Wj?-6jJ}#F+w*4#IXKhqQZWd<16!7x#PVa
zHu!E~7pk44fr^3*&!AMeGW|lKy|lwvA^P}~zi8%|#LgQ)S*Ut5CF89Qsa!g`_6lx~
zgTa7{nvhR5DrC2P34AI9l6`g{Bq2i9JcY8Fa(7pp4u}k6yjhn|=pviUen8o2u+pn)
zhoZZn0x4K0og)j7vAo@};|O`d`!7H?JN}CzFP?Tvwg`}$eILdZS$7(@5ARA0sN_G|
zjod9QF5VxcU)+ye?l-D4CB7&~a@A|kszeOJehcG%COm-1T>r0Jp%Hbn+mWqNfU*jr
zICsQeK-DB1TLv9L4F?cG&!+9K!1cwq_FM#Hc+{5CiYmppkJUdTJ9pl{vl1i|l`ukI
z22vyQ-~5|TZKPeN@*+K?(0N3TAJ$fD&|7kau$RcZsKwDU@jmm^ZypPQff^e@0tr!Z
zkE~$p*?&&>1{qWVNdw^x#9vTqcSL>TDV6FEl7 B?F%uKv^E7mg1LO$n~`}xNl
zH%k0oKV1ExAvhlVtt>cSpwi9t6se 6r@p=}^-8mz{!ft@UI8~fU!G^_QSjd=xt>*^Uil0n@q2)TaxJ?v8@#)_Aryxo8#C-G)l*
zTVIr>?GC1V2~5&o%hy>3Yj_Twr67`a0yfV&yZ-J6zl19cf1(P*MB>-;16*ww7)d>V
z{_`koYb};>eeix_>-RjE?6LW_9542#d8jrlRKOJGk|rDqNM?a}1YMmjab~I(^g*6B
z#DRukKJaiy&m4W)h#6s689^J6R-Qi(C>!e(
z>oqR
h(gG;ta*