Closed Schoose closed 5 years ago
Hi, i did all the points, described in the wiki: Installation of the libraries and commented out the sensor.h in Adafruit_BME280.h. Unfortunatelly i get the following error while compiling:
sketch/esp32-camera-bme280.ino.cpp.o:(.literal._Z5setupv+0x6c): undefined reference to `startCameraServer()'
sketch/esp32-camera-bme280.ino.cpp.o: In function
setup()': /home/dragon/Arduino/Sketchbook/esp32-camera-bme280-master/esp32-camera-bme280/esp32-camera-bme280.ino:291: undefined reference to
startCameraServer()' collect2: error: ld returned 1 exit status exit status 1 Fehler beim Kompilieren für das Board ESP32 Wrover Module.I tried to compile with the" ESP32 Wrover Module" and with "TTGO LoRa32-OLED V1" -Boards and got always the same error. Could you help me please. Thanks a lot
This is the project directory was reset by Arduino, please open the project directory and rename esp32-camera-bme280-master
to esp32-camera-bme280
, and ensure that the contents are the same as the following figure.
Thank you very much, now it works perfect, with " ESP32 Wrover Module" as Board.
Привет, я сделал все пункты, описанные в вики: Установка библиотек и закомментировал sensor.h в Adafruit_BME280.h. К сожалению, я получаю следующую ошибку при компиляции: sketch / esp32-camera-bme280.ino.cpp.o :(. literal._Z5setupv + 0x6c): неопределенная ссылка на startCameraServer () sketch / esp32-camera-bme280.ino.cpp.o: В функции
setup()': /home/dragon/Arduino/Sketchbook/esp32-camera-bme280-master/esp32-camera-bme280/esp32-camera-bme280.ino:291: undefined reference to
startCameraServer () ' collect2: error: ld возвращено 1 состояние выхода из состояния выхода 1 Fehler beim Kompilieren für das Плата ESP32 Wrover Module. Я попытался скомпилировать с "ESP32 Wrover Module" и с "TTGO LoRa32-OLED V1" -Boards и получил всегда одну и ту же ошибку. Не могли бы вы мне помочь, пожалуйста. большое спасибоЭтот каталог проекта был сброшен Arduino, пожалуйста, откройте каталог проекта и переименуйте
esp32-camera-bme280-master
егоesp32-camera-bme280
, и убедитесь, что содержимое совпадает со следующим рисунком.
Good day friends! I ask for help, since I have a similar problem on Windows 10, arduino ide and ESP 32 ttgo T-camera. I tried to follow the examples of the solution that was described above, but nothing changes and I still could not compile the code. I am new to this and ask you, please help me to deal with this problem. Thank you very much in advance.
/***
/***
// #define SOFTAP_MODE //The comment will be connected to the specified ssid // #define ENABLE_BME280
/***
/***
SSD1306 oled(SSD1306_ADDRESS, I2C_SDA, I2C_SCL); OLEDDisplayUi ui(&oled);
String ip; EventGroupHandle_t evGroup;
OneButton button1(BUTTON_1, true);
Adafruit_BME280 bme;
void startCameraServer(); char buff[128];
bool setPowerBoostKeepOn(int en) { Wire.beginTransmission(IP5306_ADDR); Wire.write(IP5306_REG_SYS_CTL0); if (en) Wire.write(0x37); // Set bit1: 1 enable 0 disable boost keep on else Wire.write(0x35); // 0x37 is default reg value return Wire.endTransmission() == 0; }
void buttonClick() { static bool en = false; xEventGroupClearBits(evGroup, 1); sensor_t *s = esp_camera_sensor_get(); en = en ? 0 : 1; s->set_vflip(s, en); delay(200); xEventGroupSetBits(evGroup, 1); }
void buttonLongPress() { int x = oled.getWidth() / 2; int y = oled.getHeight() / 2; ui.disableAutoTransition(); oled.setTextAlignment(TEXT_ALIGN_CENTER); oled.setFont(ArialMT_Plain_10); oled.clear();
if (PWDN_GPIO_NUM > 0) {
pinMode(PWDN_GPIO_NUM, PULLUP);
digitalWrite(PWDN_GPIO_NUM, HIGH);
}
oled.drawString(x, y, "Press again to wake up");
oled.display();
delay(6000);
oled.clear();
oled.display();
oled.displayOff();
esp_sleep_enable_ext0_wakeup((gpio_num_t )BUTTON_1, LOW);
esp_deep_sleep_start();
}
void drawFrame1(OLEDDisplay display, OLEDDisplayUiState state, int16_t x, int16_t y) { display->setTextAlignment(TEXT_ALIGN_CENTER);
display->setFont(ArialMT_Plain_10);
display->drawString(64 + x, 25 + y, buff);
display->setFont(ArialMT_Plain_16);
display->drawString(64 + x, 35 + y, ip);
if (digitalRead(AS312_PIN)) {
display->drawString(64 + x, 5 + y, "AS312 Trigger");
}
}
void drawFrame2(OLEDDisplay display, OLEDDisplayUiState state, int16_t x, int16_t y) {
static String temp, pressure, altitude, humidity;
static uint64_t lastMs;
if (millis() - lastMs > 2000) {
lastMs = millis();
temp = "Temp:" + String(bme.readTemperature()) + " *C";
pressure = "Press:" + String(bme.readPressure() / 100.0F) + " hPa";
altitude = "Altitude:" + String(bme.readAltitude(SEALEVELPRESSURE_HPA)) + " m";
humidity = "Humidity:" + String(bme.readHumidity()) + " %";
}
display->setFont(ArialMT_Plain_16);
display->setTextAlignment(TEXT_ALIGN_LEFT);
display->drawString(0 + x, 0 + y, temp);
display->drawString(0 + x, 16 + y, pressure);
display->drawString(0 + x, 32 + y, altitude);
display->drawString(0 + x, 48 + y, humidity);
display->setTextAlignment(TEXT_ALIGN_CENTER);
display->setFont(ArialMT_Plain_10);
display->drawString( 64 + x, 5 + y, "Camera Ready! Use");
display->drawString(64 + x, 25 + y, "http://" + ip );
display->drawString(64 + x, 45 + y, "to connect");
}
FrameCallback frames[] = {drawFrame1, drawFrame2};
void setup() { int x = oled.getWidth() / 2; int y = oled.getHeight() / 2;
Serial.begin(115200);
Serial.setDebugOutput(true);
Serial.println();
pinMode(AS312_PIN, INPUT);
Wire.begin(I2C_SDA, I2C_SCL);
bool isOk = setPowerBoostKeepOn(1);
String info = "IP5306 KeepOn " + String((isOk ? "PASS" : "FAIL"));
oled.init();
Wire.setClock(100000); //! Reduce the speed and prevent the speed from being too high, causing the screen
oled.setFont(ArialMT_Plain_16);
oled.setTextAlignment(TEXT_ALIGN_CENTER);
delay(50);
oled.drawString(x, y - 10, "TTGO Camera");
oled.display();
delay(1000);
oled.setFont(ArialMT_Plain_10);
oled.clear();
oled.drawString(x, y - 10, info);
oled.display();
oled.setFont(ArialMT_Plain_16);
delay(1000);
if (!bme.begin(BEM280_ADDRESS)) {
Serial.println("Could not find a valid BME280 sensor, check wiring!");
while (1);
}
if (!(evGroup = xEventGroupCreate())) {
Serial.println("evGroup Fail");
while (1);
}
xEventGroupSetBits(evGroup, 1);
/* IO13, IO14 is designed for JTAG by default,
* to use it as generalized input,
* firstly declair it as pullup input */
pinMode(13, INPUT_PULLUP);
pinMode(14, INPUT_PULLUP);
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_sscb_sda = SIOD_GPIO_NUM;
config.pin_sscb_scl = SIOC_GPIO_NUM;
config.pin_pwdn = PWDN_GPIO_NUM;
config.pin_reset = RESET_GPIO_NUM;
config.xclk_freq_hz = 20000000;
config.pixel_format = PIXFORMAT_JPEG;
//init with high specs to pre-allocate larger buffers
config.frame_size = FRAMESIZE_UXGA;
config.jpeg_quality = 10;
config.fb_count = 2;
// camera init
esp_err_t err = esp_camera_init(&config);
if (err != ESP_OK) {
Serial.printf("Camera init Fail");
oled.clear();
oled.drawString(oled.getWidth() / 2, oled.getHeight() / 2, "Camera init Fail");
oled.display();
while (1);
}
//drop down frame size for higher initial frame rate
sensor_t *s = esp_camera_sensor_get();
s->set_framesize(s, FRAMESIZE_QVGA);
button1.attachLongPressStart(buttonLongPress);
button1.attachClick(buttonClick);
uint8_t mac[6];
WiFi.mode(WIFI_AP);
IPAddress apIP = IPAddress(2, 2, 2, 1);
WiFi.softAPConfig(apIP, apIP, IPAddress(255, 255, 255, 0));
esp_wifi_get_mac(WIFI_IF_AP, mac);
sprintf(buff, "TTGO-CAMERA-%02X:%02X", mac[4], mac[5]);
Serial.printf("Device AP Name:%s\n", buff);
if (!WiFi.softAP(buff, NULL, 1, 0)) {
Serial.println("AP Begin Failed.");
while (1);
}
WiFi.begin(WIFI_SSID, WIFI_PASSWD);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println("");
Serial.println("WiFi connected");
startCameraServer();
delay(50);
ui.setTargetFPS(30);
ui.setIndicatorPosition(BOTTOM);
ui.setIndicatorDirection(LEFT_RIGHT);
ui.setFrameAnimation(SLIDE_LEFT);
ui.setFrames(frames, FRAMES_SIZE);
ui.setTimePerFrame(6000);
ip = WiFi.softAPIP().toString();
Serial.printf("\nAp Started .. Please Connect %s hotspot\n", buff);
ip = WiFi.localIP().toString();
Serial.print("Camera Ready! Use 'http://");
Serial.print(ip);
Serial.println("' to connect");
}
void loop() {
if (ui.update()) {
button1.tick();
}
} Here is the code I use.... And this error gives Arduino IDE:
sketch\esp32-camera-series_Test1.ino.cpp.o:(.literal._Z5setupv+0x64): undefined reference to `startCameraServer()'
sketch\esp32-camera-series_Test1.ino.cpp.o: In function `setup()':
C:\Users\Slava\Documents\Arduino\esp32-camera-series_Test1/esp32-camera-series_Test1.ino:341: undefined reference to `startCameraServer()'
collect2.exe: error: ld returned 1 exit status
Несколько библиотек найдено для "WiFi.h" Используется: C:\Users\Slava\Documents\ArduinoData\packages\esp32\hardware\esp32\1.0.2\libraries\WiFi Не используется: C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.21.0_x86__mdqgnx93n4wtt\libraries\WiFi exit status 1 Ошибка компиляции для платы ESP32 Wrover Module.
Hello, I am having the same problem as on this thread:
https://github.com/lewisxhe/esp32-camera-series/issues/4
I cannot locate the file: esp32-camera-bme280-master
how to access the picture you are showing? : here are my error messages : Arduino: 1.8.13 (Windows 7), Board: "ESP32 Dev Module, Disabled, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), 240MHz (WiFi/BT), QIO, 80MHz, 4MB (32Mb), 921600, None"
sketch\sketch_aug11b.ino.cpp.o:(.literal._Z5setupv+0x38): undefined reference to `startCameraServer()'
sketch\sketch_aug11b.ino.cpp.o: In function `setup()':
C:\Users\PC bureau Gilles\Documents\Arduino\sketch_aug11b/sketch_aug11b.ino:136: undefined reference to `startCameraServer()'
collect2.exe: error: ld returned 1 exit status
Multiple libraries were found for "WiFi.h"
Used: C:\Users\PC bureau Gilles\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\libraries\WiFi
Not used: C:\Program Files (x86)\Arduino\libraries\WiFi
exit status 1
Error compiling for board ESP32 Dev Module.
Thank you for all help!
This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.
Hi, i did all the points, described in the wiki: Installation of the libraries and commented out the sensor.h in Adafruit_BME280.h. Unfortunatelly i get the following error while compiling:
sketch/esp32-camera-bme280.ino.cpp.o:(.literal._Z5setupv+0x6c): undefined reference to `startCameraServer()'
sketch/esp32-camera-bme280.ino.cpp.o: In function
setup()': /home/dragon/Arduino/Sketchbook/esp32-camera-bme280-master/esp32-camera-bme280/esp32-camera-bme280.ino:291: undefined reference to
startCameraServer()' collect2: error: ld returned 1 exit status exit status 1 Fehler beim Kompilieren für das Board ESP32 Wrover Module.I tried to compile with the" ESP32 Wrover Module" and with "TTGO LoRa32-OLED V1" -Boards and got always the same error. Could you help me please. Thanks a lot