Hi, I'm exasperated,
I literally browsed every site in this beautiful world to get a DHT22 to work on my Attiny85.
I really tried everything.
The problem is that I have tried to use SimpleDHT.h and when I read the values are all 0, but it does not say that the module is not working. The link (which can be changed) is DHT pin data -> pin 0 of the attiny85. I heard it might be clock problems, but currently attiny85 is running at 8mhz. The DHT22 module works on a normal arduino.
Code example I tried:
I think a PIN 0 does not exist (DHT22(0)). So, depending on where the data pin of the DHT 22 is connected to the ATtiny, at least pin 1 should be used.
I don't know, is this a cause of your problem, but types of parameters that you use in function read() is wrong.
Please see the library's examples carefully.
It has software serial built-in on pins 0, 1 (I think... Page linked above says PB0, PA1 which is strange... @DrAzzy ?), so you will not need to include that as a separate library.
Could it be that the standard arduino library is so poorly written that it assumes 16 MHz? If you're running at 5v, try the PLL clock option. Or a better DHT library. Those things are not hard to write, and dozens (not counting forks) surely exist.
Meant to be PB0, PB1 - that's a typo that's fixed, but all development is going towards 2.0.0-dev branch, not master (please do report issues for any error, even a typo in 2.0.0-dev). But that''s something I get to once I get DxCore and megaTinyCore working, neither of which currently is in my dev version, and people want the DD's and I have a bag of DD14's on breakout boards that I'd love to sell... The wheels of those cores are FAR squeakier.
Plus, I need a new feature to efficiently do one of my own projects, running on a DB48, so it would help to be able to compile on that platform
I even tried using the library TinyDHT.h from adafruit, i changed the pin from 0 to 1, i even tried changing the clock of attiny85, but nothing... now im gonna try the DrAzzy Core
Bookmarked to verify against ATTinyCore 2.0.0 and list on library page.
Has this code been verified working on actual hardware? (note: All I care about is if it can read the value from the DHT - displaying it with Serial.print() is sufficient for me to declare this library working and put (as the first entry anyone has submitted) at attinycore's supported librarys list.
Note that as I said, It doesn't count if not tested on hardware. Simulators lie. >50% of problems reported when testing in simulators are false positives