T-vK / ESP32-BLE-Keyboard

Bluetooth LE Keyboard library for the ESP32 (Arduino IDE compatible)
2.46k stars 411 forks source link

compilation error #310

Closed proinisrael closed 4 months ago

proinisrael commented 4 months ago

while i try to compile my code it is giving me exit status 1

`#include

BleKeyboard bleKeyboard;

void setup() { pinMode(0,INPUT); attachInterrupt(0, shaft, FALLING); pinMode(1,INPUT); pinMode(2,INPUT); attachInterrupt(2, button, FALLING); pinMode(3,INPUT); attachInterrupt(3, prev, FALLING); pinMode(4,INPUT); attachInterrupt(4, next, FALLING); attachInterrupt(5, play, FALLING); Serial.begin(115200); bleKeyboard.begin(); }

void loop() { //insert code here }

void shaft() {

if (digitalRead(1)==1) { Serial.print("VUP"); bleKeyboard.write(KEY_MEDIA_VOLUME_UP); } if (digitalRead(1)==0) { Serial.print("VDN"); bleKeyboard.write(KEY_MEDIA_VOLUME_DOWN); } }

void button() {

Serial.print("BTN"); bleKeyboard.write(KEY_MEDIA_MUTE); }

void prev() {

Serial.print("PREV"); bleKeyboard.write(KEY_MEDIA_PREVIOUS_TRACK); }

void next() {

Serial.print("NEXT"); bleKeyboard.write(KEY_MEDIA_NEXT_TRACK); }

void play() {

Serial.print("PLAY_PAUSE"); bleKeyboard.write(KEY_MEDIA_PLAY_PAUSE); }`

this is my code, and i try to compile it for the ESP32-C3 dev board when it cant compile. i tried to compile it for the S2, S3, C6, and the original ESP32, and every time it couldn't compile, this is the console text after the compilation

new 1.txt

proinisrael commented 4 months ago

worked when i downgraded the esp32 board manager to 2.0.17