Question/Issue: I am working on a machine learning project using Arduino. The zip file download for esp32 won’t run because of a cfloat error. I have gone through the entire zip file and found no clfoat file that links to the numpy location. How do I fix this error?
Project ID:
Context/Use case:
Are you using the arduino ide? And downloading the Arduino library?
Or what ide are you using?
Hi @Kimbetty ,
Please copy and paste the error messages you see from the Arduino IDE. That will help us troubleshoot your issue.
I have the same issue, this is the error copy pasted:
In file included from C:\Users\berniabadr\Documents\Arduino\libraries\stemmervanpulhof-project-1_inferencing\src/edge-impulse-sdk/classifier/ei_model_types.h:24:0,
from C:\Users\berniabadr\Documents\Arduino\libraries\stemmervanpulhof-project-1_inferencing\src/edge-impulse-sdk/classifier/ei_run_dsp.h:21,
from C:\Users\berniabadr\Documents\Arduino\libraries\stemmervanpulhof-project-1_inferencing\src/edge-impulse-sdk/classifier/ei_run_classifier.h:23,
from C:\Users\berniabadr\Documents\Arduino\libraries\stemmervanpulhof-project-1_inferencing\src/stemmervanpulhof-project-1_inferencing.h:49,
from C:\Users\berniabadr\AppData\Local\Temp.arduinoIDE-unsaved2024031-30596-1cofyw8.q9r6\static_buffer\static_buffer.ino:18:
C:\Users\berniabadr\Documents\Arduino\libraries\stemmervanpulhof-project-1_inferencing\src/edge-impulse-sdk/dsp/numpy.hpp:32:10: fatal error: cfloat: No such file or directory
#include
^~~~~~~~
compilation terminated.
exit status 1
Compilation error: exit status 1
Hi @stemmervanpulhof ,
Which ESP32 are you using?
I don’t have a lot of experience so if I need to be more specific tell me. But I’m using the ESP-EYE. Does that help?
@stemmervanpulhof ,
Apologies for the delay. Were you able to figure this out? If not, could you provide the following:
Edge Impulse project ID number (so I can try to replicate the issue)
Which version of the Arduino ESP32 board package do you have installed (you can find this in the Arduino IDE)?
Hi @shawn_edgeimpulse ,
No worries, thanks for helping me out! I have not yet figured it out.
The project ID number is: 284341. I’ve also got the link in case you’d need it: stemmervanpulhof-project-1 - Dashboard - Edge Impulse .
For the board package, I haven’t downloaded any library since I deleted the Arduino IDE application and reinstalled it to see if it would work. I did have a library installed before but I do not know precisely which one.
Kind regards
Hi @stemmervanpulhof ,
I was able to compile your project successfully. Here is what I used:
Arduino IDE v2.2.1
esp32 board package v2.0.14
Board selected: ESP32 Wrover Module
Could you see if those settings/versions work for you?
Hi @shawn_edgeimpulse ,
Sorry for the late response, I hadn’t touched my project since friday and I didn’t see your message. Apart from that, it worked! I really appreciate the help. I do have another issue though, it keeps giving me an error exit status 2. Does it have to do with the cable I use to connect the esp32 to the PC? Because I’ve tried multiple cables and nothing works. This is the error:
Sketch uses 447345 bytes (34%) of program storage space. Maximum is 1310720 bytes.
Global variables use 26460 bytes (8%) of dynamic memory, leaving 301220 bytes for local variables. Maximum is 327680 bytes.
esptool.py v4.5.1
Serial port COM6
Connecting…
A fatal error occurred: Failed to connect to ESP32: No serial data received.
For troubleshooting steps visit: Troubleshooting - ESP32 - — esptool.py latest documentation
Failed uploading: uploading error: exit status 2
Kind regards
Hi @stemmervanpulhof ,
The error could be related to a number of issues: bad cable, bad driver, board not in bootloader. Please check out these threads to see if any of the advice in there helps:
Hi guys, I want to upload only basic code to esp32 from Arduino Ide but I uploaded it from my computer but when I tried to upload company computer I got some issues like:: my dev-kit esp-32S my code: int LED_BUILTIN = 2; void setup() { pinMode...
Reading time: 1 mins 🕑
Likes: 1 ❤
Hello There, I'm trying to use the esp32 cam as in this link ESP32-CAM Video Streaming and Face Recognition with Arduino IDE | Random Nerd Tutorials. the code compiling is ok. my problem is in loading the code, I get this error: Serial port COM14 ...
Reading time: 1 mins 🕑
Likes: 2 ❤
opened 08:08AM - 11 May 23 UTC
closed 08:20PM - 25 May 23 UTC
Type: Question
Status: Community help needed
Resolution: HW issue
### Board
ESP32 s
### Device Description
On Arduino UNO
### Hardware Configu… ration
no
### Version
v2.0.1
### IDE Name
Arduino
### Operating System
Windows 10
### Flash frequency
40
### PSRAM enabled
yes
### Upload speed
115200
### Description
Failed to connect to ESP32: No serial data received.
### Sketch
```cpp
#include "esp_camera.h"
#include <WiFi.h>
//
// WARNING!!! PSRAM IC required for UXGA resolution and high JPEG quality
// Ensure ESP32 Wrover Module or other board with PSRAM is selected
// Partial images will be transmitted if image exceeds buffer size
//
// You must select partition scheme from the board menu that has at least 3MB APP space.
// Face Recognition is DISABLED for ESP32 and ESP32-S2, because it takes up from 15
// seconds to process single frame. Face Detection is ENABLED if PSRAM is enabled as well
// ===================
// Select camera model
// ===================
//#define CAMERA_MODEL_WROVER_KIT // Has PSRAM
//#define CAMERA_MODEL_ESP_EYE // Has PSRAM
//#define CAMERA_MODEL_ESP32S3_EYE // Has PSRAM
//#define CAMERA_MODEL_M5STACK_PSRAM // Has PSRAM
//#define CAMERA_MODEL_M5STACK_V2_PSRAM // M5Camera version B Has PSRAM
//#define CAMERA_MODEL_M5STACK_WIDE // Has PSRAM
//#define CAMERA_MODEL_M5STACK_ESP32CAM // No PSRAM
//#define CAMERA_MODEL_M5STACK_UNITCAM // No PSRAM
#define CAMERA_MODEL_AI_THINKER // Has PSRAM
//#define CAMERA_MODEL_TTGO_T_JOURNAL // No PSRAM
//#define CAMERA_MODEL_XIAO_ESP32S3 // Has PSRAM
// ** Espressif Internal Boards **
//#define CAMERA_MODEL_ESP32_CAM_BOARD
//#define CAMERA_MODEL_ESP32S2_CAM_BOARD
//#define CAMERA_MODEL_ESP32S3_CAM_LCD
#include "camera_pins.h"
// ===========================
// Enter your WiFi credentials
// ===========================
//const char* ssid = "**********";
//const char* password = "**********";
const char* ssid = "STAFF";
const char* password = "Staff2023$nas";
//const char* ssid = "faiq001";
//const char* password = "FA0508420374";
void startCameraServer();
void setupLedFlash(int pin);
void setup() {
Serial.begin(115200);
Serial.setDebugOutput(true);
Serial.println();
camera_config_t config;
config.ledc_channel = LEDC_CHANNEL_0;
config.ledc_timer = LEDC_TIMER_0;
config.pin_d0 = Y2_GPIO_NUM;
config.pin_d1 = Y3_GPIO_NUM;
config.pin_d2 = Y4_GPIO_NUM;
config.pin_d3 = Y5_GPIO_NUM;
config.pin_d4 = Y6_GPIO_NUM;
config.pin_d5 = Y7_GPIO_NUM;
config.pin_d6 = Y8_GPIO_NUM;
config.pin_d7 = Y9_GPIO_NUM;
config.pin_xclk = XCLK_GPIO_NUM;
config.pin_pclk = PCLK_GPIO_NUM;
config.pin_vsync = VSYNC_GPIO_NUM;
config.pin_href = HREF_GPIO_NUM;
config.pin_sccb_sda = SIOD_GPIO_NUM;
config.pin_sccb_scl = SIOC_GPIO_NUM;
config.pin_pwdn = PWDN_GPIO_NUM;
config.pin_reset = RESET_GPIO_NUM;
config.xclk_freq_hz = 20000000;
config.frame_size = FRAMESIZE_UXGA;
config.pixel_format = PIXFORMAT_JPEG; // for streaming
//config.pixel_format = PIXFORMAT_RGB565; // for face detection/recognition
config.grab_mode = CAMERA_GRAB_WHEN_EMPTY;
config.fb_location = CAMERA_FB_IN_PSRAM;
config.jpeg_quality = 12;
config.fb_count = 1;
// if PSRAM IC present, init with UXGA resolution and higher JPEG quality
// for larger pre-allocated frame buffer.
if(config.pixel_format == PIXFORMAT_JPEG){
if(psramFound()){
config.jpeg_quality = 10;
config.fb_count = 2;
config.grab_mode = CAMERA_GRAB_LATEST;
} else {
// Limit the frame size when PSRAM is not available
config.frame_size = FRAMESIZE_SVGA;
config.fb_location = CAMERA_FB_IN_DRAM;
}
} else {
// Best option for face detection/recognition
config.frame_size = FRAMESIZE_240X240;
#if CONFIG_IDF_TARGET_ESP32S3
config.fb_count = 2;
#endif
}
#if defined(CAMERA_MODEL_ESP_EYE)
pinMode(13, INPUT_PULLUP);
pinMode(14, INPUT_PULLUP);
#endif
// camera init
esp_err_t err = esp_camera_init(&config);
if (err != ESP_OK) {
Serial.printf("Camera init failed with error 0x%x", err);
return;
}
sensor_t * s = esp_camera_sensor_get();
// initial sensors are flipped vertically and colors are a bit saturated
if (s->id.PID == OV3660_PID) {
s->set_vflip(s, 1); // flip it back
s->set_brightness(s, 1); // up the brightness just a bit
s->set_saturation(s, -2); // lower the saturation
}
// drop down frame size for higher initial frame rate
if(config.pixel_format == PIXFORMAT_JPEG){
s->set_framesize(s, FRAMESIZE_QVGA);
}
#if defined(CAMERA_MODEL_M5STACK_WIDE) || defined(CAMERA_MODEL_M5STACK_ESP32CAM)
s->set_vflip(s, 1);
s->set_hmirror(s, 1);
#endif
#if defined(CAMERA_MODEL_ESP32S3_EYE)
s->set_vflip(s, 1);
#endif
// Setup LED FLash if LED pin is defined in camera_pins.h
#if defined(LED_GPIO_NUM)
setupLedFlash(LED_GPIO_NUM);
#endif
WiFi.begin(ssid, password);
WiFi.setSleep(false);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println("");
Serial.println("WiFi connected");
startCameraServer();
Serial.print("Camera Ready! Use 'http://");
Serial.print(WiFi.localIP());
Serial.println("' to connect");
}
void loop() {
// Do nothing. Everything is done in another task by the web server
delay(10000);
}
```
### Debug Message
```plain
Serial port COM9
Connecting......................................
A fatal error occurred: Failed to connect to ESP32: No serial data received.
For troubleshooting steps visit: https://docs.espressif.com/projects/esptool/en/latest/troubleshooting.html
Failed uploading: uploading error: exit status 2
```
### Other Steps to Reproduce
_No response_
### I have checked existing issues, online documentation and the Troubleshooting Guide
- [X] I confirm I have checked existing issues, online documentation and Troubleshooting guide.
Hi @shawn_edgeimpulse ,
I’ll check it out. I’m really thankful for your help.
Kind regards,