本帖最后由 是碎珩啊 于 2022-7-15 15:08 编辑
代码:
- /* *****************************************************************
- 神牛马氛围灯
- * *****************************************************************/
- #define BLINKER_PRINT Serial
- #define BLINKER_WIFI
- #include <Blinker.h>
- char auth[] = "c7317040da90";
- char ssid[] = "Tenda_918F10";
- char pswd[] = "156756DMC";
- //char ssid[] = "OPPO";
- //char pswd[] = "12345678";
- BlinkerSlider SliderR("red");
- BlinkerSlider SliderG("green");
- BlinkerSlider SliderB("blue");
- int pinr = 8;
- int ping = 9;
- int pinb = 10;
- void sliderR_callback(int value)
- {
- Serial.println("r被运行");
- Serial.println(value);//for(i=1; i<=100; i++)
- analogWrite(pinr, value);
- }
- void sliderG_callback(int value)
- {
- Serial.println("g被运行");
- Serial.println(value);//for(i=1; i<=100; i++)
- analogWrite(ping, value);
- }
- void sliderB_callback(int value)
- {
- Serial.println("b被运行");
- Serial.println(value);//for(i=1; i<=100; i++)
- analogWrite(pinb, value);
- }
- //初始化
- void setup()
- {
- Serial.begin(115200);
- pinMode(pinr, OUTPUT);
- //pinMode(p0ing, OUTPUT);
- //pinMode(pinb, OUTPUT);
- Blinker.begin(auth, ssid, pswd);
- BLINKER_DEBUG.stream(BLINKER_PRINT);
- BLINKER_DEBUG.debugAll();
- SliderR.attach(sliderR_callback);
- SliderG.attach(sliderG_callback);
- SliderB.attach(sliderB_callback);
- }
- void loop()
- {
- Blinker.run();
- }
复制代码 报错日志- ets Jan 8 2013,rst cause:4, boot mode:(3,6)
- wdt reset
- load 0x4010f000, len 3460, room 16
- tail 4
- chksum 0xcc
- load 0x3fff20b8, len 40, room 4
- tail 4
- chksum 0xc9
- csum 0xc9
- v00083880
- ~ld
复制代码 |