Search found 12 matches
- Sun Jul 31, 2022 8:58 pm
- Forum: General Discussion
- Topic: What is the power consumed by esp_now?
- Replies: 0
- Views: 904
What is the power consumed by esp_now?
Hi, I am using ESP_NOW protocol for sending and I need to know what is the power consumed by esp_now when sending 1 byte ? there is no clarification in the documentation of esp_now.
- Thu May 12, 2022 1:52 pm
- Forum: ESP32 Arduino
- Topic: Sending array by using wifi
- Replies: 10
- Views: 7271
Re: Sending array by using wifi
I get output like this for this code temperature = httpGETRequest(serverNameTemp); : this is the output, temperature = { "temp" : [22,23,27,18,19,20,21,25,23,22] } but I need to reach to each value inside this received array, what is the change on temperature = httpGETRequest(serverNameTemp);
- Thu May 12, 2022 11:48 am
- Forum: ESP32 Arduino
- Topic: Sending array by using wifi
- Replies: 10
- Views: 7271
Re: Sending array by using wifi
I think the other proposed solution using JSON may be better. What does it print? You should see the JSON string you constructed on the server. [/quote] Yes, I use json as @lbernstone suggested but now my problem how can deal with the values in receiver side? I need to make some processing on the re...
- Thu May 12, 2022 11:12 am
- Forum: ESP32 Arduino
- Topic: Sending array by using wifi
- Replies: 10
- Views: 7271
Re: Sending array by using wifi
OK, in this way I can send array after define the array and json global : unsigned char a[10] = {22, 23, 27, 18, 19, 20, 21, 25, 23, 22}; String json; in serup(): json = "{ \"temp\" : [" + (String)a[0]; for (int i=1; i < sizeof(a); i++) { json += "," + (String)a[i]; } json += "] }"; // request->send...
- Thu May 12, 2022 10:50 am
- Forum: ESP32 Arduino
- Topic: Sending array by using wifi
- Replies: 10
- Views: 7271
Re: Sending array by using wifi
I will assume you are talking about a ESPAsyncWebServer response. The documentation is at https://github.com/me-no-dev/ESPAsyncWebServer. There is a send() function for sending strings. I can't imagine why you would send a bare string like that, so I'll demonstrate wrapping some json. uint8_t a[10]...
- Thu May 12, 2022 10:41 am
- Forum: ESP32 Arduino
- Topic: Sending array by using wifi
- Replies: 10
- Views: 7271
Re: Sending array by using wifi
Does readTemp compile? It looks like it might try to return a pointer to a temporary on the stack as an 8-bit value. Perhaps you want it to return unsigned char * and add static to the a[5]. And then you'll want to change the 5 to a 6 and add a null terminator so it can be a c string. And then you ...
- Wed May 11, 2022 10:05 pm
- Forum: ESP32 Arduino
- Topic: Sending array by using wifi
- Replies: 10
- Views: 7271
Sending array by using wifi
Hello, In this code I return string from the function readTemp().Now I'm asking what is I should use rather than c_str if I need to return unsigned char? string readTemp() { return string(50); } void setup(){ request->send_P(200, "text/plain", readTemp().c_str()); } Now I need to deal with unsigned ...
- Wed Oct 27, 2021 11:45 am
- Forum: ESP32 Arduino
- Topic: Passing data of captured image in esp32-cam to function in .cpp file
- Replies: 0
- Views: 1947
Passing data of captured image in esp32-cam to function in .cpp file
Hi everyone, I have this rr.cpp file #include <iostream> using namespace std; #include <fstream> #include <string> #include <Arduino.h> //------------------------------------------ void dosome() { ifstream fin("read.txt"); ofstream fcom("write.txt"); //Complete the rest of the code } and this rr.h f...
- Fri Oct 22, 2021 7:45 pm
- Forum: General Discussion
- Topic: ESP32-CAM: Can someone explain how the camera frame buffer pointer works
- Replies: 5
- Views: 24159
Re: ESP32-CAM: Can someone explain how the camera frame buffer pointer works
Hi, I don't think it possible to access individual pixels when it is captured as a JPG as it is stored in this compressed format so it would need to be decoded first. You could capture the image as RGB or Greyscale directly and access the data rather than capture as JPG then convert if (not somethi...
- Mon Oct 18, 2021 1:41 pm
- Forum: ESP32 Arduino
- Topic: How to get the data of captured image in esp32-cam
- Replies: 1
- Views: 4014
How to get the data of captured image in esp32-cam
I'm working on this code that take capture and then save the image in SD card , I need to know how can I get the data of image to make some image processing on these data(I need this data as a numeric value) before it save as jpeg image in sd card ? I don't have any idea how can do that any help ple...