Search found 107 matches

by Archibald
Mon Aug 06, 2018 12:06 am
Forum: ESP32 Arduino
Topic: How can I pass a value from Arduino C To HTML?
Replies: 11
Views: 9090

Re: How can I pass a value from Arduino C To HTML?

As index_html needs to be modifiable, it should not be declared using the 'const' keyword. It's therefore also inappropriate to use PROGMEM. You could even avoid using index_html at all: server.send_P(200, "text/html", before+temperature_string+after); Were you seeing "This should show the temperatu...
by Archibald
Sun Aug 05, 2018 6:48 pm
Forum: ESP32 Arduino
Topic: How can I pass a value from Arduino C To HTML?
Replies: 11
Views: 9090

Re: How can I pass a value from Arduino C To HTML?

Within index_html[] you need to replace the text "This should show the termperature" with what's in the temperature_string variable before sending the HTML. (I assume you are seeing that text on your computer's browser.) I suggest you split index_html[] before and after "This should show the tempera...
by Archibald
Fri Aug 03, 2018 2:23 pm
Forum: General Discussion
Topic: Measure VDD33 using ADC2
Replies: 6
Views: 4309

Re: Measure VDD33 using ADC2

An ADC set to maximum attenuation of 11dB will only measure up to about 3.1V on a 3.3V supply, and even then with lots of non-linearity. I therefore doubt it's possible to use an ADC to measure Vdd via internal connection. The suggestion in a previous post to use a voltage divider makes sense. That ...
by Archibald
Fri Aug 03, 2018 3:35 am
Forum: ESP32 Arduino
Topic: ESP32 ADC Non-linear Issues - How do I fix / change Attenuation or width?
Replies: 43
Views: 52611

Re: ESP32 ADC Non-linear Issues - How do I fix / change Attenuation or width?

Non-linearity is bad with 11dB attenuation and input voltages greater than about 2.6V, as shown by the graph in the original post of this thread. Factory "two point" calibration will not remove that non-linearity. From my measurements, graphs with 6dB and 0dB attenuation appear to have good linearit...
by Archibald
Wed Jul 18, 2018 8:47 am
Forum: Hardware
Topic: measure 9v to 18v
Replies: 8
Views: 3941

Re: measure 9v to 18v

The ESP32 datasheet says that a digital input voltage should be between -0.3V and VDD+0.3V. A graph on the BAT760-7 datasheet indicates that the diode at 0°C will drop 0.3V at about 25mA. Assuming the input voltage range also applies to ADC inputs and ignoring tolerances, 25mA through 150K would req...
by Archibald
Mon Jul 16, 2018 9:21 am
Forum: Hardware
Topic: measure 9v to 18v
Replies: 8
Views: 3941

Re: measure 9v to 18v

. . . would I calculate the voltage divider as 6.8v input? As you wish to measure up to 18V, you don't want the zener to be conducting when you have 18V input. A datasheet I'm looking at for a particular 6.8V zener gives a tolerance of 6.4V to 7.2V at 5mA. A graph on the datasheet clearly shows the...
by Archibald
Sun Jul 15, 2018 11:24 am
Forum: Hardware
Topic: measure 9v to 18v
Replies: 8
Views: 3941

Re: measure 9v to 18v

You are right to be concerned about protecting the ADC input. It is said that there can be substantial voltage spikes on car battery voltages but I have not seen any information about what voltages can be expected. Don't forget to also protect the power supply to your ESP32. The voltage-current char...
by Archibald
Thu Jul 05, 2018 6:32 pm
Forum: ESP32 Arduino
Topic: I2C freeze/fail problems
Replies: 7
Views: 5326

Re: I2C freeze/fail problems

There is an alternative 'Wire' library here which is supposed to avoid some of the issues with using I²C: https://github.com/stickbreaker/arduino-esp32/tree/master/libraries/Wire I don't know how that compares with the latest official Arduino ESP32 build. Capacitance within connecting cables can cau...
by Archibald
Tue Jul 03, 2018 11:41 am
Forum: General Discussion
Topic: Best approach for button functionality
Replies: 10
Views: 9915

Re: Best approach for button functionality

Yes, it's Arduino code but you shouldn't have any trouble reading it to understand what it does and why it does it. It does "filter" contact bounces. As it stands, it determines when there have been no contact bounces for at least 50ms.
by Archibald
Tue Jul 03, 2018 10:56 am
Forum: ESP32 Arduino
Topic: Separate Values from a String
Replies: 10
Views: 6646

Re: Separate Values from a String

I think you included an out of date version of your code; otherwise I would have expected a comma or two to show up on the display! Because the number of characters representing each value can vary, you need to print the integer and float values to the display, not the substrings. Also, because the ...

Go to advanced search