From 751419d47e2173c7d366e817a8321d9e49dd41c5 Mon Sep 17 00:00:00 2001 From: Edvin Date: Mon, 13 Oct 2025 15:41:15 +0200 Subject: First commit --- README.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 README.md (limited to 'README.md') 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. -- cgit v1.2.3