Skip to content

feat(ads7138): added ads7138 component#67

Merged
finger563 merged 7 commits intomainfrom
feature/ads7138
Jun 6, 2023
Merged

feat(ads7138): added ads7138 component#67
finger563 merged 7 commits intomainfrom
feature/ads7138

Conversation

@finger563
Copy link
Contributor

@finger563 finger563 commented Jun 6, 2023

Description

  • Added Ads7138 component which allows for control of:
    • analog inputs (with alerts)
    • digital inputs (with alerts)
    • digital outputs
  • Example showing how to use the features of the component
  • Updated and rebuilt docs
  • updated CI

Motivation and Context

The existing Ads1x15 component is nice, but only supports ADC, has fewer analog input channels, and cannot run analog to digital conversions autonomously (and therefore also doesn't support the additional statistics that this chip does). Supporting this ADS7138 enables more complex systems to be built more efficiently.

How has this been tested?

Building and running the new example.

Screenshots (if appropriate, e.g. schematic, board, console logs, lab pictures):

image
CleanShot 2023-06-06 at 13 46 56
CleanShot 2023-06-06 at 13 51 55

With console output:

ads7138_example.mp4

Plotted using uart_serial_plotter:

ads7138_example_plotted.mp4

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update
  • Hardware (schematic, board, system design) change
  • Software change

Checklist:

  • My change requires a change to the documentation.
  • I have added / updated the documentation related to this change via either README or WIKI

Software

  • I have added tests to cover my changes.
  • I have updated the .github/workflows/build.yml file to add my new test to the automated cloud build github action.
  • All new and existing tests passed.
  • My code follows the code style of this project.

finger563 added 4 commits June 6, 2023 13:42
* Updated example to log data faster and to log data as numbers to enable plotting using uart-serial-plotter
* Updated readme
@finger563 finger563 added enhancement New feature or request adc peripherals labels Jun 6, 2023
@finger563 finger563 self-assigned this Jun 6, 2023
finger563 added 3 commits June 6, 2023 15:12
* Use alert functionality on digital input in example (on button press)
* Update how alert logic is configured (and enable threshold comparison when enabling alerts)
* Fix bug in how registers are read when calling get_event_data (they were assumed to be contiguous, but they are not)
* expose functions for clearing high/low event flags
* Add function for performing software reset of ads
@finger563 finger563 merged commit a6921a0 into main Jun 6, 2023
@finger563 finger563 deleted the feature/ads7138 branch June 6, 2023 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adc enhancement New feature or request peripherals

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant