#include <SparkFun_ADS1015_Arduino_Library.h>
ADS1015 pinkySensor;
ADS1015 indexSensor;
uint16_t hand[4] = {0, 0, 0, 0};
void setup() {
Wire.begin();
Serial.begin(115200);
if (pinkySensor.begin(Wire, 100000, ADS1015_ADDRESS_SDA) == false) {
Serial.println("Pinky not found. Check wiring.");
while (1);
}
if (indexSensor.begin(Wire, 100000, ADS1015_ADDRESS_GND) == false) {
Serial.println("Index not found. Check wiring.");
while (1);
}
}
void loop() {
uint16_t data;
for (int finger = 0; finger < 2; finger++) {
hand[finger] = indexSensor.getAnalogData(finger);
hand[finger + 2] = pinkySensor.getAnalogData(finger);
}
for (int finger = 0; finger < 4; finger++)
{
Serial.print(finger);
Serial.print(": ");
Serial.print(hand[finger]);
Serial.print(" ");
}
Serial.println();
}
Uploading this sketch and opening the Serial Monitor to 115200 bps will yield an output somewhat like the below
image.
Example 3 - Calibration
Full Glove Output - click the image for a closer look
Need help?
Do you have a question about the Qwiic Flex Glove Controller SEN-14666 and is the answer not in the manual?
Questions and answers