diff options
| author | Edvin <[email protected]> | 2025-10-13 15:41:15 +0200 |
|---|---|---|
| committer | Edvin <[email protected]> | 2025-10-13 15:41:15 +0200 |
| commit | 751419d47e2173c7d366e817a8321d9e49dd41c5 (patch) | |
| tree | 979ef87b1ab2f3a513282038e496e2428178465a /README.md | |
First commit
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..ae16c11 --- /dev/null +++ b/README.md @@ -0,0 +1,24 @@ +# `EZADC` + +This ESP32 component was made to more easily gather data from the analog-to-digital converter (ADC). It defines a new data structure, `ADC`, which allows the user to quickly configure and use the ADC. + +## `ADC` + +To initialize the data structure, one may use the component library as follows: + + // Create ADC + ADC my_adc; + + // Initialize ADC + init_adc(&my_adc); + + // Configure ADC to channel 7 + config_adc(&my_adc, 7); + + // Read from ADC channel 7 + ez_read(&my_adc); + + // Tear down ADC when you're done + teardown_adc(&my_adc); + +This was originally done to read the battery voltage on the Adafruit Feather HUZZAH32, where the GPIO 35 is connected to ADC channel 7. |
