Skip to content

Commit

Permalink
updating for release
Browse files Browse the repository at this point in the history
  • Loading branch information
AndyEngland521 committed Jul 17, 2018
1 parent 60e8150 commit df423cb
Show file tree
Hide file tree
Showing 13 changed files with 450 additions and 67 deletions.
17 changes: 17 additions & 0 deletions .gitattributes
@@ -0,0 +1,17 @@
# Auto detect text files and perform LF normalization
* text=auto

# Custom for Visual Studio
*.cs diff=csharp

# Standard to msysgit
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
47 changes: 47 additions & 0 deletions .gitignore
@@ -0,0 +1,47 @@
# Windows image file caches
Thumbs.db
ehthumbs.db

# Folder config file
Desktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msm
*.msp

# Windows shortcuts
*.lnk

# =========================
# Operating System Files
# =========================

# OSX
# =========================

.DS_Store
.AppleDouble
.LSOverride

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
21 changes: 0 additions & 21 deletions LICENSE

This file was deleted.

55 changes: 55 additions & 0 deletions LICENSE.md
@@ -0,0 +1,55 @@
SparkFun License Information
============================

SparkFun uses two different licenses for our files — one for hardware and one for code.

Hardware
---------

**SparkFun hardware is released under [Creative Commons Share-alike 4.0 International](http://creativecommons.org/licenses/by-sa/4.0/).**

Note: This is a human-readable summary of (and not a substitute for) the [license](http://creativecommons.org/licenses/by-sa/4.0/legalcode).

You are free to:

Share — copy and redistribute the material in any medium or format
Adapt — remix, transform, and build upon the material
for any purpose, even commercially.
The licensor cannot revoke these freedoms as long as you follow the license terms.
Under the following terms:

Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
ShareAlike — If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original.
No additional restrictions — You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits.
Notices:

You do not have to comply with the license for elements of the material in the public domain or where your use is permitted by an applicable exception or limitation.
No warranties are given. The license may not give you all of the permissions necessary for your intended use. For example, other rights such as publicity, privacy, or moral rights may limit how you use the material.


Code
--------

**SparkFun code, firmware, and software is released under the MIT License(http://opensource.org/licenses/MIT).**

The MIT License (MIT)

Copyright (c) 2016 SparkFun Electronics

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
39 changes: 37 additions & 2 deletions README.md
@@ -1,2 +1,37 @@
# SparkFun_ADS1015_Arduino_Library
Library for the ADS1015 ADC->I2C
SparkFun ADS1015 Library
===========================================================

![SparkFun Inertial Measurement Unit - BNO080](https://cdn.sparkfun.com/r/500-500/assets/parts/1/2/8/6/2/14666-SparkFun_Qwiic_Flex_Glove_Controller-01.jpg)

[*Qwiic Flex Glove Controller (SEN-14666)*](https://www.sparkfun.com/products/14666)

The Qwiic Flex Glove Controller allows you to figure out just how bent all of your fingers are. This board uses an ADC to I2C to create an interface with SparkFun's Qwiic system, which means you won't have to do any soldering to figure out how bent your fingers are.

Library written by Andy England ([SparkFun](http://www.sparkfun.com)).

Repository Contents
-------------------

* **/examples** - Example sketches for the library (.ino). Run these from the Arduino IDE.
* **/src** - Source files for the library (.cpp, .h).
* **keywords.txt** - Keywords from this library that will be highlighted in the Arduino IDE.
* **library.properties** - General library properties for the Arduino package manager.

Documentation
--------------

* **[Installing an Arduino Library Guide](https://learn.sparkfun.com/tutorials/installing-an-arduino-library)** - Basic information on how to install an Arduino library.
* **[Product Repository](https://github.com/sparkfunX/Qwiic_IMU_BNO080)** - Main repository (including hardware files)

License Information
-------------------

This product is _**open source**_!

Various bits of the code have different licenses applied. Anything SparkFun wrote is beerware; if you see me (or any other SparkFun employee) at the local, and you've found our code helpful, please buy us a round! Anything Maxim wrote has its own license. Anything that was co-writing with Peter Jansen is BSD.

Please use, reuse, and modify these files as you see fit. Please maintain attribution to SparkFun Electronics and release anything derivative under the same license.

Distributed as-is; no warranty is given.

- Your friends at SparkFun.
23 changes: 21 additions & 2 deletions examples/Example1_BasicReadings/Example1_BasicReadings.ino
@@ -1,16 +1,35 @@
/*
Using the Qwiic Flex Glvoe Controller
By: Andy England
SparkFun Electronics
Date: July 17, 2018
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/14666
This example shows how to output accelerometer values
Hardware Connections:
Attach the Qwiic Shield to your Arduino/Photon/ESP32 or other
Plug the sensor onto the shield
Serial.print it out at 115200 baud to serial monitor.
*/

#include <SparkFun_ADS1015_Arduino_Library.h>
#include <Wire.h>

ADS1015 fingerSensor;

void setup() {

Wire.begin();
Serial.begin(115200);

if (fingerSensor.begin(Wire, 100000, ADS1015_ADDRESS_VDD, 9600) == false) {
Serial.println("Device not found. Check wiring.");
while (1);
}

}
}

void loop() {
Expand Down

This file was deleted.

55 changes: 55 additions & 0 deletions examples/Example2_SetupHand/Example2_SetupHand.ino
@@ -0,0 +1,55 @@
/*
Using the Qwiic Flex Glvoe Controller
By: Andy England
SparkFun Electronics
Date: July 17, 2018
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/14666
This example shows how to output accelerometer values
Hardware Connections:
Attach the Qwiic Shield to your Arduino/Photon/ESP32 or other
Plug the sensor onto the shield
Serial.print it out at 115200 baud to serial monitor.
*/

#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);

//Set up each sensor, change the addresses based on the location of each sensor
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;
//Read and print our 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();
}
72 changes: 72 additions & 0 deletions examples/Example3_Calibration/Example3_Calibration.ino
@@ -0,0 +1,72 @@
/*
Using the Qwiic Flex Glvoe Controller
By: Andy England
SparkFun Electronics
Date: July 17, 2018
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/14666
This example shows how to output accelerometer values
Hardware Connections:
Attach the Qwiic Shield to your Arduino/Photon/ESP32 or other
Plug the sensor onto the shield
Serial.print it out at 115200 baud to serial monitor.
*/

#include <SparkFun_ADS1015_Arduino_Library.h>
#include <Wire.h>

ADS1015 fingerSensor;

void setup() {

Wire.begin();
Serial.begin(115200);

if (fingerSensor.begin(Wire, 100000, ADS1015_ADDRESS_SDA) == false) {
Serial.println("Device not found. Check wiring.");
while (1);
}
Serial.println("Calibrating, flex all sensors through full range of motion multiple times, send 'e' when finished");
}

void loop() {
uint8_t incoming;
//Check for incoming serial data while we calibrate the sensors.
do
{
fingerSensor.calibrate();

if(Serial.available())
{
incoming = Serial.read();
}
} while (incoming != 'e');
Serial.println("Calibrated");

//Print calibration data
for (int channel; channel < 2; channel++)
{
Serial.print("Channel ");
Serial.print(channel);
Serial.print(": ");
for (int hiLo = 0; hiLo < 2; hiLo++)
{
switch (hiLo)
{
case 0:
Serial.print("Low: ");
Serial.print(fingerSensor.getCalibration(channel, hiLo));
break;
case 1:
Serial.print(" High: ");
Serial.print(fingerSensor.getCalibration(channel, hiLo));
break;
}
}
Serial.println();
}
}

0 comments on commit df423cb

Please sign in to comment.