oscarangustin
发表于 2019-7-22 05:59
请问大佬,如果要用的传感器没有库那应该怎么写呢,谢谢大佬
奈何col
发表于 2019-7-22 20:23
oscarangustin 发表于 2019-7-22 05:59
请问大佬,如果要用的传感器没有库那应该怎么写呢,谢谢大佬
这。。。从何说起。。。先清楚驱动原理,再说。。。
lukedog
发表于 2019-8-26 06:11
本帖最后由 lukedog 于 2019-8-26 06:20 编辑
弄了好几天了,不知道什么原因,编译不成功
Arduino:1.8.9 (Windows 7), 开发板:"Generic ESP8266 Module, 80 MHz, Flash, Disabled, All SSL ciphers (most compatible), ck, 40 MHz, 40MHz, DOUT (compatible), 512K (no SPIFFS), 2, nonos-sdk 2.2.1 (legacy), v2 Lower Memory, Disabled, None, Only Sketch, 115200"
In file included from C:\Users\Administrator\Documents\Arduino\libraries\DHT-sensor-library-master\DHT_U.cpp:15:0:
C:\Users\Administrator\Documents\Arduino\libraries\DHT-sensor-library-master\DHT_U.h:36:29: fatal error: Adafruit_Sensor.h: No such file or directory
#include <Adafruit_Sensor.h>
^
compilation terminated.
exit status 1
为开发板 Generic ESP8266 Module 编译时出错。
在文件 -> 首选项开启
“编译过程中显示详细输出”选项
这份报告会包含更多信息。
lukedog
发表于 2019-8-26 10:51
编译成功,但是又有新问题 Failed to read from DHT sensor!
coloz
发表于 2019-8-26 12:10
lukedog 发表于 2019-8-26 10:51
编译成功,但是又有新问题 Failed to read from DHT sensor!
没有插好对应的DHT传感器,或者你的传感器坏了
奈何col
发表于 2019-10-22 17:35
测试
stephan
发表于 2019-12-11 17:02
Arduino:1.8.10 (Windows 10), 开发板:"Arduino Yún"
In file included from D:\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerApi.h:83:0,
from D:\Arduino\libraries\blinker-library-master\src/BlinkerSerialESPMQTT.h:5,
from D:\Arduino\libraries\blinker-library-master\src/Blinker.h:46,
from G:\毕设资料\demo\WiFi\dht11\dht11.ino:3:
D:\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerProtocol.h: In member function 'char* BlinkerProtocol::dataParse()':
D:\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerProtocol.h:234:86: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
char* dataParse() { if (canParse) return conn->lastRead(); else return ""; }
^~
In file included from D:\Arduino\libraries\blinker-library-master\src/BlinkerSerialESPMQTT.h:5:0,
from D:\Arduino\libraries\blinker-library-master\src/Blinker.h:46,
from G:\毕设资料\demo\WiFi\dht11\dht11.ino:3:
D:\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerApi.h: At global scope:
D:\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerApi.h:775:97: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
BlinkerWidgets_string _BUILTIN_SWITCH = BlinkerWidgets_string(BLINKER_CMD_BUILTIN_SWITCH);
^
D:\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerApi.h: In member function 'char* BlinkerApi::widgetName_str(uint8_t)':
D:\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerApi.h:6994:17: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
else return "";
^~
D:\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerApi.h: In member function 'char* BlinkerApi::widgetName_rgb(uint8_t)':
D:\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerApi.h:7008:17: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
else return "";
^~
D:\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerApi.h: In member function 'char* BlinkerApi::widgetName_int(uint8_t)':
D:\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerApi.h:7014:17: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
else return "";
^~
D:\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerApi.h: In member function 'char* BlinkerApi::widgetName_tab(uint8_t)':
D:\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerApi.h:7020:17: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
else return "";
^~
In file included from D:\Arduino\libraries\blinker-library-master\src/Blinker.h:46:0,
from G:\毕设资料\demo\WiFi\dht11\dht11.ino:3:
D:\Arduino\libraries\blinker-library-master\src/BlinkerSerialESPMQTT.h: At global scope:
D:\Arduino\libraries\blinker-library-master\src/BlinkerSerialESPMQTT.h:147:27: error: cannot declare field 'BlinkerSerialESPMQTT::Transp' to be of abstract type 'BlinkerSerialMQTT'
BlinkerSerialMQTT Transp;
^~~~~~
In file included from D:\Arduino\libraries\blinker-library-master\src/BlinkerSerialESPMQTT.h:4:0,
from D:\Arduino\libraries\blinker-library-master\src/Blinker.h:46,
from G:\毕设资料\demo\WiFi\dht11\dht11.ino:3:
D:\Arduino\libraries\blinker-library-master\src/Adapters/BlinkerSerialMQTT.h:26:7: note: because the following virtual functions are pure within 'BlinkerSerialMQTT':
class BlinkerSerialMQTT : public BlinkerStream
^~~~~~~~~~~~~~~~~
In file included from D:\Arduino\libraries\blinker-library-master\src/Adapters/BlinkerSerialMQTT.h:13:0,
from D:\Arduino\libraries\blinker-library-master\src/BlinkerSerialESPMQTT.h:4,
from D:\Arduino\libraries\blinker-library-master\src/Blinker.h:46,
from G:\毕设资料\demo\WiFi\dht11\dht11.ino:3:
d:\arduino\libraries\blinker-library-master\src\blinker\blinkerstream.h:42:29: note: virtual int BlinkerStream::duerPrint(const String&, bool)
virtual int duerPrint(const String & data, bool report = false) = 0;
^~~~~~~~~
G:\毕设资料\demo\WiFi\dht11\dht11.ino:10:26: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
G:\毕设资料\demo\WiFi\dht11\dht11.ino:11:26: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
dht11:14:17: error: 'D7' was not declared in this scope
G:\毕设资料\demo\WiFi\dht11\dht11.ino:19:9: note: in expansion of macro 'DHTPIN'
G:\毕设资料\demo\WiFi\dht11\dht11.ino:14:17: note: suggested alternative: 'A7'
G:\毕设资料\demo\WiFi\dht11\dht11.ino:19:9: note: in expansion of macro 'DHTPIN'
"SoftwareSerial.h" 对应多个库
已使用: D:\Arduino\hardware\arduino\avr\libraries\SoftwareSerial
"DHT.h" 对应多个库
已使用: D:\Arduino\libraries\DHT-sensor-library-master
"Blinker.h" 对应多个库
已使用: D:\Arduino\libraries\blinker-library-master
exit status 1
'D7' was not declared in this scope
在文件 -> 首选项开启
“编译过程中显示详细输出”选项
这份报告会包含更多信息。
这是怎么回事?
奈何col
发表于 2019-12-12 01:08
stephan 发表于 2019-12-11 17:02
Arduino:1.8.10 (Windows 10), 开发板:"Arduino Yún"
In file included from D:\Arduino\libraries\blin ...
你选的板子是arduino yun,但实际上并不是吧。
stephan
发表于 2019-12-13 09:04
奈何col 发表于 2019-12-12 01:08
你选的板子是arduino yun,但实际上并不是吧。
是的,选错了,已解决,谢谢
Swaggylin1998
发表于 2020-2-18 20:40
BLINKER_LOG("Humidity: ", h, " %");
BLINKER_LOG("Temperature: ", t, " *C");
是干嘛的啊
页:
1
2
3
4
[5]
6
7
8
9
10
11
12
13
14