R rodmcm Active Member Licensed User Longtime User Sep 15, 2018 #1 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
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 Sep 15, 2018 #2 rodmcm said: 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 Click to expand... Of course, B4R has all the functions, since the analog converters are the same configuration as an Arduino. Upvote 0
rodmcm said: 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 Click to expand... Of course, B4R has all the functions, since the analog converters are the same configuration as an Arduino.
viriato Member Licensed User Longtime User Sep 18, 2018 #3 Hi, Do you have an B4R example reading ESP32 ADC pins ? Thanks Upvote 0
Johan Hormaza Well-Known Member Licensed User Longtime User Sep 18, 2018 #4 viriato said: Hi, Do you have an B4R example reading ESP32 ADC pins ? Thanks Click to expand... Yes! Upvote 0
Johan Hormaza Well-Known Member Licensed User Longtime User Sep 18, 2018 #5 These are the most common ADC pins in ESP32 Attachments upload_2018-9-18_10-20-15.png 355.9 KB · Views: 674 Upvote 0
Johan Hormaza Well-Known Member Licensed User Longtime User Sep 18, 2018 #6 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 Code: Copy 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 ADCandPWM.zip 1.2 KB · Views: 595 Upvote 0
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 Code: Copy 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
Johan Hormaza Well-Known Member Licensed User Longtime User Sep 18, 2018 #7 Here is an image of ESP32 and its pins Attachments tGI2F.jpg 151.3 KB · Views: 817 Upvote 0
viriato Member Licensed User Longtime User Sep 18, 2018 #8 Johan, Great , this is going to help Gracias , Many thanks Upvote 0
canalrun Well-Known Member Licensed User Longtime User Feb 21, 2019 #9 Johan Hormaza said: Of course, B4R has all the functions, since the analog converters are the same configuration as an Arduino. Click to expand... I'm going to hijack this thread - even though it is 2 months old. 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
Johan Hormaza said: Of course, B4R has all the functions, since the analog converters are the same configuration as an Arduino. Click to expand... I'm going to hijack this thread - even though it is 2 months old. 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.
Erel B4X founder Staff member Licensed User Longtime User Feb 21, 2019 #10 Should be simple to call with inline C. Code: Copy #if C void AnalogSetWidth(B4R::Object* o) { analogSetWidth(10); } #End if RunNative("AnalogSetWidth", Null) Upvote 0
Should be simple to call with inline C. Code: Copy #if C void AnalogSetWidth(B4R::Object* o) { analogSetWidth(10); } #End if RunNative("AnalogSetWidth", Null)