Library Overview - sparkfun Qwiic Flex Glove Controller SEN-14666 Hook-Up Manual

Table of Contents

Advertisement

Now just plug Qwiic cables to connect both boards together, then plug one board into your microcontroller so we
can get readings from the glove.

Library Overview

Note: This example assumes you are using the latest version of the Arduino IDE on your desktop. If this is
your first time using Arduino, please review our tutorial on installing the Arduino IDE. If you have not
previously installed an Arduino library, please check out our installation guide.
Before we get into getting data from our flex sensors, let's look at the available functions in the library. We've
written a library to control the flex sensors. You can snag this library through the Arduino Library Manager. Search
for SparkFun ADS1015 Arduino Library and you should be able to install the latest version. If you prefer
manually downloading the libraries from the GitHub repository, you can grab them here:
DOWNLOAD THE SPARKFUN ADS1015 ARDUINO LIBRARY (ZIP)
https://github.com/sparkfun/SparkFun_ADS1015_Arduino_Library/archive/master.zip
Let's get started by looking at the functions that set up the flex controller.
Setup and Settings
boolean begin(uint8_t deviceAddress = BNO080_DEFAULT_ADDRESS, TwoWire &wirePort = Wire);
default use the default I2C address and use Wire port. Otherwise, pass in a custom I C address and wire
port.
uint16_t getAnalogData(uint8_t channel);
float getScaledAnalogData(uint8_t channel);
Won't work properly without first running
void calibrate();
While running calibration, simply flex each sensor to the minimum and maximum that it will be used in your
project.
void setMode(uint16_t mode);
single-shot
uint16_t getMode();
getCalibration(uint8_t channel, bool hiLo)
channel. if
hiLo
setCalibration(uint8_t channel, bool hiLo, uint16_t value)
of a channel without using the automatic calibration function. Allows for manual calibration.
— Used to calibrate the sensor and map the flexible range to values given by the user.
— Set mode of the sensor. Mode 0 is continuous read mode, mode 1 is
— Get's the read mode of the ADS1015.
is true,
getCalibration()
— Returns the uncalibrated analog value from the sensor.
— Returns a value between 0 and 1 based on calibration.
calibrate()
— Get the high or low calibration value for a certain
will return the high calibration for the given channel.
2
— Sets the high or low calibration value
— By

Advertisement

Table of Contents
loading
Need help?

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

Table of Contents