{"id":14963279,"url":"https://github.com/mauriciobarroso/ads101x","last_synced_at":"2025-06-20T09:07:25.919Z","repository":{"id":205845366,"uuid":"715230134","full_name":"mauriciobarroso/ads101x","owner":"mauriciobarroso","description":"12-bit ADC ADS101x (ADS1013, ADS1014 and ADS1015) driver for ESP-IDF and STM32CubeIDE","archived":false,"fork":false,"pushed_at":"2025-02-16T15:50:28.000Z","size":32,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-20T09:07:19.715Z","etag":null,"topics":["adc","ads1013","ads1014","ads1015","ads101x","arm-cortex-m3","arm-cortex-m4","esp-idf","esp32","esp32c3","esp32c6","esp32s2","esp32s3","stm32","stm32cubeide"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mauriciobarroso.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-11-06T18:16:20.000Z","updated_at":"2025-02-16T15:50:32.000Z","dependencies_parsed_at":"2023-12-20T09:49:54.204Z","dependency_job_id":"1c6dbc31-81c1-4234-b5eb-2de294c3cd2c","html_url":"https://github.com/mauriciobarroso/ads101x","commit_stats":{"total_commits":6,"total_committers":2,"mean_commits":3.0,"dds":"0.16666666666666663","last_synced_commit":"180ab52b3d837ec7d9f32a16030e894c5b4fba4d"},"previous_names":["mauriciobarroso/ads1010x","mauriciobarroso/ads101x"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mauriciobarroso/ads101x","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mauriciobarroso%2Fads101x","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mauriciobarroso%2Fads101x/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mauriciobarroso%2Fads101x/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mauriciobarroso%2Fads101x/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mauriciobarroso","download_url":"https://codeload.github.com/mauriciobarroso/ads101x/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mauriciobarroso%2Fads101x/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260915901,"owners_count":23082040,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["adc","ads1013","ads1014","ads1015","ads101x","arm-cortex-m3","arm-cortex-m4","esp-idf","esp32","esp32c3","esp32c6","esp32s2","esp32s3","stm32","stm32cubeide"],"created_at":"2024-09-24T13:31:17.702Z","updated_at":"2025-06-20T09:07:20.906Z","avatar_url":"https://github.com/mauriciobarroso.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 12-bit ADC ADS101x (ADS1013, ADS1014 and ADS1015) driver for ESP-IDF and STM32CubeIDE\nDriver compatible with ESP-IDF and STM32CubeIDE to use ADS101x 12-bit ADC series\n\n## Features\n- Initialization function allows use a custom delay function to ensure compatibility with bare-metal and RTOS applications\n- ADC conversion status by interrupt or polling\n- Customizable gain and data rate \n- Multiple instances.\n\n## How to use\n### ESP-IDF\nTo use this component follow the next steps:\n\n1. Configure the component in the project configuration menu (`idf.py menuconfig`)\n\n`\nComponent config-\u003eADS101x Configuration\n`\n\n2. Include the I2C driver component headers\n```c\n#include \"driver/i2c_master.h\"\n#include \"ads101x.h\"\n```\n3. Declare a handle of I2C bus and an instance of the compoent\n```c\ni2c_master_bus_handle_t i2c_bus_handle; \nads101x_t adc;\n```\n\n4. Define a custom delay function in miliseconds according your application\n```c\n/* Custom delay function */\nvoid delay_ms(uint32_t time)\n{\n    vTaskDelay(pdMS_TO_TICKS(time));\n}\n```\n\n5. In the main function initialize the I2C bus and the component instance\n```c\n/* Configure and create a new I2C bus */\ni2c_master_bus_config_t i2c_bus_config = {\n    .clk_source = I2C_CLK_SRC_DEFAULT,\n    .i2c_port = I2C_NUM_0,\n    .scl_io_num = GPIO_NUM_48,\n    .sda_io_num = GPIO_NUM_47,\n    .glitch_ignore_cnt = 7\n};\n\nESP_ERROR_CHECK(i2c_new_master_bus(\u0026i2c_bus_config, \u0026i2c_bus_handle));\n\n/* Initialize ADS101x instance for ADS1015 */\nESP_ERROR_CHECK(ads101x_init(\u0026adc, ADS101X_MODEL_5, i2c_bus_handle, ADS101X_I2C_ADDRESS, delay_ms));\n```\n\n6. To use interrupts to check the ADC conversion status enable it after the initialization\n```c\n/* Enable ADS101x interrupt and configure the host pin */\nESP_ERROR_CHECK(ads101x_interrupt_enable(\u0026adc, GPIO_NUM_21));\n```\n\n7. To perform an ADC read\n```c\n/* Declare a variable to store the ADC result and perform a single ended read */\nint16_t adc_val = 0;\nads101x_read_single_ended(\u0026adc, ADS101X_CHANNEL_0, \u0026adc_val);\n```\n\n### STM32CubeIDE\nTBD\n\n## License\nMIT License\n\nCopyright (c) 2025 Mauricio Barroso Benavides\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmauriciobarroso%2Fads101x","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmauriciobarroso%2Fads101x","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmauriciobarroso%2Fads101x/lists"}