I'm trying to get the SHT11 temp/humidity sensor working on my Arduino ready for a high altitude balloon flight in a few weeks. However, no matter which library I try to use I get really weird readings such as -40.56 deg C and -18.54% humidity.
Wiring
The Arduino is running at 3v3 so the SHT11 is being powered by 3v3 too. It's data line is connected to the Arduino's SDA via a 10K pullup to VCC, and it's clock line is connected to the Arduino's SCL also via a 10K pullup.
When using the SHT1x and Sensiron libraries, I specify the clock pin as 5 and the data as pin 4 as per the pin numbers diagram.
I've tried all sorts of code and I really can't think of anything else as I have little experience with this thing.
I looked at the Arduino schematic for atmega328p, the tqfp package that's on the Nano and it said 4 and 5, but I'm doubtful myself. Do you know where I can find the values I need to reference the SDA and SCL pins?
I am puzzled, as usual. On the Arduino website the hardware section gives SDA (4) and SCL (5) for the Nano. Someone said this was not so, who is correct? I need to know because I am planning to use the Nano in working up a system for a greenhouse controller.
I just had a look at the products page for the nano, it appears it is a bit misleading...
The Nano has 8 analog inputs, each of which provide 10 bits of resolution (i.e. 1024 different values). By default they measure from ground to 5 volts, though is it possible to change the upper end of their range using the analogReference() function. Additionally, some pins have specialized functionality:
I2C: 4 (SDA) and 5 (SCL). Support I2C (TWI) communication using the Wire library (documentation on the Wiring website).
There are a couple of other pins on the board:
This refers to the analog pins the paragraph is talking about.
Analog 4: SDA
Analog 5: SCL
Or as digital pin equivalents ( not marked on arduino boards ):
Well! I Thought I'd get involved with the Arduino after designing a greenhouse controller using discrete components and coming to the conclusion there should be a better and more precise way of consolidating all the requirements into a small and simpler (looking) board. Although digital electronics is not my core subject, I've learnt about it over many years of effort. The trouble I find is that younger people (especially those who the Arduino World call 'hackers') do not know how to slow down and explain themselves. This leaves me as an aging codger way behind. I think I'll go back to my transistors and ICs and forget about those who seem to know the answers but can't put it down on (digital) paper.
Well I'm in the same boat. Between these forums and google, there is a wealth of information to be found. Search the interne for Arduino (your project type) you may find several examples of other folks work on the same type of project. It can be a bit daunting. For sensors and datasheets https://www.sparkfun.com/ and http://www.adafruit.com/ are great resources. Lots of tutorials as well. The tutorials that come with the free Arduino programming software (IDE) can be very helpful as well.