As usual, i've not found the easy path with this! For a kick off, it seems one of my two Arduino Nano modules is duff. Ok so they are chinky knock-offs at under £2 so im not overly fussed about that, although I would have preferred to discover this earlier. The other ran ok as a bare board with the L LED blink test sketch, and is still running fine after having the pins soldered on.
The next difficulty came with the actual sketch - it wouldnt compile! Many many reads of the error log later, and I had identified and installed all the missing libraries it was trying to access. And then -
It still wouldn't compile! This time it threw a more troubling error - 'dht' does not name a type. This resulted in having to read a lot of bumpf on the internet without getting anywhere, until I finally decided to completely read the entire thread on the project, and discovered an updated version of the sketch, written to address this very issue! It seems an upgrade in the Arduino program somewhere along the line knackered the handling of some libraries. Having obtained the new v.4 sketch, which is also updated for three dew heater channels, I found that it would compile and upload to the Nano nicely.
So now, I had a properly programmed Arduino Nano. Perhaps. I still didn't have a display on it so no idea if it was working. But, my OLED display is a 7-pin module capable of several interface protocols, and set up it seemed for 3SPI not I2C. I suppose a good programmer would just have changed the protocol from the controller. But im not a good programmer. So I decided to change the displays physical config.
The silkscreen told me I needed R1, 4, 6, 7, 8. R7 and 8 are already in place, as is R4. R3 was fitted for 3SPI, so I moved that to R1. No display. Ok then I need to fit R6...
These are tiny SMT resistors. My smallest is an 0805 4k7 which I had to 'tombstone' on the board and add a wire link to. Still no display function! So, download the datasheets. Generally useless as expected, but it did show that R6 was a zero ohm link! So, resistor off and solder bridged - and still no display!
Grrrr!
But, luckily then, back on the internet, I found this How to wire these bloody things up!
But this wasnt quite the end of it! I set Chip Select to ground. I set the DC pin to ground. Still no display. Then I did the one remaining option open to me (oh, did I mention swapping SDA and SCL over each time as well to check those?) which was to pull RES up to Vcc...
About bloody time! I don't think the link to Vcc is particularly healthy for RES so will change that to a 100k pull-up resistor later, which I will add onto the OLED display board itself. But I now have a working display. It shows errors of course as I haven't yet added the humidity and temperature sensors. I'll be doing those next, one at a time, the DHT22 humidity/temp sensor first, as this is what is used to calculate the dew point.
Hopefully the link above will help out anyone else who gets one of these awkward modules, although be aware just how tiny those resistors are! If your good with the code your probably better off changing the control protocol to match!
No comments:
Post a Comment