| Electronic Components Datasheet Search |
|
DEV-13327 Datasheet(PDF) 4 Page - SparkFun Electronics |
|
|
|||||||||||||||||||||||||||||
DEV-13327 Datasheet(HTML) 4 Page - SparkFun Electronics |
|
4 / 6 page ![]() /************************************************************* *** Example file for SparkFun ADC Edison Block Support 1 Jun 2015 Mike Hord, SparkFun Electronics Code developed in Intel's Eclipse IOTDK This code requires the Intel mraa library to function; for mor e information see https://github.com/inteliotdevkit/mraa This code is beerware; if you use it, please buy me (or any ot her SparkFun employee) a cold beverage next time you run into one of us at the local. ************************************************************** **/ #include "mraa.hpp" #include <iostream> #include <unistd.h> #include "SparkFunADS1015.h" using namespace std; // Declare a variable for our i2c object. You can create an // arbitrary number of these, and pass them to however many // slave devices you wish. mraa::I2c* adc_i2c; int main() { // The ADC is (by default) connected to I2C channel 1. Her e, we create // a device to pass to the ads1015 object constructor. adc_i2c = new mraa::I2c(1); // Now, pass that I2C object and the address of the ADC bl ock in your // system to the ads1015 object constructor. Note that th ere are up to // four different addresses available here, settable by j umper on the // board. You'll need to create an ads1015 object for eac h one. ads1015 adc(adc_i2c, 0x48); // There are 6 settable ranges: // _0_256V Range is 0.256V to 0.255875V, and step siz e is 125uV. // _0_512V Range is 0.512V to 0.51175V, and step size is 250uV. // _1_024V Range is 1.024V to 1.0235V, and step size i s 500uV. // _2_048V Range is 2.048V to 2.047V, and step size i s 1mV. // _4_096V Range is 4.096V to 4.094V, and step size i s 2mV. // _6_144V Range is 6.144V to 6.141V, and step size i s 3mV. // The default setting is _2_048V. // NB!!! Just because FS reading is > 3.3V doesn't mean yo Page 4 of 6 |
|
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |