firebeetle报错Index error
2023-11-10 06:31
有知道怎么获取蓝牙RSSI的吗,用的是FireBeetle-ESP32,开发环境是Arduino IDE
2017-10-22 10:43
您好,我的程序可以针对通用 esp8266 和 NodeMCU 进行编译和运行。 但是使用 FireBeetle 板编译 Wroom 32 失败并出现未使用的错误。 并且使用了变量! Arduino IDE 刚刚安装。这是最新版本!
2023-05-17 07:32
找到。 将WiFi Bee SEP模块切换到UART口,插入Sbee USB转接板与电脑连接。在Arduino IDE中选择FireBeetle-ESP8266(FireBeetle
2023-05-22 07:16
各位大神,最近突然想起这个有点古怪的问题,ESP32属不属于RISC-V 的单片机呢?
2023-06-21 20:40
是完成正常的。下面是我的电路图CH340B 在背面, RX/TX 有一个过孔连接到 ESP32上:作为对比,我进行如下实验1.使用DFRobot 的 FireBeetle, 它用的是 CH340C
2022-07-07 06:44
想用(D7)中间继电器控制加热设备,(A0)输入,板(D9)led,板(D4)button程序/*! * * * */// 动态变量#define button1 D4//触摸按键接口定义IO27/D4#define LED_DT D9 // Arduino输出控制信号引脚IO2/D9#define OUT_PWM D7// Arduino输出控制信号引脚IO13/D7#define IN_0 A0 // Arduino输入控制信号引脚IO36/A0#define KEYA_SPEED150//长按的时间长度(单位10mS) 总共1s 100#define KEYA_SPEED2 10 //双击的时间长度(单位20mS) 200ms双击间隔volatile uint8_t b;//长按判断标志位volatile uint8_t openState=1;//灯效模式,默认关灯。单击openState = 0;双击openState = 1;长按openState = 2;volatile bool a=0,c=0,s=0; //刚刚结束滑动标志uint64_t chipid;unsigned long startProducing, endProducing; volatile floatmind_n_key1, mind_n_all, mind_n_oninall;// 函数声明void buttonACallback();void DF_C();void DF_B();void DF_onoff(uint16_tmind_n_on, uint16_tmind_n_off, uint8_tmind_n_key);void DF_A();void button_State(){ //Aif(!(digitalRead(button1))){ //检测按键是否按下delay(20); //延时去抖动if(!(digitalRead(button1))){//判断长短键while((!(digitalRead(button1)))&&(c=KEYA_SPEED1){ //长键处理循环100次为长按1s //长按后执行的程序放到此处 openState = 2; Serial.println("A键长按 \r\n"); while(!(digitalRead(button1)));//等待按键松开}else{ //单击处理按键A松开后 if(a==0){for(b=0;b>32));//print High 2 bytesSerial.printf("%08X\n",(uint32_t)chipid);//print Low 4bytes. //Serial.printf("total heap size = %u\n",ESP.getHeapSize());Serial.printf("available heap = %u\n",ESP.getFreeHeap());//Serial.printf("lowest level of free heap since boot = %u\n",ESP.getMinFreeHeap());//Serial.printf("largest block of heap that can be allocated at once = %u\n",ESP.getMaxAllocHeap());//Serial.printf("total Psram size = %u\n",ESP.getPsramSize());//Serial.printf("available Psram = %u\n",ESP.getFreePsram());//Serial.printf("lowest level of free Psram since boot = %u\n",ESP.getMinFreePsram());//Serial.printf("largest block of Psram that can be allocated at once = %u\n",ESP.getMinFreePsram());Serial.printf("get Chip Revision = %u\n",ESP.getChipRevision());// uint8_t getChipRevision() 返回芯片版本号;Serial.printf("getCpuFreqMHz = %u\n",ESP.getCpuFreqMHz());// uint8_t getCpuFreqMHz() 返回芯片时钟频率;Serial.printf("get Cycle Count = %u\n",ESP.getCycleCount());// uint32_t getCycleCount() 返回自上电以来经过的时钟周期数(不太确定);Serial.printf("get SdkVersion = %s\n",ESP.getSdkVersion());//const char * getSdkVersion() 返回SDK版本号;xTaskCreate(DF_A, /* Task function. */"DF_A",/* String with name of task. */20000, /* Stack size in words. */NULL,/* Parameter passed as input of the task */2,/* Priority of the task. */NULL); xTaskCreate(buttonACallback, /* Task function. */"buttonA",/* String with name of task. */10000, /* Stack size in words. */NULL,/* Parameter passed as input of the task */3,/* Priority of the task. */NULL);}void loop() {delay(3000);// Serial.print("Main Loop: Executing on core ");//Serial.println(xPortGetCoreID());//Serial.print("button1:");// Serial.println((digitalRead(button1)));// Serial.print("LED_DT:");// Serial.println((digitalRead(LED_DT)));//digitalWrite(LED_DT, HIGH);// turn the LED on (HIGH is the voltage level)//delay(1000);// wait for a second//digitalWrite(LED_DT, LOW); // turn the LED off by making the voltage LOWdigitalWrite(LED_DT, 1 ^ digitalRead(LED_DT)); //翻转 输出电平}// 自定义函数void DF_C(void * parameter) { Serial.print("Created task DF_c: Executing on core "); Serial.println(xPortGetCoreID());while (!(mind_n_key10)) {digitalWrite(OUT_PWM, LOW);delay(6);mind_n_off -= 1;if (!(mind_n_key==mind_n_key1)) {mind_n_off = 1;mind_n_on = 1; } }}}void DF_A(void * parameter) {uint8_tmind_n_As1 = 24;uint8_tmind_n_Asn = 80;Serial.print("Created task DF_A: Executing on core "); Serial.println(xPortGetCoreID());startProducing = millis();//开始时间//Serial.printf("DF_A start Cycle Count = %u\n",ESP.getCycleCount());// uint32_t getCycleCount() 返回自上电以来经过的时钟周期数(不太确定);//Serial.println("");// Serial.printf(" millis %u start \n",startProducing );//while (!(mind_n_As1==0)) { DF_onoff(1023, 1023, 0);//Serial.printf("DF_A start Cycle Count = %u\n",ESP.getCycleCount());// uint32_t getCycleCount() 返回自上电以来经过的时钟周期数(不太确定);//Serial.println("");// Serial.printf(" millis: %u\n",(millis()-startProducing ));////Serial.println(""); if ((mind_n_key1==0)) {mind_n_As1 -= 1; } else {mind_n_As1 = 1;mind_n_Asn = 1; }// Serial.printf(" mind_n_As1: %u\n",mind_n_As1);////Serial.println("");}Serial.printf("DF_A 50% start Count = %u\n",ESP.getCycleCount());// uint32_t getCycleCount() 返回自上电以来经过的时钟周期数(不太确定);Serial.println(""); while (!(mind_n_Asn==0)) { DF_onoff(490, 1023, 0); if ((mind_n_key1==0)) {mind_n_Asn -= 1; } else {mind_n_As1 = 0;mind_n_Asn = 1; }}// Serial.printf("DF_A end Count = %u\n",ESP.getCycleCount());// uint32_t getCycleCount() 返回自上电以来经过的时钟周期数(不太确定);//Serial.println(""); endProducing = millis();//结束时间Serial.print("Producing time all时间(ms): ");Serial.println(( endProducing - startProducing));//写入耗费时间(ms)if ((mind_n_key1==0)) { mind_n_key1 = 2;}if ((mind_n_key1==1)) {xTaskCreate(DF_B,"DF_B",/* String with name of task. */10000, /* Stack size in words. */NULL,/* Parameter passed as input of the task */2,/* Priority of the task. */NULL); }if ((mind_n_key1==2)) {xTaskCreate(DF_C,"DF_C",/* String with name of task. */10000, /* Stack size in words. */NULL,/* Parameter passed as input of the task */2,/* Priority of the task. */NULL); } Serial.println("删除DF_A"); vTaskDelete( NULL );//任务的删除}// 事件回调函数void buttonACallback(void * parameter) {Serial.print("Created task buttonA: Executing on core "); Serial.println(xPortGetCoreID());while(1){button_State();if ((openState==0)) {mind_n_key1 += 1;openState=1;if ((mind_n_key1>2)) { mind_n_key1 = 0;}}delay(150);}}上传项目使用了 217095 字节,占用了 (10%) 程序存储空间。最大为 2097152 字节。全局变量使用了24332字节,(8%)的动态内存,余留270580字节局部变量。最大为294912字节。esptool.py v2.0-devConnecting...Uploading stub...Running stub...Stub running...Attaching SPI flash...Configuring flash size...Compressed 8752 bytes to 5467...Writing at 0x00001000... (100 %) Wrote 8752 bytes (5467 compressed) at 0x00001000 in 0.5 seconds (effective 143.5 kbit/s)...Hash of data verified.Compressed 3072 bytes to 105...Writing at 0x00008000... (100 %) Wrote 3072 bytes (105 compressed) at 0x00008000 in 0.0 seconds (effective 1293.5 kbit/s)...Hash of data verified.Compressed 8192 bytes to 47...Writing at 0x0000e000... (100 %) Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.0 seconds (effective 4096.0 kbit/s)...Hash of data verified.Compressed 305168 bytes to 133261...Writing at 0x00010000... (11 %) Writing at 0x00014000... (22 %) Writing at 0x00018000... (33 %) Writing at 0x0001c000... (44 %) Writing at 0x00020000... (55 %) Writing at 0x00024000... (66 %) Writing at 0x00028000... (77 %) Writing at 0x0002c000... (88 %) Writing at 0x00030000... (100 %) Wrote 305168 bytes (133261 compressed) at 0x00010000 in 11.7 seconds (effective 208.6 kbit/s)...Hash of data verified.Leaving...Hard resetting...com信息15:00:53.390 -> load?ets Jul 29 2019 12:21:4615:00:53.390 -> 15:00:53.390 -> rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)15:00:53.390 -> configsip: 0, SPIWP:0x0015:00:53.390 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x0015:00:53.390 -> mode:DIO, clock div:215:00:53.390 -> load:0x3fff0008,len:815:00:53.390 -> load:0x3fff0010,len:176015:00:53.390 -> load:0x40078000,len:666815:00:53.390 -> load:0x40080000,len:25215:00:53.390 -> entry 0x4008003415:00:53.590 -> 15:00:54.590 -> Setup: Executing on core 115:00:54.590 -> ESP32 Chip ID = 944D8CBE5BC415:00:54.590 -> available heap = 21970015:00:54.590 -> get Chip Revision = 115:00:54.590 -> getCpuFreqMHz = 24015:00:54.590 -> get Cycle Count = 25453711415:00:54.630 -> get SdkVersion = v2.0-rc1-803-g1e0710f115:00:54.630 -> Created task buttonA: Executing on core 115:00:54.630 -> Created task DF_A: Executing on core Main Loop: Executing on core 015:00:54.630 -> DF_A start Cycle Count = 25800078315:00:54.630 -> 15:00:54.630 -> 115:01:04.630 -> Main Loop: Executing on core 115:01:14.630 -> Main Loop: Executing on core 115:01:24.620 -> Main Loop: Executing on core 115:01:34.601 -> Main Loop: Executing on core 115:01:44.611 -> Main Loop: Executing on core 115:01:54.618 -> Main Loop: Executing on core 115:02:04.618 -> Main Loop: Executing on core 115:02:14.618 -> Main Loop: Executing on core 115:02:24.618 -> Main Loop: Executing on core 115:02:34.618 -> Main Loop: Executing on core 115:02:44.618 -> Main Loop: Executing on core 115:02:54.608 -> Main Loop: Executing on core 115:03:04.638 -> Main Loop: Executing on core 115:03:14.618 -> Main Loop: Executing on core 115:03:24.618 -> Main Loop: Executing on core 115:03:28.058 -> Guru Meditation Error of type LoadProhibited occurred on core1. Exception was unhandled.15:03:28.058 -> Register dump:15:03:28.058 -> PC: 0x400014fdPS: 0x00060c30A0: 0x800d3fb0A1: 0x3ffcd23015:03:28.098 -> A2: 0xa289a144A3: 0xa289a140A4: 0x000000ffA5: 0x0000ff0015:03:28.098 -> A6: 0x00ff0000A7: 0xff000000A8: 0x00000000A9: 0x3ffc0b7015:03:28.098 -> A10: 0x00000003A11: 0x00060e23A12: 0x00060e20A13: 0x0000ff0015:03:28.098 -> A14: 0x00ff0000A15: 0xff000000SAR: 0x00000012EXCCAUSE: 0x0000001c15:03:28.098 -> EXCVADDR: 0xa289a144LBEG : 0x400014fdLEND : 0x4000150dLCOUNT: 0xffffffff有Guru Meditation Error of type LoadProhibited occurred on core1. Exception was unhandled.错误网上查Guru Meditation 错误LoadProhibited,StoreProhibited(禁止加载,禁止存储)当应用程序尝试读取或写入无效的内存位置时,会发生此 CPU 异常. 写入/读取的地址可在寄存器转储中的 EXCVADDR 寄存器中找到. 如果此地址为零,则通常表示应用程序尝试取消引用 NULL 指针. 如果此地址接近于零,则通常意味着应用程序尝试访问结构的成员,但指向该结构的指针为 NULL. 如果该地址是别的(垃圾值,不在 0x3fxxxxxx - 0x6xxxxxxx 范围内),则可能意味着用于访问数据的指针未初始化或已损坏.更改程序,/*! * * * */// 动态变量#define button1 D4//触摸按键接口定义IO27/D4#define LED_DT D9 // Arduino输出控制信号引脚IO2/D9#define OUT_PWM D7// Arduino输出控制信号引脚IO13/D7#define IN_0 A0 // Arduino输入控制信号引脚IO36/A0#define KEYA_SPEED150//长按的时间长度(单位10mS) 总共1s 100#define KEYA_SPEED2 10 //双击的时间长度(单位20mS) 200ms双击间隔volatile uint8_t b;//长按判断标志位volatile uint8_t openState=1,c=0;//灯效模式,默认关灯。单击openState = 0;双击openState = 1;长按openState = 2;volatile bool a=0,s=0; //刚刚结束滑动标志volatile uint8_t mind_n_As1;//uint64_t chipid;unsigned long startProducing, endProducing; volatile floatmind_n_key1, mind_n_all, mind_n_oninall;// 函数声明void buttonACallback();void DF_C();void DF_B();void DF_onoff(uint16_tmind_n_on, uint16_tmind_n_off, uint8_tmind_n_key);void DF_A();void button_State(){ //Aif(!(digitalRead(button1))){ //检测按键是否按下delay(20); //延时去抖动if(!(digitalRead(button1))){//判断长短键while((!(digitalRead(button1)))&&(c=KEYA_SPEED1){ //长键处理循环100次为长按1s //长按后执行的程序放到此处 openState = 2; Serial.println("A键长按 \r\n"); while(!(digitalRead(button1)));//等待按键松开}else{ //单击处理按键A松开后 if(a==0){for(b=0;b>32));//print High 2 bytesSerial.printf("%08X\n",(uint32_t)chipid);//print Low 4bytes. //Serial.printf("total heap size = %u\n",ESP.getHeapSize());Serial.printf("available heap = %u\n",ESP.getFreeHeap());//Serial.printf("lowest level of free heap since boot = %u\n",ESP.getMinFreeHeap());//Serial.printf("largest block of heap that can be allocated at once = %u\n",ESP.getMaxAllocHeap());//Serial.printf("total Psram size = %u\n",ESP.getPsramSize());//Serial.printf("available Psram = %u\n",ESP.getFreePsram());//Serial.printf("lowest level of free Psram since boot = %u\n",ESP.getMinFreePsram());//Serial.printf("largest block of Psram that can be allocated at once = %u\n",ESP.getMinFreePsram());Serial.printf("get Chip Revision = %u\n",ESP.getChipRevision());// uint8_t getChipRevision() 返回芯片版本号;Serial.printf("getCpuFreqMHz = %u\n",ESP.getCpuFreqMHz());// uint8_t getCpuFreqMHz() 返回芯片时钟频率;Serial.printf("get Cycle Count = %u\n",ESP.getCycleCount());// uint32_t getCycleCount() 返回自上电以来经过的时钟周期数(不太确定);Serial.printf("get SdkVersion = %s\n",ESP.getSdkVersion());//const char * getSdkVersion() 返回SDK版本号;xTaskCreate(DF_A, /* Task function. */"DF_A",/* String with name of task. */20000, /* Stack size in words. */NULL,/* Parameter passed as input of the task */2,/* Priority of the task. */NULL); xTaskCreate(buttonACallback, /* Task function. */"buttonA",/* String with name of task. */10000, /* Stack size in words. */NULL,/* Parameter passed as input of the task */3,/* Priority of the task. */NULL);}void loop() {delay(800);// Serial.print("Main Loop: Executing on core ");//Serial.println(xPortGetCoreID());//Serial.print("button1:");// Serial.println((digitalRead(button1)));// Serial.print("LED_DT:");// Serial.println((digitalRead(LED_DT)));//digitalWrite(LED_DT, HIGH);// turn the LED on (HIGH is the voltage level)//delay(1000);// wait for a second//digitalWrite(LED_DT, LOW); // turn the LED off by making the voltage LOWdigitalWrite(LED_DT, 1 ^ digitalRead(LED_DT)); //翻转 输出电平}// 自定义函数void del_DF(const char*DFName) { pdTASK_CODE pvTask1;Serial.print("进入del_DF删除DF_ 程序:"); Serial.println(DFName); if ((mind_n_key1==0)) {xTaskCreate(DF_A,"DF_A",/* String with name of task. */20000, /* Stack size in words. */NULL,/* Parameter passed as input of the task */2,/* Priority of the task. */NULL); vTaskDelete( NULL );//任务的删除}if ((mind_n_key1==1)) {xTaskCreate(DF_B,"DF_B",/* String with name of task. */10000, /* Stack size in words. */NULL,/* Parameter passed as input of the task */2,/* Priority of the task. */NULL);vTaskDelete( NULL );//任务的删除}if ((mind_n_key1==2)) {xTaskCreate(DF_C,"DF_C",/* String with name of task. */10000, /* Stack size in words. */NULL,/* Parameter passed as input of the task */2,/* Priority of the task. */NULL); vTaskDelete( NULL );//任务的删除} delay(60);Serial.print("删除DF_ "); Serial.println(DFName); }void DF_C(void * parameter) { Serial.print("Created task DF_c: Executing on core "); Serial.println(xPortGetCoreID());while (!(mind_n_key15, 1023, 1);}if ((mind_n_key1==0)) {xTaskCreate(DF_A,"DF_A",/* String with name of task. */20000, /* Stack size in words. */NULL,/* Parameter passed as input of the task */2,/* Priority of the task. */NULL); }if ((mind_n_key1==2)) {xTaskCreate(DF_C,"DF_C",/* String with name of task. */10000, /* Stack size in words. */NULL,/* Parameter passed as input of the task */2,/* Priority of the task. */NULL); } Serial.println("删除DF_b"); vTaskDelete( NULL );//任务的删除}void DF_onoff(uint16_tmind_n_on, uint16_tmind_n_off, uint8_tmind_n_key) {Serial.printf("DF_onoff Cycle Countmind_n_on:%d, uint16_tmind_n_off:%d, uint8_tmind_n_key:%d\n",mind_n_on,mind_n_off, mind_n_key);// while ((mind_n_off>0)) { while ((mind_n_on>0)) {digitalWrite(OUT_PWM, HIGH);delay(6);mind_n_off -= 1;mind_n_on -= 1;if (!(mind_n_key==mind_n_key1)) {mind_n_off = 0;mind_n_on = 0; } } if ((mind_n_off>0)) {digitalWrite(OUT_PWM, LOW);delay(6);mind_n_off -= 1;if (!(mind_n_key==mind_n_key1)) {mind_n_off = 0;mind_n_on = 0; } }}}void DF_A(void * parameter) {uint8_tmind_n_Asn = 80;mind_n_As1 = 25;Serial.print("Created task DF_A: Executing on core "); Serial.println(xPortGetCoreID());startProducing = millis();//开始时间//Serial.printf("DF_A start Cycle Count = %u\n",ESP.getCycleCount());// uint32_t getCycleCount() 返回自上电以来经过的时钟周期数(不太确定);//Serial.println("");// Serial.printf(" millis %u start \n",startProducing );//while (mind_n_As1>1) { DF_onoff(1023, 1023, 0);//Serial.printf("DF_A start Cycle Count = %u\n",ESP.getCycleCount());// uint32_t getCycleCount() 返回自上电以来经过的时钟周期数(不太确定);//Serial.println("");// Serial.printf(" millis: %u\n",(millis()-startProducing ));////Serial.println(""); if ((mind_n_key1==0)) {//if (mind_n_As1 ==1) Serial.printf(" mind_n_As1: %u\n",mind_n_As1);//mind_n_As1 -= 1;//if (mind_n_As1 ==0) Serial.printf(" mind_n_As1: %u\n",mind_n_As1);// } else {del_DF("A");mind_n_As1 = 1;mind_n_Asn = 0; }//if (mind_n_As1 ==0) {Serial.printf(" goto mind_n_Aslabel: %u\n",mind_n_As1);//// goto mind_n_Aslabel;// }// Serial.printf(" mind_n_As1: %u\n",mind_n_As1);////Serial.println("");}mind_n_Aslabel:Serial.printf("DF_A 50% start Count = %u\n",ESP.getCycleCount());// uint32_t getCycleCount() 返回自上电以来经过的时钟周期数(不太确定);Serial.println(""); Serial.print("DF_A to 50% start Producing time 时间(ms): ");Serial.println(( millis() - startProducing));//写入耗费时间(ms)while (!(mind_n_Asn==0)) { DF_onoff(490, 1023, 0); if ((mind_n_key1==0)) {mind_n_Asn -= 1; } else {del_DF("A");//mind_n_As1 = 0;//mind_n_Asn = 0; }}// Serial.printf("DF_A end Count = %u\n",ESP.getCycleCount());// uint32_t getCycleCount() 返回自上电以来经过的时钟周期数(不太确定);//Serial.println(""); endProducing = millis();//结束时间Serial.print("Producing time all时间(ms): ");Serial.println(( endProducing - startProducing));//写入耗费时间(ms)if ((mind_n_key1==0)) { mind_n_key1 = 2;}if ((mind_n_key1==1)) {xTaskCreate(DF_B,"DF_B",/* String with name of task. */10000, /* Stack size in words. */NULL,/* Parameter passed as input of the task */2,/* Priority of the task. */NULL); }if ((mind_n_key1==2)) {xTaskCreate(DF_C,"DF_C",/* String with name of task. */10000, /* Stack size in words. */NULL,/* Parameter passed as input of the task */2,/* Priority of the task. */NULL); } Serial.println("删除DF_A"); vTaskDelete( NULL );//任务的删除}// 事件回调函数void buttonACallback(void * parameter) {Serial.print("Created task buttonA: Executing on core "); Serial.println(xPortGetCoreID());while(1){button_State();if ((openState==0)) {mind_n_key1 ++;openState=1;if ((mind_n_key1>2)) { mind_n_key1 = 0;}}delay(150);}}没有解决DF_A中出错。
2021-09-25 09:29
在准备连网的时候,我只要执行wlan.scan()他就行重启。
2023-07-30 13:24