B4R Question ESp32 Analog Range Enhancements

rodmcm

Active Member
Licensed User
Feature Request
Would it be possible some time to have the more advanced features of the ADC on the ESP32 available on B4r?
This video shows the possibilities and the very handy linearisation formula for a 0-4095 count
YouTube - Tech Note 069 - Using the ESP32 ADC and some of its more advanced functions
 

Johan Hormaza

Well-Known Member
Licensed User
Longtime User
Feature Request
Would it be possible some time to have the more advanced features of the ADC on the ESP32 available on B4r?
This video shows the possibilities and the very handy linearisation formula for a 0-4095 count
YouTube - Tech Note 069 - Using the ESP32 ADC and some of its more advanced functions
Of course, B4R has all the functions, since the analog converters are the same configuration as an Arduino.
 
Upvote 0

Johan Hormaza

Well-Known Member
Licensed User
Longtime User
These are the most common ADC pins in ESP32
 

Attachments

  • upload_2018-9-18_10-20-15.png
    upload_2018-9-18_10-20-15.png
    355.9 KB · Views: 279
Upvote 0

Johan Hormaza

Well-Known Member
Licensed User
Longtime User
Keep in mind that the following Pins are:
Vp = pin 36
Vn = pin 39
Until pin 13 are ADC, all those pins I have tested and they work
All you have to do is change the Pin number
B4X:
A0.Initialize(36,A0.MODE_INPUT)' pin ADC 35...
Here I attach this example, which also comes with an example of how to use the full ESP32 PWM. I hope and it is useful.
Any question, I will be here to order
 

Attachments

  • ADCandPWM.zip
    1.2 KB · Views: 278
Upvote 0

canalrun

Well-Known Member
Licensed User
Longtime User
Of course, B4R has all the functions, since the analog converters are the same configuration as an Arduino.

I'm going to hijack this thread - even though it is 2 months old. :D

I am starting with the ESP32 ADC. You mention "Of course, B4R had all the functions ..." referring to the YouTube video.

How would one access, for example, the AnalogSetWidth() function?

Can this be done from B4R? Is there an h file or library that must be included?

Thanks,
Barry.
 
Upvote 0
Top