Search found 107 matches

by Archibald
Tue Jul 03, 2018 9:51 am
Forum: General Discussion
Topic: Best approach for button functionality
Replies: 10
Views: 9988

Re: Best approach for button functionality

There's an example here . . . .
https://www.arduino.cc/en/Tutorial/Debounce
. . . . . but use internal resistor.

If you want to switch on/off the power to your ESP32 consider purchasing a push button switch with 'push on push off' action (sometimes called 'maintained or 'latching' action).
by Archibald
Tue Jul 03, 2018 7:52 am
Forum: ESP32 Arduino
Topic: Separate Values from a String
Replies: 10
Views: 6707

Re: Separate Values from a String

That's why in my first post I wrote "If you are certain there are always 2, 4 and 3 characters respectively" :) I assume client.print does not put spaces between sucessive values. I therefore suggest you insert commas (or some other character). In the code below, I make use of the fact that toInt() ...
by Archibald
Mon Jul 02, 2018 6:01 pm
Forum: ESP32 Arduino
Topic: Separate Values from a String
Replies: 10
Views: 6707

Re: Separate Values from a String

Use toInt() . . . . , . String data = "1023-01289"; int h,p,t; void setup() { Serial.begin(115200); p = data.substring(0,4).toInt(); t = data.substring(4,8).toInt(); h = data.substring(8,10).toInt(); Serial.println(p); Serial.println(t); Serial.println(h); } toFloat() is also available if you need i...
by Archibald
Mon Jul 02, 2018 1:26 pm
Forum: ESP32 Arduino
Topic: Separate Values from a String
Replies: 10
Views: 6707

Re: Separate Values from a String

If you are certain there are always 2, 4 and 3 characters respectively (even if the temperature is negative for example), simply use the substring function to extract the three readings as strings . . . . . String data = "humidity=89, airpressure=1023 and temperature=-05"; void setup() { Serial.begi...
by Archibald
Fri Jun 29, 2018 9:21 am
Forum: Hardware
Topic: 关于ADC采样率
Replies: 2
Views: 1762

Re: 关于ADC采样率

Google translation of original post from Chinese: I can not find the ADC sampling rate in the manual information, in the forum to see the post said to be 6K Hz, this 6KHz is 12Bit sampling the maximum sample rate? What is the maximum sample rate for each bit sample? I am using the Arduino IDF. If I...
by Archibald
Sun Jun 10, 2018 11:08 am
Forum: ESP-IDF
Topic: [Solved] Error cloning ESP-IDF from github
Replies: 2
Views: 2156

Re: Error cloning ESP-IDF from github

Very many thanks Paul,

That has resolved the issue.
by Archibald
Sun Jun 10, 2018 6:06 am
Forum: ESP-IDF
Topic: [Solved] Error cloning ESP-IDF from github
Replies: 2
Views: 2156

[Solved] Error cloning ESP-IDF from github

I am getting an error when attempting to install the ESP32 IDF software onto a new PC. Archibald@DESKTOP-MEEDJIJ MINGW32 ~ $ mkdir -p ~/esp Archibald@DESKTOP-MEEDJIJ MINGW32 ~ $ cd ~/esp Archibald@DESKTOP-MEEDJIJ MINGW32 ~/esp $ git clone --recursive https://github.com/espressif/esp-idf.git Cloning ...
by Archibald
Wed Jun 06, 2018 5:01 pm
Forum: ESP32 Arduino
Topic: ESP32 DAC1 and DAC2 not synchronous on Arduino IDE
Replies: 5
Views: 3300

Re: ESP32 DAC1 and DAC2 not synchronous on Arduino IDE

You could put a sample-and-hold circuit on the output of each DAC. The output voltages of the sample-and-hold circuits could be held while the the software changes one DAC voltage then the other. A GPIO digital output would control both sample-and-hold circuits so their outputs would change simultan...
by Archibald
Fri Jun 01, 2018 10:37 pm
Forum: General Discussion
Topic: use of LED control for buzzer?
Replies: 12
Views: 5496

Re: use of LED control for buzzer?

Just an FYI, it's not a good idea to drive a piezo electric device via a GPIO pin. Piezo devices can generate negative voltages. I'm getting only -40mV. Is that measured with a scope or meter. That was measured with a scope with 4kHz signal. There's no negative voltage if I drop the GPIO drive stre...
by Archibald
Fri Jun 01, 2018 10:01 pm
Forum: General Discussion
Topic: use of LED control for buzzer?
Replies: 12
Views: 5496

Re: use of LED control for buzzer?

mikemoy wrote:Just an FYI, it's not a good idea to drive a piezo electric device via a GPIO pin. Piezo devices can generate negative voltages.
I'm getting only -40mV but no negative voltage if I reduce the GPIO drive strength to the lowest option.

Go to advanced search