michaelruck / ESP32_phone_camera_remote_shutter

Triggers the shutter of a smartphone cam via bluetooth
GNU Lesser General Public License v3.0
43 stars 7 forks source link

Build Error #2

Open djircik1 opened 1 year ago

djircik1 commented 1 year ago

Trying to load code as Arduino Sketch (ide 2.0.3) getting the following error. I used legacy ide 1.8.19 as well with same error. Please advise. Thanks in advance

C:\Users\The Remington\AppData\Local\Temp.arduinoIDE-unsaved202317-8436-109ge7c.xnwa\sketch_feb7c\sketch_feb7c.ino: In function 'void taskServer(void*)': C:\Users\The Remington\AppData\Local\Temp.arduinoIDE-unsaved202317-8436-109ge7c.xnwa\sketch_feb7c\sketch_feb7c.ino:73:19: error: 'BT_NAME' was not declared in this scope BLEDevice::init(__BT_NAME); ^~~~~ C:\Users\The Remington\AppData\Local\Temp.arduinoIDE-unsaved202317-8436-109ge7c.xnwa\sketch_feb7c\sketch_feb7c.ino:83:22: error: 'MANUFACTURER' was not declared in this scope std::string name = MANUFACTURER; ^~~~~~ C:\Users\The Remington\AppData\Local\Temp.arduinoIDE-unsaved202317-8436-109ge7c.xnwa\sketch_feb7c\sketch_feb7c.ino: In function 'void setup()': C:\Users\The Remington\AppData\Local\Temp.arduinoIDE-unsaved202317-8436-109ge7c.xnwa\sketch_feb7c\sketch_feb7c.ino:147:11: error: 'BUTTONPIN' was not declared in this scope pinMode(BUTTONPIN, INPUT); ^~~ C:\Users\The Remington\AppData\Local\Temp.arduinoIDE-unsaved202317-8436-109ge7c.xnwa\sketch_feb7c\sketch_feb7c.ino: In function 'void loop()': C:\Users\The Remington\AppData\Local\Temp.arduinoIDE-unsaved202317-8436-109ge7c.xnwa\sketch_feb7c\sketch_feb7c.ino:165:32: error: 'SEND_KEY' was not declared in this scope uint8_t msg[] = {0x0, 0x0, SEND_KEY, 0x0, 0x0, 0x0, 0x0, 0x0}; ^~~~~~ In file included from C:\Users\The Remington\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.6\cores\esp32/esp32-hal-gpio.h:29, from C:\Users\The Remington\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.6\cores\esp32/esp32-hal.h:79, from C:\Users\The Remington\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.6\cores\esp32/Arduino.h:36, from C:\Users\The Remington\AppData\Local\Temp\arduino-sketch-ECD931E4A7E7BDA0881F99B0C6D4F259\sketch\sketch_feb7c.ino.cpp:1: C:\Users\The Remington\AppData\Local\Temp.arduinoIDE-unsaved202317-8436-109ge7c.xnwa\sketch_feb7c\sketch_feb7c.ino:176:43: error: 'BUTTONPIN' was not declared in this scope attachInterrupt(digitalPinToInterrupt(__BUTTONPIN), pushButton, FALLING); ^~~ C:\Users\The Remington\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.6\variants\esp32da/pins_arduino.h:11:40: note: in definition of macro 'digitalPinToInterrupt'

define digitalPinToInterrupt(p) (((p)<40)?(p):-1)

                                    ^

C:\Users\The Remington\AppData\Local\Temp.arduinoIDE-unsaved202317-8436-109ge7c.xnwa\sketch_feb7c\sketch_feb7c.ino: In function 'void pushButton()': C:\Users\The Remington\AppData\Local\Temp.arduinoIDE-unsaved202317-8436-109ge7c.xnwa\sketch_feb7c\sketch_feb7c.ino:182:41: error: 'BUTTONPIN' was not declared in this scope detachInterrupt(digitalPinToInterrupt(BUTTONPIN)); ^~~ C:\Users\The Remington\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.6\variants\esp32da/pins_arduino.h:11:40: note: in definition of macro 'digitalPinToInterrupt'

define digitalPinToInterrupt(p) (((p)<40)?(p):-1)

                                    ^

C:\Users\The Remington\AppData\Local\Temp.arduinoIDE-unsaved202317-8436-109ge7c.xnwa\sketch_feb7c\sketch_feb7c.ino:183:11: error: expected primary-expression at end of input btnFlag = ^ C:\Users\The Remington\AppData\Local\Temp.arduinoIDE-unsaved202317-8436-109ge7c.xnwa\sketch_feb7c\sketch_feb7c.ino:183:11: error: expected '}' at end of input C:\Users\The Remington\AppData\Local\Temp.arduinoIDE-unsaved202317-8436-109ge7c.xnwa\sketch_feb7c\sketch_feb7c.ino:181:29: note: to match this '{' IRAM_ATTR void pushButton() { ^

exit status 1

Compilation error: '__BT_NAME' was not declared in this scope

djircik1 commented 1 year ago

SOLVED my mistake. WORKS GREAT Thanks