Hello,
I just got my Adafruit ESP32 Feather board. I have it up and running with B4R 2.51. I can run my FFT test example. If I change the LED pin number to 13, my blink example runs.
The next step is acquiring data with their ADC #1. I want to use ADC #1 because ADC #2 interferes with Wi-Fi.
From the Adafruit docs I see A3 (GPI0 pin #39) might be a good choice.
I have looked at the B4R Beginner's Guide and an example from Johan Hormaza.
He shows:
For this example does the pin number, 35, represent the GPIO pin number?
I've also seen something like Pin.A0 being used instead of 35. Is something like Pin.A0 mapped to the correct number based on the board selected in B4R Tools- Board Selector?
In my case the analog input pin for A3 is GPIO number 39. Would Pin.A3 resolve to 39? Or am I missing something?
Second:
When using the ESP32 ADC I have seen a bit of discussion that it is nonlinear – the number you get is not a straight division of the reference voltage. These discussions occurred years ago. Has the ADC been made linear since then or has somebody developed a correction table to make it linear?
Third:
I want to sample at a specific rate, say 2000 Hz. Is there any advantage to using a Timer or using something like a Looper waiting for the next sample time in a while loop testing a variable based on Micros? Sample time accuracy is important.
Thanks,
Barry.
I just got my Adafruit ESP32 Feather board. I have it up and running with B4R 2.51. I can run my FFT test example. If I change the LED pin number to 13, my blink example runs.
The next step is acquiring data with their ADC #1. I want to use ADC #1 because ADC #2 interferes with Wi-Fi.
From the Adafruit docs I see A3 (GPI0 pin #39) might be a good choice.
I have looked at the B4R Beginner's Guide and an example from Johan Hormaza.
He shows:
B4X:
Private A0 As Pin
...
A0.Initialize(35, A0.MODE_INPUT)
For this example does the pin number, 35, represent the GPIO pin number?
I've also seen something like Pin.A0 being used instead of 35. Is something like Pin.A0 mapped to the correct number based on the board selected in B4R Tools- Board Selector?
In my case the analog input pin for A3 is GPIO number 39. Would Pin.A3 resolve to 39? Or am I missing something?
Second:
When using the ESP32 ADC I have seen a bit of discussion that it is nonlinear – the number you get is not a straight division of the reference voltage. These discussions occurred years ago. Has the ADC been made linear since then or has somebody developed a correction table to make it linear?
Third:
I want to sample at a specific rate, say 2000 Hz. Is there any advantage to using a Timer or using something like a Looper waiting for the next sample time in a while loop testing a variable based on Micros? Sample time accuracy is important.
Thanks,
Barry.