程序代码:
#include <Blinker.h> //官方库
#define BLINKER_ESP_SMARTCONFIG//智能配网
uint64_t chipid;
int ledPin1 = 14;
int ledPin2 = 15;
int ledPin3 = 16;
char auth[] = "5a04d****";//点灯科技app中获取到的Secret Key(密钥)
char ssid[] = "****";
char pswd[] = "*****";
void setup() {
Serial.begin(115200);
Blinker.begin(auth,ssid,pswd);
pinMode(ledPin1, OUTPUT);
digitalWrite(ledPin1, LOW);
//pinMode(ledPin2, OUTPUT);
// digitalWrite(ledPin2, LOW);
// pinMode(ledPin3, OUTPUT);
// digitalWrite(ledPin3, LOW);
}
void loop() {
digitalWrite(ledPin1, HIGH);
delay(1500);
chipid=ESP.getEfuseMac();//The chip ID is essentially its MAC address(length: 6 bytes).
Serial.printf("ESP32 Chip ID = %04X",(uint16_t)(chipid>>32));//print High 2 bytes
Serial.printf("%08X\n",(uint32_t)chipid);//print Low 4bytes.
digitalWrite(ledPin1, LOW);
delay(1500);
以上的程序代码,执行验证后出现如下提示
C:\Users\Administrator\Documents\Arduino\libraries\blinker-library-master\src\modules\WebSockets\WebSockets.cpp:44:10: fatal error: hwcrypto/sha.h: No such file or directory
#include <hwcrypto/sha.h>
^~~~~~~~~~~~~~~~
compilation terminated.
exit status 1
为开发板 ESP32S2 Dev Module 编译时出错。
|