Giter Site home page Giter Site logo

esp32-ads1115's People

Contributors

tobymurray avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

smnd96

esp32-ads1115's Issues

not getting ACK while reading ADS

hello, I'm working on a project where Im using the ads1115 with esp32 .
Im using ESPIDF v4.2 in let me know if you getting feel any update or need to change here.
// Select configuration register(0x01)
// AINP = AIN0 reading voltage
// Continuous conversion mode, 128 SPS(0xC1, 0x83)

hardware is fine and working I checked in Arduino IDE but here I'm only getting reading 0x5E, 0x5E

static esp_err_t i2c_master_sensor_test(i2c_port_t i2c_num, uint8_t *data_h, uint8_t *data_l)
{
  int ret;
  i2c_cmd_handle_t cmd = i2c_cmd_link_create();
  i2c_master_start(cmd);
  i2c_master_write_byte(cmd, 0x90, 0x01);
  i2c_master_write_byte(cmd, 0x01, 0x01);
  i2c_master_write_byte(cmd, 0xC1, 0x01);
  i2c_master_write_byte(cmd, 0x83, 0x00);
  i2c_master_stop(cmd);
  ret = i2c_master_cmd_begin(i2c_num, cmd, 1000 / portTICK_RATE_MS);
  i2c_cmd_link_delete(cmd);
  if (ret != ESP_OK) {
    return ret;
  }
  vTaskDelay(30 / portTICK_RATE_MS);
  cmd = i2c_cmd_link_create();
  i2c_master_start(cmd);
  i2c_master_write_byte(cmd, 0x91, 0x01);
  i2c_master_write_byte(cmd, 0x00, 0x01);     //..............<< here not receving ACK
  i2c_master_read_byte(cmd, data_h, 0x00);
  i2c_master_read_byte(cmd, data_l, 0x01);
  i2c_master_stop(cmd);
  ret = i2c_master_cmd_begin(i2c_num, cmd, 1000 / portTICK_RATE_MS);
  i2c_cmd_link_delete(cmd);
  printf(" >> data_h: %X\n", *data_h);
  printf(" >> data_l: %X\n", *data_l);
  return ret;
}

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.