Open SquaredPotato opened 3 months ago
Easiest way to implement a software readable hardware revision, would be by using a single GPIO as ADC, that reads the voltage value coming out of a voltage divider using 2 resistors.
Vcc
|
R1 (variable depending on hardware revision)
|
+------> GPIO ADC (esp32-s3 ADC pin)
|
R2 (fixed, 10 kΩ)
|
GND
For example: | Revision | R1 value | ADC readout |
---|---|---|---|
Rev 1 | 10K | 1.65V | |
Rev 2 | 20K | 1.1V | |
Rev 3 | 30K | 0.825V |
We should add a method to store the hardware revision in some permanent storage, and create a clear structure to define settings like GPIO numbers dependent on the previously stored hardware revision.