← Back to ratslair.com
aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md24
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.