Search found 17 matches

by davidzuhn
Fri Dec 18, 2020 5:31 pm
Forum: ESP-IDF
Topic: How to use strings in esp idf?
Replies: 6
Views: 32966

Re: How to use strings in esp idf?

You are compiling main.c, which is a C source file. You should rename this to main.cpp (and update your CMakeLists.txt or Makefiles accordingly) to have the tools recognize this as a C++ source file and compile it using the C++ compiler. BTW, it's a lot easier to read the error messages if you cut a...
by davidzuhn
Sun Dec 13, 2020 6:27 pm
Forum: Hardware
Topic: Running two ultrasound detections independently on one ESP32
Replies: 3
Views: 3524

Re: Running two ultrasound detections independently on one ESP32

Parallel loops are indeed possible, but it's done through FreeRTOS constructs instead of being built in to C. You can start up multiple tasks, each of which is running their own main processing loop. If you have one for each of the two devices you're managing, you can take the results from each of t...
by davidzuhn
Fri Dec 11, 2020 6:07 pm
Forum: ESP-IDF
Topic: How to use Esp-idf to run Html code
Replies: 7
Views: 16952

Re: How to use Esp-idf to run Html code

What do you expect to happen with this bit of HTML? I'm not sure what you mean, since I don't normally think of "running HTML". You can parse it and display something on a user interface (such as within a web browser). So if you're asking how to present a slider to a user from your ESP32 code, there...
by davidzuhn
Mon Dec 07, 2020 6:59 pm
Forum: ESP-IDF
Topic: Pipe of Subprocess in ANSI C
Replies: 3
Views: 6865

Re: Pipe of Subprocess in ANSI C

The code running on the ESP32 is more like the kernel than an Unix-like process. There are no processes, just tasks within a single address space. So I'm not in any way surprised that popen isn't part of the available libraries. Also, note that popen isn't part of ANSI C (it's probably standardized ...
by davidzuhn
Mon Oct 26, 2020 1:57 am
Forum: ESP-IDF
Topic: WiFi CONNECTION : ESP32 to LAPTOP : It just won't work
Replies: 5
Views: 7631

Re: WiFi CONNECTION : ESP32 to LAPTOP : It just won't work

examples/protocols/sockets/tcp_client in esp-idf v4.1 contains basic socket example code, using IDF only (not the Arduino wrappers). The sockets interface for TCP code works pretty much just like the sockets interface anywhere else, so books or websites that cover Unix network programming will be sp...
by davidzuhn
Fri Jan 17, 2020 9:35 pm
Forum: ESP-IDF
Topic: Adafruit HUZZAH32 compatible with ESP32 IDF?
Replies: 2
Views: 4804

Re: Adafruit HUZZAH32 compatible with ESP32 IDF?

You certainly CAN use the Huzzah32 as a platform for native ESP-IDF programs. You have to pay attention to I/O pin definitions, since you don't have a definition for them within the IDF itself. You can grab them from the Arduino code, or just use the pinout diagrams from the Adafruit site (https://l...
by davidzuhn
Fri Sep 20, 2019 1:53 am
Forum: ESP-IDF
Topic: C++ components
Replies: 3
Views: 7550

Re: C++ components

<string.h> is the C library header file for functions like strcmp.

<string> is the C++ library header file which contains the std::string class declaration.

You need to change <string.h> to <string>.