Code Monkey home page Code Monkey logo

Comments (2)

golemparts avatar golemparts commented on September 27, 2024

As this is unrelated to RPPAL and more of a general ADS111x interface question, this isn't really the right place for this question. However, if anyone can help you out they're of course welcome to.

Unfortunately I don't have any personal experience working with an ADS1115. I suggest making sure you're using the correct I2C functions based on the datasheet (check this example on how RPPAL typically interacts with I2C registers), and perhaps look at how some other ADS111x driver implementations in Rust obtain their readings.

from rppal.

taesungh avatar taesungh commented on September 27, 2024

My team is actually working on a project using the ADS1015 at this moment, and we've been using eldruin/ads1x1x-rs which provides the implementation of the communication protocol for various ADS devices. I would recommend using an existing library rather than trying to reimplement the message formats yourself. The library constructs support embedded-hal traits, so you can use it with RPPAL's I2C instance by including the hal feature.

use ads1x1x::{Ads1x1x, SlaveAddr};
use rppal::i2c::I2c;

fn main() {
    let dev = I2c::new().unwrap();
    let mut adc = Ads1x1x::new_ads1115(dev, SlaveAddr::default());
    adc.read(...)
}

from rppal.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.