gonium / esp8266-dht22-sensor

MIT License
131 stars 24 forks source link

espressif platform depreciated #4

Open haldi4803 opened 5 years ago

haldi4803 commented 5 years ago

Hi,

I tried this nowadays with Windows 10.... VSC and Platformio installation worked fine. Manually downloading the Code from Github ignores the "DHT-sensor library" in lib folder so you have to extra download and copy that one. Same goes for Adafruit_Sensor.h which seems to be missing.

After that when you use "Platformio run" you get the message that platform=espressif doesn't exist anymore, so change that to espressif8266.

After that i get some errors: `Compiling .pio\build\esp01\lib8ee\ESP8266WiFi\ESP8266WiFiScan.cpp.o lib\DHT-sensor-library\DHT.cpp: In member function 'bool DHT::read(bool)': lib\DHT-sensor-library\DHT.cpp:29:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]

define TIMEOUT -1 /*< timeout on /

              ^

lib\DHT-sensor-library\DHT.cpp:282:29: note: in expansion of macro 'TIMEOUT' if (expectPulse(LOW) == TIMEOUT) { ^ lib\DHT-sensor-library\DHT.cpp:29:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]

define TIMEOUT -1 /*< timeout on /

              ^

lib\DHT-sensor-library\DHT.cpp:287:30: note: in expansion of macro 'TIMEOUT' if (expectPulse(HIGH) == TIMEOUT) { ^ lib\DHT-sensor-library\DHT.cpp:29:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]

define TIMEOUT -1 /*< timeout on /

              ^

lib\DHT-sensor-library\DHT.cpp:312:23: note: in expansion of macro 'TIMEOUT' if ((lowCycles == TIMEOUT) || (highCycles == TIMEOUT)) { ^ lib\DHT-sensor-library\DHT.cpp:29:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]

define TIMEOUT -1 /*< timeout on /

              ^

lib\DHT-sensor-library\DHT.cpp:312:50: note: in expansion of macro 'TIMEOUT' if ((lowCycles == TIMEOUT) || (highCycles == TIMEOUT)) { ^ Compiling .pio\build\esp01\lib8ee\ESP8266WiFi\WiFiClient.cpp.o` Full output: https://pastebin.com/qe42bqLV

When i try to connect the Serial Monitor i only get gibberish:

`> Executing task in folder esp8266-dht22-sensor-master: C:\Users\Haldi.platformio\penv\Scripts\platformio.exe device monitor <

--- Miniterm on COM5 9600,8,N,1 --- --- Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H --- 0�~?�4�Ҷ␖��␔O'�␎�� --- Baudrate: 74880

--- Settings: COM5 74880,8,N,1 --- RTS: active DTR: active BREAK: inactive --- CTS: inactive DSR: inactive RI: inactive CD: inactive --- software flow control: inactive --- hardware flow control: inactive --- serial input encoding: UTF-8 --- serial output encoding: UTF-8 --- EOL: CRLF --- filters: default ` Or more like it only outputs a tiny speck right after flashing and nothing more. I did something wrong yes?

P.S using Baud 74880 directl after rebooting the device i get:

ets Jan 8 2013,rst cause:2, boot mode:(3,6)

load 0x4010f000, len 1384, room 16 tail 8 chksum 0xef csum 0xef csum err ets_main.c